-
Notifications
You must be signed in to change notification settings - Fork 40
test(gui): fix and enable add-account scenarios #876
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
530b346
test(gui): enable manual folder sync scenario
saw-jan ac176bf
test(gui): enable account re-add scenario
saw-jan 85a24d1
test(gui): skip manual sync scenario
saw-jan cbfda2e
test(gui): check space selection
saw-jan 4134b67
test(gui): remove obsolete step files
saw-jan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,102 @@ | ||
| from behave.model import Table | ||
|
|
||
|
|
||
| def table_raw(table: Table): | ||
| """ | ||
| Args: | ||
| table (Table): Behave Table object. | ||
| Returns: | ||
| list: List of lists (including header row) - each row is a list of cells. | ||
|
|
||
| Example: | ||
| | header1 | header2 | header3 | | ||
| | value1 | value2 | value3 | | ||
| Output: | ||
| [ | ||
| ['header1', 'header2', 'header3'], | ||
| ['value1', 'value2', 'value3'], | ||
| ] | ||
| """ | ||
| data_table = [table.headings] | ||
| data_table.extend(table_rows(table)) | ||
| return data_table | ||
|
|
||
|
|
||
| def table_rows(table: Table): | ||
| """ | ||
| Args: | ||
| table (Table): Behave Table object. | ||
| Returns: | ||
| list: List of lists (excluding header row) - each row is a list of cells. | ||
|
|
||
| Example: | ||
| | header1 | header2 | header3 | | ||
| | value1 | value2 | value3 | | ||
| Output: | ||
| [ | ||
| ['value1', 'value2', 'value3'], | ||
| ] | ||
| """ | ||
| data_table = [] | ||
| for row in table: | ||
| data_table.append(row.cells) | ||
| return data_table | ||
|
|
||
|
|
||
| def table_rows_hash(table: Table): | ||
| """ | ||
| Args: | ||
| table (Table): Behave Table object. Table MUST have exactly 2 columns. | ||
| Returns: | ||
| dict: Dictionary where keys are from the first column and values are from the second column. | ||
| Raises: | ||
| ValueError: If the table does not have exactly 2 columns. | ||
|
|
||
| Example: | ||
| | key1 | value1 | | ||
| | key2 | value2 | | ||
| | key3 | value3 | | ||
| Output: | ||
| { | ||
| 'key1': 'value1', | ||
| 'key2': 'value2', | ||
| 'key3': 'value3', | ||
| } | ||
| """ | ||
| if len(table.headings) != 2: | ||
| raise ValueError( | ||
| "table_rows_hash() can only be called on a data table where all rows have exactly two columns." | ||
| ) | ||
|
|
||
| data_table = { | ||
| table.headings[0]: table.headings[1], | ||
| } | ||
| for row in table: | ||
| data_table[row[0]] = row[1] | ||
| return data_table | ||
|
|
||
|
|
||
| def table_hashes(table: Table): | ||
| """ | ||
| Args: | ||
| table (Table): Behave Table object. | ||
| Returns: | ||
| list: List of dictionaries, where each dictionary represents a row with keys from the header and values from the corresponding cells. | ||
|
|
||
| Example: | ||
| | key1 | key2 | key3 | | ||
| | value1 | value2 | value3 | | ||
| | value4 | value5 | value6 | | ||
| Output: | ||
| [ | ||
| {'key1': 'value1', 'key2': 'value2', 'key3': 'value3'}, | ||
| {'key1': 'value4', 'key2': 'value5', 'key3': 'value6'}, | ||
| ] | ||
| """ | ||
| data_table = [] | ||
| for row in table: | ||
| row_dict = {} | ||
| for idx, heading in enumerate(table.headings): | ||
| row_dict[heading] = row.cells[idx] | ||
| data_table.append(row_dict) | ||
| return data_table |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@prashant-gurung899 @anon-pradip Please, try to run this scenario. It passed once on my machine but refuse to pass now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my machine, it didn't pass even once.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, yeah. that's the error. space is not being selected.
I will skip the test for now and enable with fix later on
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will be fixed by #879, but I need review from the dev team
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool. Then, we can merge this one.