Coder Social home page Coder Social logo

asn1editor's Issues

[UI elements] Strings - Fail

Precondition

Launch the application with the arguments "-asn1spec example/example.asn -type EXAMPLE.Sequence"
Switch tool to Tree view

Steps to Reproduce:

Step Action Expected Status
1 Select Sequence

Set visibleString to "hello"

Save data file

Set visibleString to "goodbye"

Load data file
Visible string is restored to "hello" Pass
2 Try to put more than 15 characters into visibleString Not more than 15 characters can be entered Pass
3 Hover the mouse over visibleString Tooltip is displayed: "Minimum characters: 0, maximum characters: 15" Pass
4 Set utf8String to "" (empty string)

Save data file

Set utf8String to "äöüØ"

Save data file

Set utf8String to "1"

Load data file
First save yields an error: "utf8String: Expected between 1 and 5 characters, but got 0."

Second save is ok.

After loading, utf8String is restored to "äöüØ"
Pass
5 Disable "Hex" checkbox for octet string

Set octet string to "ab"

Save data file

Set octet string to "ffff"

Save data file

Set octet string to "abcd"

Load data file
First save yields an error: "octetString: Expected between 4 and 4 characters, but got 2."

Second save is ok.

After loading, octetString is restored to "ffff"
Pass
6 Set octet string to "abcd"

Enable "Hex" checkbox for octet string

Enter "64 63 62 61"

Disable "Hex" checkbox for octet string

Enable "Hex" checkbox for octet string

Enter "uu"

Disable "Hex" checkbox for octet string
Enabling "Hex" checkbox shows "61 62 63 64"

Disabling "Hex" checkbox shows "dcba"

Enabling "Hex" checkbox shows "64 63 62 61"

Disabling "Hex" checkbox shows "dcba"
Fail

Error:

When in Hex view, the maximum number of characters is incorrect. It is two times the string length, but should be three times the string length (two chars + space).

Highlighting constraints violations is not reset after loading

Precondition

Launch the application with the arguments "example/example.asn -type EXAMPLE.Sequence"
Switch tool to Tree view

Steps to Reproduce:

Step Action Expected Status
1 Select Sequence->example1, set member1 to 999

Save encoded data
No error Pass
2 Set member1 to 6000

Select Sequence->example2

Select Sequence->example1

Save encoded data

Load encoded data
After reselection, member1 is highlighted

Saving fails with error: "example1: member1: Expected an integer between 0 and 5000, but got 6000."

After loading, member1 has the value 999
Value is 999, but the highlighting is not reset
3 Hover over Sequence->example1 Tooltip "Minimum:0, Maximum: 5000" is shown Pending

[Main functionality] Open recent - Fail

Steps to Reproduce:

Step Action Expected Status
1 Open the application

Open the example.asn specification, type "EXAMPLE.Sequence"

Open File->Open recent
example.asn, type "EXAMPLE.Sequence" is in the recent list Pass
2 Close the application

Open the application
example.asn, type "EXAMPLE.Sequence" is in the recent list Pass
3 Clear the recent list

Close the application

Open the application
The recent list is empty Fail

Error:

When clearing the recent list, a deprecated warning appears:
C:\Users\Flo\Documents\Programmieren\asn1editor\asn1editor\wxPython\MenuHandler.py:172: wxPyDeprecationWarning: Call to deprecated item. Use Remove instead.
self.__recent_menu.RemoveItem(menu_item)

[Plugins] File and dir dialogs - Fail

Steps to Reproduce:

Step Action Expected Status
1 Start the application with the "-test" argument

Open "Test->FileDialog"

Select an existing file to open

Select an existing file to save and overwrite
An open file dialog is shown with the caption "Test open file"

Selected file is shown in the tool's status bar

A save file dialog is shown with the caption "Test save file"

A popup is shown asking to overwrite the file

Selected file is shown in the tool's status bar
Pass
2 Open "Test 2->DirDialog" and select a directory

Open "Test->DirDialog" and select a different directory with a different parent directory
A directory select dialog is shown with the caption "Test 2"

The selected directory is shown in the tool's status bar

A directory select dialog is shown with the caption "Test"

The selected directory is shown in the tool's status bar
Fail

Error:

