From 12d48f8d1526897243c98983ef023d436ad55384 Mon Sep 17 00:00:00 2001 From: Bill Smith Date: Tue, 7 Sep 2021 13:16:25 -0700 Subject: [PATCH] 2040, 2041, 2075 Updated related tests for these bug fixes. There will need to be another update down the road once 2052 is in the mix. --- .../admin/ui/SeleniumSIDETest.groovy | 6 +- .../integration/resources/SHIBUI-1503-1.side | 249 ++++++++++++------ .../integration/resources/SHIBUI-1503-2.side | 83 +++--- 3 files changed, 214 insertions(+), 124 deletions(-) diff --git a/backend/src/integration/groovy/edu/internet2/tier/shibboleth/admin/ui/SeleniumSIDETest.groovy b/backend/src/integration/groovy/edu/internet2/tier/shibboleth/admin/ui/SeleniumSIDETest.groovy index e156451ee..319ff8b82 100644 --- a/backend/src/integration/groovy/edu/internet2/tier/shibboleth/admin/ui/SeleniumSIDETest.groovy +++ b/backend/src/integration/groovy/edu/internet2/tier/shibboleth/admin/ui/SeleniumSIDETest.groovy @@ -123,16 +123,16 @@ class SeleniumSIDETest extends Specification { 'SHIBUI-1385: Restore a metadata provider version' | '/SHIBUI-1385-2.side' 'SHIBUI-1391: Regex Validation' | '/SHIBUI-1391.side' 'SHIBUI-1407: Metadata source comparison highlights' | '/SHIBUI-1407-1.side' - 'SHIBUI-1407: Metadata provider comparison highlights' | '/SHIBUI-1407-2.side' + 'SHIBUI-1407: Metadata provider comparison highlights' | '/SHIBUI-1407-2.side'*/ 'SHIBUI-1503: Non-admin can create metadata source' | '/SHIBUI-1503-1.side' 'SHIBUI-1503: User can be deleted' | '/SHIBUI-1503-2.side' - 'SHIBUI-1503: User can be enabled' | '/SHIBUI-1503-3.side'*/ +/* 'SHIBUI-1503: User can be enabled' | '/SHIBUI-1503-3.side' 'SHIBUI-1740: Group can be created, edited, deleted' | '/SHIBUI-1740-1.side' 'SHIBUI-1740: Verify dev profile group membership' | '/SHIBUI-1740-2.side' 'SHIBUI-1740: Verify admin-owned resource not visible to nonadmins' | '/SHIBUI-1740-3.side' 'SHIBUI-1740: Verify nonadmin-owned resource visibility' | '/SHIBUI-1740-4.side' 'SHIBUI-1742: Verify enabler role allows enabling' | '/SHIBUI-1742-1.side' - 'SHIBUI-1742: Verify role CRUD operations' | '/SHIBUI-1742-2.side' + 'SHIBUI-1742: Verify role CRUD operations' | '/SHIBUI-1742-2.side'*/ } } diff --git a/backend/src/integration/resources/SHIBUI-1503-1.side b/backend/src/integration/resources/SHIBUI-1503-1.side index 844ce69fd..2e1fd3127 100644 --- a/backend/src/integration/resources/SHIBUI-1503-1.side +++ b/backend/src/integration/resources/SHIBUI-1503-1.side @@ -7,12 +7,82 @@ "id": "3f0e6ded-0b61-4d71-9f74-937cbd972cb3", "name": "SHIBUI-1503-1", "commands": [{ - "id": "86ad3094-9850-478e-9020-e5c894ea17a7", + "id": "b2c48f75-7ccc-41d4-b54b-d7df57ec5560", "comment": "", "command": "open", "target": "/login", "targets": [], "value": "" + }, { + "id": "ea971db8-d17f-41a1-8da0-4b9e293c5794", + "comment": "", + "command": "type", + "target": "name=username", + "targets": [], + "value": "admin" + }, { + "id": "23f95ea5-cc06-48ca-9ace-645d93c9baf3", + "comment": "", + "command": "type", + "target": "name=password", + "targets": [], + "value": "adminpass" + }, { + "id": "da848d9d-94d1-4ec6-ae24-8cc36a7915c8", + "comment": "", + "command": "click", + "target": "css=.btn", + "targets": [], + "value": "" + }, { + "id": "5a5d0684-7d38-4fde-8038-733fd8ffa232", + "comment": "", + "command": "waitForElementVisible", + "target": "id=dropdown-basic", + "targets": [ + ["id=dropdown-basic", "id"], + ["xpath=//button[@id='dropdown-basic']", "xpath:attributes"], + ["xpath=//div[@id='basic-nav-dropdown']/button", "xpath:idRelative"], + ["xpath=//div/button", "xpath:position"], + ["xpath=//button[contains(.,'Advanced')]", "xpath:innerText"] + ], + "value": "30000" + }, { + "id": "93d17dca-74ae-4e80-a49a-640158852dba", + "comment": "", + "command": "open", + "target": "/api/heheheheheheheWipeout", + "targets": [], + "value": "" + }, { + "id": "33256543-3a9f-47e0-8bfc-4a2c0649b27a", + "comment": "", + "command": "assertText", + "target": "css=body", + "targets": [], + "value": "yes, you did it" + }, { + "id": "19cebc7c-c024-4ce8-a8ba-c1978813675b", + "comment": "", + "command": "open", + "target": "/dashboard", + "targets": [], + "value": "" + }, { + "id": "01957ac4-2039-4331-80d3-c8ce382321b0", + "comment": "", + "command": "click", + "target": "linkText=Logout", + "targets": [ + ["linkText=Logout", "linkText"], + ["css=.nav-link:nth-child(4)", "css:finder"], + ["xpath=//a[contains(text(),'Logout')]", "xpath:link"], + ["xpath=//div[@id='basic-navbar-nav']/div/a[2]", "xpath:idRelative"], + ["xpath=//a[contains(@href, '/logout')]", "xpath:href"], + ["xpath=//a[2]", "xpath:position"], + ["xpath=//a[contains(.,'Logout')]", "xpath:innerText"] + ], + "value": "" }, { "id": "b39e96ee-c5a0-4e85-b86b-b41ce815fcde", "comment": "", @@ -41,26 +111,33 @@ "id": "ca7d0095-749c-4709-80aa-0083dc477d20", "comment": "", "command": "click", - "target": "name=submit", + "target": "css=.btn", "targets": [ - ["name=submit", "name"], - ["css=td:nth-child(1) > input", "css:finder"], - ["xpath=//input[@name='submit']", "xpath:attributes"], - ["xpath=//tr[3]/td/input", "xpath:position"] + ["css=.btn", "css:finder"], + ["xpath=//button[@type='submit']", "xpath:attributes"], + ["xpath=//button", "xpath:position"], + ["xpath=//button[contains(.,'Sign in')]", "xpath:innerText"] ], "value": "" }, { "id": "db912e0e-b9c9-4693-92cf-a43a9756d253", "comment": "", "command": "waitForElementVisible", - "target": "css=#addNewDropdown > translate-i18n", - "targets": [], + "target": "id=dropdown-basic", + "targets": [ + ["id=dropdown-basic", "id"], + ["css=#dropdown-basic", "css:finder"], + ["xpath=//button[@id='dropdown-basic']", "xpath:attributes"], + ["xpath=//div[@id='basic-nav-dropdown']/button", "xpath:idRelative"], + ["xpath=//div/button", "xpath:position"], + ["xpath=//button[contains(.,'Add New')]", "xpath:innerText"] + ], "value": "30000" }, { "id": "fcb0a214-ead2-407e-b2b2-ddac954e1348", "comment": "", "command": "click", - "target": "css=#addNewDropdown > translate-i18n", + "target": "id=dropdown-basic", "targets": [ ["css=#addNewDropdown > translate-i18n", "css:finder"], ["xpath=//button[@id='addNewDropdown']/translate-i18n", "xpath:idRelative"], @@ -72,40 +149,48 @@ "id": "837ce33c-8787-4b31-9f8c-d250e5fae525", "comment": "", "command": "click", - "target": "linkText=Metadata Source", + "target": "linkText=Add a new metadata source", "targets": [ - ["linkText=Metadata Source", "linkText"], - ["css=.dropdown-menu > .nav-link:nth-child(1)", "css:finder"], - ["xpath=//div[@id='navbar']/ul/li/div/a", "xpath:idRelative"], - ["xpath=(//a[contains(@href, '')])[2]", "xpath:href"], - ["xpath=//div/a", "xpath:position"] + ["linkText=Add a new metadata source", "linkText"], + ["css=.text-primary", "css:finder"], + ["xpath=//a[contains(text(),'Add a new metadata source')]", "xpath:link"], + ["xpath=//div[@id='basic-nav-dropdown']/div/a", "xpath:idRelative"], + ["xpath=//a[contains(@href, '/metadata/source/new')]", "xpath:href"], + ["xpath=//div/a", "xpath:position"], + ["xpath=//a[contains(.,'Add a new metadata source')]", "xpath:innerText"] ], "value": "" }, { "id": "38afb51c-c3ae-47ca-8d1f-02f26ba2440f", "comment": "", "command": "waitForElementEditable", - "target": "id=/serviceProviderName", - "targets": [], + "target": "id=root_serviceProviderName", + "targets": [ + ["id=root_serviceProviderName", "id"], + ["css=#root_serviceProviderName", "css:finder"], + ["xpath=//input[@id='root_serviceProviderName']", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[3]/div/div/form/div/div/div/div/div/div/div/div/input", "xpath:idRelative"], + ["xpath=//input", "xpath:position"] + ], "value": "30000" }, { "id": "aa956591-ae81-4637-8d89-b6c45daccf86", "comment": "", "command": "type", - "target": "id=/serviceProviderName", + "target": "id=root_serviceProviderName", "targets": [ - ["id=/serviceProviderName", "id"], - ["name=field1", "name"], - ["css=#\\/serviceProviderName", "css:finder"], - ["xpath=//input[@id='/serviceProviderName']", "xpath:attributes"], - ["xpath=//input", "xpath:position"] + ["id=root_entityId", "id"], + ["css=#root_entityId", "css:finder"], + ["xpath=//input[@id='root_entityId']", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[3]/div/div/form/div/div/div/div/div/div[2]/div/div/input", "xpath:idRelative"], + ["xpath=//div[2]/div/div/input", "xpath:position"] ], "value": "Test Source" }, { "id": "ff0ff7cf-ab9b-4dcf-bc9a-ffc005632363", "comment": "", "command": "type", - "target": "id=/entityId", + "target": "id=root_entityId", "targets": [ ["id=/entityId", "id"], ["name=field2", "name"], @@ -128,14 +213,20 @@ "id": "9fb1da6c-d002-4e8d-a9af-c809de9cbc58", "comment": "", "command": "waitForElementEditable", - "target": "id=/organization/name", - "targets": [], + "target": "id=root_organization_name", + "targets": [ + ["id=root_organization_name", "id"], + ["css=#root_organization_name", "css:finder"], + ["xpath=//input[@id='root_organization_name']", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[2]/div/div/div/div/div/div/div/div/input", "xpath:idRelative"], + ["xpath=//input", "xpath:position"] + ], "value": "30000" }, { "id": "68288af1-2686-49b5-b1b9-10f68046fc0a", "comment": "", "command": "type", - "target": "id=/organization/name", + "target": "id=root_organization_name", "targets": [ ["id=/organization/name", "id"], ["name=field5", "name"], @@ -148,33 +239,33 @@ "id": "c785c85c-1515-4bd0-8886-576f568a2efc", "comment": "", "command": "type", - "target": "id=/organization/displayName", + "target": "id=root_organization_displayName", "targets": [ - ["id=/organization/displayName", "id"], - ["name=field6", "name"], - ["css=#\\/organization\\/displayName", "css:finder"], - ["xpath=//input[@id='/organization/displayName']", "xpath:attributes"], - ["xpath=//div[2]/sf-form-element/div/sf-widget-chooser/custom-string/div/input", "xpath:position"] + ["id=root_organization_displayName", "id"], + ["css=#root_organization_displayName", "css:finder"], + ["xpath=//input[@id='root_organization_displayName']", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[2]/div/div/div/div[2]/div/div/div/div/input", "xpath:idRelative"], + ["xpath=//div[2]/div/div/div/div/input", "xpath:position"] ], "value": "Org Display Name" }, { "id": "2cacc9c6-8a1a-4923-aa8d-00dea1172dd0", "comment": "", "command": "type", - "target": "id=/organization/url", + "target": "id=root_organization_url", "targets": [ - ["id=/organization/url", "id"], - ["name=field7", "name"], - ["css=#\\/organization\\/url", "css:finder"], - ["xpath=//input[@id='/organization/url']", "xpath:attributes"], - ["xpath=//div[3]/sf-form-element/div/sf-widget-chooser/custom-string/div/input", "xpath:position"] + ["id=root_organization_url", "id"], + ["css=#root_organization_url", "css:finder"], + ["xpath=//input[@id='root_organization_url']", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div[2]/div/div/form/div/div/div/div/div[2]/div/div/div/div[3]/div/div/div/div/input", "xpath:idRelative"], + ["xpath=//div[3]/div/div/div/div/input", "xpath:position"] ], "value": "Org URL" }, { "id": "8441a497-6a79-4396-af40-6f7ce8056cfe", "comment": "", "command": "click", - "target": "css=.btn-success", + "target": "css=.next", "targets": [ ["css=.btn-success", "css:finder"], ["xpath=//div/button", "xpath:position"], @@ -185,7 +276,7 @@ "id": "383707e1-ae7d-44c5-a91a-69a1f3bc601e", "comment": "", "command": "click", - "target": "css=.label:nth-child(1)", + "target": "css=.next", "targets": [ ["css=.label:nth-child(1)", "css:finder"], ["xpath=//li[3]/button/span", "xpath:position"] @@ -195,7 +286,7 @@ "id": "57d66e91-4e76-410b-8ecc-c5c8f2459606", "comment": "", "command": "click", - "target": "css=.label:nth-child(1)", + "target": "css=.next", "targets": [ ["css=.label:nth-child(1)", "css:finder"], ["xpath=//li[3]/button/span", "xpath:position"] @@ -225,7 +316,7 @@ "id": "ef48faaa-1077-4969-bc63-13049ff2cbf3", "comment": "", "command": "click", - "target": "css=.label:nth-child(1)", + "target": "css=.next", "targets": [ ["css=.label:nth-child(1)", "css:finder"], ["xpath=//li[3]/button/span", "xpath:position"] @@ -235,7 +326,7 @@ "id": "1c5c0174-1181-479b-a8fa-00c759799d61", "comment": "", "command": "click", - "target": "css=.label:nth-child(1)", + "target": "css=.next", "targets": [ ["css=.label:nth-child(1)", "css:finder"], ["xpath=//li[3]/button/span", "xpath:position"] @@ -251,16 +342,6 @@ ["xpath=//li[3]/button", "xpath:position"] ], "value": "" - }, { - "id": "8be428b3-5959-4598-a982-6708e6d39a85", - "comment": "", - "command": "click", - "target": "css=.next", - "targets": [ - ["css=.next", "css:finder"], - ["xpath=//li[3]/button", "xpath:position"] - ], - "value": "" }, { "id": "32ecd0e3-b7a9-4978-923c-9992fba8f557", "comment": "", @@ -282,12 +363,15 @@ "id": "e9a8182c-47d9-444c-8386-f84e1a7da38a", "comment": "", "command": "click", - "target": "css=li:nth-child(3) > .nav-link > translate-i18n", + "target": "linkText=Logout", "targets": [ - ["css=li:nth-child(3) > .nav-link > translate-i18n", "css:finder"], - ["xpath=//div[@id='navbar']/ul/li[3]/a/translate-i18n", "xpath:idRelative"], - ["xpath=//li[3]/a/translate-i18n", "xpath:position"], - ["xpath=//translate-i18n[contains(.,'Logout')]", "xpath:innerText"] + ["linkText=Logout", "linkText"], + ["css=.nav-link:nth-child(3)", "css:finder"], + ["xpath=//a[contains(text(),'Logout')]", "xpath:link"], + ["xpath=//div[@id='basic-navbar-nav']/div/a[2]", "xpath:idRelative"], + ["xpath=//a[contains(@href, '/logout')]", "xpath:href"], + ["xpath=//a[2]", "xpath:position"], + ["xpath=//a[contains(.,'Logout')]", "xpath:innerText"] ], "value": "" }, { @@ -325,12 +409,12 @@ "id": "aa359f0d-e222-415c-81fc-409f387c2a35", "comment": "", "command": "click", - "target": "name=submit", + "target": "css=.btn", "targets": [ - ["name=submit", "name"], - ["css=td:nth-child(1) > input", "css:finder"], - ["xpath=//input[@name='submit']", "xpath:attributes"], - ["xpath=//tr[3]/td/input", "xpath:position"] + ["css=.btn", "css:finder"], + ["xpath=//button[@type='submit']", "xpath:attributes"], + ["xpath=//button", "xpath:position"], + ["xpath=//button[contains(.,'Sign in')]", "xpath:innerText"] ], "value": "" }, { @@ -361,22 +445,20 @@ }, { "id": "9be511e0-ed11-4707-8490-6fa248e4138e", "comment": "", - "command": "assertText", - "target": "css=.badge > span", - "targets": [ - ["css=.badge > span", "css:finder"], - ["xpath=//span/span", "xpath:position"] - ], - "value": "Disabled" + "command": "assertNotChecked", + "target": "xpath=//table/tbody/tr/td[5]/span/div/input", + "targets": [], + "value": "" }, { "id": "157e70d6-fa1c-4118-bce4-ab52000b6c16", "comment": "", "command": "click", - "target": "css=.nav-link > translate-i18n:nth-child(1)", + "target": "xpath=//a[contains(@href, '/dashboard/admin/actions')]", "targets": [ - ["css=.nav-link > translate-i18n:nth-child(1)", "css:finder"], - ["xpath=//li[4]/a/translate-i18n", "xpath:position"], - ["xpath=//translate-i18n[contains(.,'Action Required')]", "xpath:innerText"] + ["css=.nav-item > .d-flex", "css:finder"], + ["xpath=//div[@id='root']/div/main/div/div/div[4]/a", "xpath:idRelative"], + ["xpath=//a[contains(@href, '/dashboard/admin/actions')]", "xpath:href"], + ["xpath=//div[4]/a", "xpath:position"] ], "value": "" }, { @@ -426,11 +508,11 @@ "id": "eb63aa9f-4ac5-4852-8941-740b9f49a769", "comment": "", "command": "click", - "target": "css=.btn-success > translate-i18n", + "target": "xpath=//table/tbody/tr/td[5]/span/div/input", "targets": [ - ["css=.btn-success > translate-i18n", "css:finder"], - ["xpath=//td[5]/button/translate-i18n", "xpath:position"], - ["xpath=//translate-i18n[contains(.,'Enable')]", "xpath:innerText"] + ["css=.custom-control-label", "css:finder"], + ["xpath=//div[@id='root']/div/main/div/section/div/div[2]/div/div/div/table/tbody/tr/td[5]/span/div/label", "xpath:idRelative"], + ["xpath=//label", "xpath:position"] ], "value": "" }, { @@ -475,12 +557,9 @@ }, { "id": "f76a12a3-2054-4be2-a6a6-2221afd493fb", "comment": "", - "command": "assertText", - "target": "css=.badge > span", - "targets": [ - ["css=.badge > span", "css:finder"], - ["xpath=//span/span", "xpath:position"] - ], + "command": "assertChecked", + "target": "xpath=//table/tbody/tr/td[5]/span/div/input", + "targets": [], "value": "Enabled" }, { "id": "6b4905b8-2ae3-4682-ae52-0149c58eb7f4", diff --git a/backend/src/integration/resources/SHIBUI-1503-2.side b/backend/src/integration/resources/SHIBUI-1503-2.side index fbc65ae95..408f5648d 100644 --- a/backend/src/integration/resources/SHIBUI-1503-2.side +++ b/backend/src/integration/resources/SHIBUI-1503-2.side @@ -41,40 +41,43 @@ "id": "624d4f0a-ddb6-4047-a25e-43cbde644fb5", "comment": "", "command": "click", - "target": "name=submit", + "target": "css=.btn", "targets": [ - ["name=submit", "name"], - ["css=td:nth-child(1) > input", "css:finder"], - ["xpath=//input[@name='submit']", "xpath:attributes"], - ["xpath=//tr[3]/td/input", "xpath:position"] + ["css=.btn", "css:finder"], + ["xpath=//button[@type='submit']", "xpath:attributes"], + ["xpath=//button", "xpath:position"], + ["xpath=//button[contains(.,'Sign in')]", "xpath:innerText"] ], "value": "" }, { "id": "812843b9-c71a-4141-b204-3387f0fee39a", "comment": "", "command": "waitForElementVisible", - "target": "css=.nav-link > translate-i18n:nth-child(1)", - "targets": [], + "target": "css=.nav-item > .d-flex", + "targets": [ + ["css=.nav-item > .d-flex", "css:finder"], + ["xpath=//div[@id='root']/div/main/div/div/div[4]/a", "xpath:idRelative"], + ["xpath=//a[contains(@href, '/dashboard/admin/actions')]", "xpath:href"], + ["xpath=//div[4]/a", "xpath:position"] + ], "value": "30000" }, { - "id": "473db033-9a76-4173-9a70-daa255f99b1d", + "id": "3e45a4ea-cdf8-4087-9d5d-d8ee43dccf70", "comment": "", "command": "click", - "target": "css=.nav-link > translate-i18n:nth-child(1)", - "targets": [ - ["css=.nav-link > translate-i18n:nth-child(1)", "css:finder"], - ["xpath=//li[4]/a/translate-i18n", "xpath:position"], - ["xpath=//translate-i18n[contains(.,'Action Required')]", "xpath:innerText"] - ], + "target": "css=.nav-item > .d-flex", + "targets": [], "value": "" }, { "id": "a98143b5-647f-4e7e-b920-f6e6875d7372", "comment": "", "command": "click", - "target": "css=.fa-trash", + "target": "css=.btn > span", "targets": [ - ["css=.fa-trash", "css:finder"], - ["xpath=//div[2]/button/i", "xpath:position"] + ["css=.btn > span", "css:finder"], + ["xpath=//div[@id='root']/div/main/div/section[2]/div/div[2]/div/div/div/div[2]/button/span", "xpath:idRelative"], + ["xpath=//div[2]/button/span", "xpath:position"], + ["xpath=//span[contains(.,'Delete Request')]", "xpath:innerText"] ], "value": "" }, { @@ -92,14 +95,19 @@ "id": "2d8da370-0a5a-4048-a8bd-f68210a271c5", "comment": "", "command": "waitForElementVisible", - "target": "css=.text-center", - "targets": [], + "target": "css=.text-center:nth-child(1)", + "targets": [ + ["css=.text-center:nth-child(1)", "css:finder"], + ["xpath=//div[@id='root']/div/main/div/section[2]/div/div[2]/div/div/p", "xpath:idRelative"], + ["xpath=//p", "xpath:position"], + ["xpath=//p[contains(.,'There are no new user requests at this time.')]", "xpath:innerText"] + ], "value": "30000" }, { "id": "d5a65352-5897-49cf-9046-3afc5397f193", "comment": "", "command": "assertText", - "target": "css=.text-center", + "target": "css=.text-center:nth-child(1)", "targets": [ ["css=.text-center", "css:finder"], ["xpath=//p", "xpath:position"], @@ -107,15 +115,18 @@ ], "value": "There are no new user requests at this time." }, { - "id": "ede68bbe-2236-457d-93d7-9e7cde5d5176", + "id": "e6d6cac9-cc9a-424d-b89e-90b9eb899b7a", "comment": "", "command": "click", - "target": "css=li:nth-child(3) > .nav-link > translate-i18n", + "target": "linkText=Logout", "targets": [ - ["css=li:nth-child(3) > .nav-link > translate-i18n", "css:finder"], - ["xpath=//div[@id='navbar']/ul/li[3]/a/translate-i18n", "xpath:idRelative"], - ["xpath=//li[3]/a/translate-i18n", "xpath:position"], - ["xpath=//translate-i18n[contains(.,'Logout')]", "xpath:innerText"] + ["linkText=Logout", "linkText"], + ["css=.nav-link:nth-child(4)", "css:finder"], + ["xpath=//a[contains(text(),'Logout')]", "xpath:link"], + ["xpath=//div[@id='basic-navbar-nav']/div/a[2]", "xpath:idRelative"], + ["xpath=//a[contains(@href, '/logout')]", "xpath:href"], + ["xpath=//a[2]", "xpath:position"], + ["xpath=//a[contains(.,'Logout')]", "xpath:innerText"] ], "value": "" }, { @@ -153,12 +164,12 @@ "id": "6c4429c8-7d82-4d87-a58d-a587cff891f6", "comment": "", "command": "click", - "target": "name=submit", + "target": "css=.btn", "targets": [ - ["name=submit", "name"], - ["css=td:nth-child(1) > input", "css:finder"], - ["xpath=//input[@name='submit']", "xpath:attributes"], - ["xpath=//tr[3]/td/input", "xpath:position"] + ["css=.btn", "css:finder"], + ["xpath=//button[@type='submit']", "xpath:attributes"], + ["xpath=//button", "xpath:position"], + ["xpath=//button[contains(.,'Sign in')]", "xpath:innerText"] ], "value": "" }, { @@ -172,12 +183,12 @@ "id": "b826ed10-31a4-487b-ba80-c633ff037839", "comment": "", "command": "assertText", - "target": "css=p", + "target": "css=.alert", "targets": [ - ["css=p", "css:finder"], - ["xpath=//p", "xpath:position"] + ["css=.alert", "css:finder"], + ["xpath=//form/div", "xpath:position"] ], - "value": "Your login attempt was not successful, try again.\n\nReason: Bad credentials" + "value": "Bad credentials" }, { "id": "5b421e75-d5db-44ff-ac57-2fd8f91c2478", "comment": "", @@ -197,4 +208,4 @@ }], "urls": ["http://localhost:10101/"], "plugins": [] -} +} \ No newline at end of file