Skip to content

Commit

Permalink
YDA-5458: ui tests for go to group manager button
Browse files Browse the repository at this point in the history
  • Loading branch information
claravox authored and lwesterhof committed Oct 25, 2023
1 parent 9b8cecc commit 307e9ee
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 5 deletions.
11 changes: 11 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,3 +417,14 @@ def ui_browse_folder(browser, folder):
link.click()
else:
browser.find_by_id('file-browser_next').click()


@when('user clicks go to group manager')
def ui_go_to_group_manager(browser):
browser.find_by_css('.btn-go-to-group-manager').click()


@when(parsers.parse("correct row in tree is active for {group}"))
@then(parsers.parse("correct row in tree is active for {group}"))
def ui_group_tree_correct_row_active(browser, group):
assert browser.find_by_css('a.group.active[data-name={}]'.format(group), wait_time=1)
12 changes: 12 additions & 0 deletions tests/features/ui/ui_research.feature
Original file line number Diff line number Diff line change
Expand Up @@ -184,3 +184,15 @@ Feature: Research UI
| folder | format |
| research-initial | csv |
| research-initial | txt |


Scenario Outline: Go to group manager from research
Given user datamanager is logged in
And module "research" is shown
When user browses to folder <folder>
And user clicks go to group manager
And correct row in tree is active for <group>

Examples:
| folder | group |
| research-initial1 | research-initial1 |
12 changes: 12 additions & 0 deletions tests/features/ui/ui_vault.feature
Original file line number Diff line number Diff line change
Expand Up @@ -227,3 +227,15 @@ Feature: Vault UI
Examples:
| vault |
| vault-initial1 |


Scenario Outline: Go to group manager from vault
Given user datamanager is logged in
And module "vault" is shown
When user browses to data package in <vault>
And user clicks go to group manager
And correct row in tree is active for <group>

Examples:
| vault | group |
| vault-initial1 | research-initial1 |
5 changes: 0 additions & 5 deletions tests/step_defs/ui/test_ui_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ def ui_group_check_properties_panel(browser, group):
assert browser.find_by_id('f-group-update-creation-date', wait_time=1).visible


@when(parsers.parse("correct row in tree is active for {group}"))
def ui_group_tree_correct_row_active(browser, group):
assert browser.find_by_css('a.group.active[data-name={}]'.format(group), wait_time=1)


@when(parsers.parse("correct row in list view is active for {group}"))
def ui_group_list_view_correct_row_active(browser, group):
assert len(browser.find_by_css('#tbl-list-groups tr.active[user-search-result-group="{}"]'.format(group))) == 1
Expand Down

0 comments on commit 307e9ee

Please sign in to comment.