When selecting a directory, the application crashes:
File "C:\Users\Flo\Documents\Programmieren\asn1editor\asn1editor\wxPython\FilePickerHandler.py", line 26, in on_menu_click
filenames = file_dialog.GetPaths()
AttributeError: 'DirDialog' object has no attribute 'GetPaths'

[Views] Tree view - Fail

Precondition

Launch the application with the arguments "example/example.asn -type EXAMPLE.Sequence"
Switch tool to Tree view

Steps to Reproduce:

Step Action Expected Status
1 Select Sequence Sequence members are displayed in content view (right side)

Only "trivial" types (not sequence, choice, sequence of) are displayed
Pass
2 Select example1 Only members of sequence example1 are displayed in content view Pass
3 Select optionalSequenceOf

Enable optionalSequenceOf

Increase elements to 2

Select both elements

Decrease elements to 1
Correct number of elements are displayed at all times as children of optionalSequenceOf

Members of elements are displayed in content view when selected
Pass
4 Select choiceExample

Select all possible values of choiceExample
Child of choiceExample always reflects the choice selection

Child contents always reflect child type
Pass
5 Right click choiceExample

Choose Collapse
choiceExample node is collapsed, child is no longer visible in tree Pass
6 Right click choiceExample

Choose Expand
Child is visible in tree Pass
7 Right click sequence

Choose Collapse all
Only the root of tree is visible Fail
8 Right click sequence

Choose Expand all
All tree items are visible Fail

When collapsing all, the root node is selected. However, in the content panel, the previous content is displayed. This should be reset to an empty panel.

[Main functionality] Load last specification - Fail

Precondition

Setting "Open last specification on startup" is disabled

Steps to Reproduce:

Step Action Expected Status
1 Open the application

Enable the setting "Open last specification on startup"

Open the example.asn specification, type "EXAMPLE.Sequence"

Close the application

Open the application
After reopen, the example.asn is opened with the type "EXAMPLE.Sequence" Fail

Error

Not necessarily the most recent file is opened if this file is already in the "Recent" list. In this case, the uppermost entry of the "Recent" list is loaded.

Additionals default value

Open example.asn, enable ...additionalOptional. Enter value 2. Load example.json.

Expected: ...additionalOptional is reset to default
Observed: value 2 stays

[Main functionality] Drag & drop - Fail

Precondition

Launch the application without arguments, close potentially open specifications

Steps to Reproduce:

Step Action Expected Status
1 Drag the file example/example.asn to the main window

Select Sequence type
Dialog box for selecting a type appears

Specification is loaded
Fail

The dialog box appears, but in the wrong GUI state. The GUI is locked in that state and the drop cursor is still shown. The dialog box should appear after the file has been dropped and the event has benn processed.

[Plugins] File and dir dialogs - Fail

Steps to Reproduce:

Step Action Expected Status
1 Start the application with the "-test" argument

Open "Test->FileDialog"

Select an existing file to open

Select an existing file to save and overwrite
An open file dialog is shown with the caption "Test open file"

Selected file is shown in the tool's status bar

A save file dialog is shown with the caption "Test save file"

A popup is shown asking to overwrite the file

Selected file is shown in the tool's status bar
Pass
2 Open "Test 2->DirDialog" and select a directory

Open "Test->DirDialog" and select a different directory with a different parent directory
A directory select dialog is shown with the caption "Test 2"

The selected directory is shown in the tool's status bar

A directory select dialog is shown with the caption "Test"

The selected directory is shown in the tool's status bar
Pass
3 Close the application

Start the application with the "-test" argument

Open "Test 2->DirDialog" and cancel

Open "Test->DirDialog" and cancel
Start directory of "Test 2" dialog is the same as in step 2

Start directory of "Test" dialog is the same as in step 2
Fail

Directory in the opened dir dialog is one level further up than expected.

[Main functionality] Load last specification - Fail

Precondition

Setting "Open last specification on startup" is disabled

Steps to Reproduce:

Step Action Expected Status
1 Open the application

Enable the setting "Open last specification on startup"

Open the example.asn specification, type "EXAMPLE.Sequence"

Close the application

Open the application
After reopen, the example.asn is opened with the type "EXAMPLE.Sequence" Pass
2 Open "tests/standards/rfc1157.asn", type RFC1157-SNMP.Message

Close the application

