Skip to content

Commit 622b010

Browse files
authored
Merge pull request #129 from digitronik/fix_tests
Test fix
2 parents 5145516 + 3ebac9b commit 622b010

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

testing/components/menus/test_dropdown_disabled.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212
@pytest.fixture
1313
def view(browser):
1414
class TestView(View):
15+
ROOT = './/div[@id="ws-react-templates-c-dropdown-simple"]'
1516
dropdown_custom_locator = Dropdown(
16-
locator=".//button[contains(@data-ouia-component-type, '/MenuToggle') and contains(@data-ouia-component-id, 'default-1')]/parent::div"
17+
locator=".//button[contains(@data-ouia-component-type, '/MenuToggle')][1]/parent::div"
1718
)
1819
disable_checkbox = Checkbox(id="simple-example-disabled-toggle")
1920

testing/components/test_alert.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
@pytest.fixture(params=ALERT_TYPES)
1111
def alert(browser, request):
1212
class TestView(View):
13-
alert = Alert(locator=f".//div[contains(@class, '-c-alert pf-m-{request.param}')][1]")
13+
alert = Alert(
14+
locator=f".//div[contains(@class, '-c-alert pf-m-{request.param}') and not(contains(@class, 'ws-nav-announcement'))][1]"
15+
)
1416

1517
return TestView(browser).alert
1618

0 commit comments

Comments
 (0)