Open the application
After reopen, "tests/standards/rfc1157.asn" with type RFC1157-SNMP.Message is opened Pass
3 Close the specification

Close the application

Open the application
After reopen, no specification is loaded Fail
4 Open "tests/standards/rfc1157.asn", type RFC1157-SNMP.Message

Disable the setting "Open last specification on startup"

Close the application

Open the application
After reopen, no specification is loaded Fail

Error:

After reopening, the specification rfc1157.asn was loaded again.

[UI elements] Strings - Fail

Precondition

Launch the application with the arguments "example/example.asn -type EXAMPLE.Sequence"
Switch tool to Tree view

Steps to Reproduce:

Step Action Expected Status
1 Select Sequence

Set visibleString to "hello"

Save encoded data

Set visibleString to "goodbye"

Load encoded data
Visible string is restored to "hello" Pass
2 Try to put more than 15 characters into visibleString Not more than 15 characters can be entered Pass
3 Hover the mouse over visibleString Tooltip is displayed: "Minimum characters: 0, maximum characters: 15" Pass
4 Set utf8String to "" (empty string)

Save data file

Set utf8String to "äöüØ"

Save data file

Set utf8String to "1"

Load data file
First save yields an error: "utf8String: Expected between 1 and 5 characters, but got 0."

Second save is ok.

After loading, utf8String is restored to "äöüØ"
Pass
5 Disable "Hex" checkbox for octet string

Set octet string to "ab"

Save data file

Set octet string to "ffff"

Save data file

Set octet string to "abcd"

Load data file
First save yields an error: "octetString: Expected between 4 and 4 characters, but got 2."

Second save is ok.

After loading, octetString is restored to "ffff"
Fail
6 Set octet string to "abcd"

Enable "Hex" checkbox for octet string

Enter "64 63 62 61"

Disable "Hex" checkbox for octet string

Enable "Hex" checkbox for octet string

Enter "uu"

Disable "Hex" checkbox for octet string
Enabling "Hex" checkbox shows "61 62 63 64"

Disabling "Hex" checkbox shows "dcba"

Enabling "Hex" checkbox shows "64 63 62 61"

Disabling "Hex" checkbox shows "dcba"
Fail

Actual Results:

Octet string length is only 1 after disabling hex checkbox

[Views] Tree view - Fail

Precondition

Launch the application with the arguments "example/example.asn -type EXAMPLE.Sequence"
Switch tool to Tree view

Steps to Reproduce:

Step Action Expected Status
1 Select Sequence Sequence members are displayed in content view (right side)

Only "trivial" types (not sequence, choice, sequence of) are displayed
Pass
2 Select example1 Only members of sequence example1 are displayed in content view Pass
3 Select optionalSequenceOf

Enable optionalSequenceOf

Increase elements to 2

Select both elements

Decrease elements to 1
Correct number of elements are displayed at all times as children of optionalSequenceOf

Members of elements are displayed in content view when selected
Pass
4 Select choiceExample

Select all possible values of choiceExample
Child of choiceExample always reflects the choice selection

Child contents always reflect child type
Pass
5 Right click choiceExample

Choose Collapse
choiceExample node is collapsed, child is no longer visible in tree Fail
6 Right click choiceExample

Choose Expand
Child is visible in tree Fail
7 Right click sequence

Choose Collapse all
Only the root of tree is visible Fail
8 Right click sequence

Choose Expand all
All tree items are visible Fail

Right clicking an element does not change the content panel, but it should.

Restoring directory does not work for DirDialog

File "C:\DATEN\Projects\OER_working_branch\src\euchnerDataFileTools\asn1editor\wxPython\FilePickerHandler.py", line 22, in on_menu_click
file_dialog.SetDirectory(initial_dir)
AttributeError: 'DirDialog' object has no attribute 'SetDirectory'

[Main functionality] Open recent - Fail

Steps to Reproduce:

Step Action Expected Status
1 Open the application

Open the example.asn specification, type "EXAMPLE.Sequence"

Open File->Open recent
example.asn, type "EXAMPLE.Sequence" is in the recent list Pass
2 Close the application

Open the application
example.asn, type "EXAMPLE.Sequence" is in the recent list Pass
3 Clear the recent list

Close the application

Open the application
The recent list is empty Fail

Error:

After reopening the application, no specification was opened although open last specification was checked and a specification was loaded while closing the application.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.