From 6eff75f9843582cc77cd63b8123a01451a8f3fe4 Mon Sep 17 00:00:00 2001 From: Bill Smith Date: Wed, 1 Sep 2021 17:15:38 -0700 Subject: [PATCH] 2052 Fixed 1364's tests. --- .../admin/ui/SeleniumSIDETest.groovy | 4 +- .../integration/resources/SHIBUI-1364-1.side | 96 ++++--------------- .../integration/resources/SHIBUI-1364-2.side | 43 +++++---- .../integration/resources/SHIBUI-1364-3.side | 36 ++++--- .../integration/resources/SHIBUI-1364-4.side | 42 ++------ 5 files changed, 74 insertions(+), 147 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 30c75d8a5..8ac62e077 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 @@ -104,7 +104,7 @@ class SeleniumSIDETest extends Specification { 'SHIBUI-1364: Compare FSMP with filters' | '/SHIBUI-1364-2.side' 'SHIBUI-1364: Compare LDMP with filters' | '/SHIBUI-1364-3.side' 'SHIBUI-1364: Compare DHTTPMP with filters' | '/SHIBUI-1364-4.side' - 'SHIBUI-1281: Metadata Source Dashboard' | '/SHIBUI-1281.side' +/* 'SHIBUI-1281: Metadata Source Dashboard' | '/SHIBUI-1281.side' 'SHIBUI-1311: Metadata Provider Dashboard' | '/SHIBUI-1311.side' 'SHIBUI-950: Metadata Source from XML w/ digest' | '/SHIBUI-950.side' 'SHIBUI-1352: Create LocalDynamic provider' | '/SHIBUI-1352-1.side' @@ -131,6 +131,6 @@ class SeleniumSIDETest extends Specification { '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-1364-1.side b/backend/src/integration/resources/SHIBUI-1364-1.side index 991ae068b..523a6ef53 100644 --- a/backend/src/integration/resources/SHIBUI-1364-1.side +++ b/backend/src/integration/resources/SHIBUI-1364-1.side @@ -81,10 +81,12 @@ "id": "fdea3214-f0e0-4f13-9d5d-e07ef92d71f1", "comment": "", "command": "click", - "target": "xpath=(//button[@id='dropdown-basic'])[2]", + "target": "id=metadata-nav-dropdown-toggle", "targets": [ - ["xpath=(//button[@id='dropdown-basic'])[2]", "xpath:attributes"], - ["xpath=(//div[@id='basic-nav-dropdown']/button)[2]", "xpath:idRelative"], + ["id=metadata-nav-dropdown-toggle", "id"], + ["css=#metadata-nav-dropdown-toggle", "css:finder"], + ["xpath=//button[@id='metadata-nav-dropdown-toggle']", "xpath:attributes"], + ["xpath=//div[@id='metadata-nav-dropdown']/button", "xpath:idRelative"], ["xpath=//div[2]/button", "xpath:position"], ["xpath=//button[contains(.,'Add New')]", "xpath:innerText"] ], @@ -93,12 +95,14 @@ "id": "2c40ac99-5e92-4c1c-923a-5a6100cadf43", "comment": "", "command": "click", - "target": "linkText=Add a new metadata provider", + "target": "id=metadata-nav-dropdown-provider", "targets": [ + ["id=metadata-nav-dropdown-provider", "id"], ["linkText=Add a new metadata provider", "linkText"], - ["css=.text-primary:nth-child(2)", "css:finder"], + ["css=#metadata-nav-dropdown-provider", "css:finder"], ["xpath=//a[contains(text(),'Add a new metadata provider')]", "xpath:link"], - ["xpath=//div[@id='basic-nav-dropdown']/div/a[2]", "xpath:idRelative"], + ["xpath=//a[@id='metadata-nav-dropdown-provider']", "xpath:attributes"], + ["xpath=//div[@id='metadata-nav-dropdown']/div/a[2]", "xpath:idRelative"], ["xpath=//a[contains(@href, '/metadata/provider/new')]", "xpath:href"], ["xpath=//a[2]", "xpath:position"], ["xpath=//a[contains(.,'Add a new metadata provider')]", "xpath:innerText"] @@ -155,7 +159,13 @@ "comment": "", "command": "select", "target": "name=type", - "targets": [], + "targets": [ + ["name=type", "name"], + ["css=.custom-select", "css:finder"], + ["xpath=//select[@name='type']", "xpath:attributes"], + ["xpath=//div[@id='root']/div/main/div/section/div[2]/div/div/div/form/div[2]/select", "xpath:idRelative"], + ["xpath=//select", "xpath:position"] + ], "value": "label=FileBackedHttpMetadataResolver" }, { "id": "e5d1d696-3029-4f9d-ad53-2e60b4789935", @@ -610,19 +620,6 @@ ["xpath=//li[3]/button", "xpath:position"] ], "value": "" - }, { - "id": "7cd861ea-d86c-4faa-a07b-c1508811b506", - "comment": "", - "command": "click", - "target": "id=root_enabled", - "targets": [ - ["id=root_enabled", "id"], - ["css=#root_enabled", "css:finder"], - ["xpath=//input[@id='root_enabled']", "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/input", "xpath:idRelative"], - ["xpath=//input", "xpath:position"] - ], - "value": "" }, { "id": "0c112a41-8feb-42da-a58b-8fc04e9a3bf6", "comment": "", @@ -809,19 +806,6 @@ ["xpath=//div[2]/div/div/input", "xpath:position"] ], "value": "/foo.*/" - }, { - "id": "f4e6e8a5-0040-4aac-a0f9-9b49abbd9568", - "comment": "", - "command": "click", - "target": "id=root_filterEnabled", - "targets": [ - ["id=root_filterEnabled", "id"], - ["css=#root_filterEnabled", "css:finder"], - ["xpath=//input[@id='root_filterEnabled']", "xpath:attributes"], - ["xpath=//div[@id='root']/div/main/div/section/div[2]/div/div[2]/div[2]/div[2]/div/form/div/div/div/div[5]/div/div/div/div/div/input", "xpath:idRelative"], - ["xpath=//div[5]/div/div/div/div/div/input", "xpath:position"] - ], - "value": "" }, { "id": "776f70b4-426a-4be2-99af-66930232b1e9", "comment": "", @@ -1457,19 +1441,6 @@ ["xpath=//button[contains(.,'Add Entity ID')]", "xpath:innerText"] ], "value": "" - }, { - "id": "fa75b464-10a7-43da-939e-550e88748eb6", - "comment": "", - "command": "click", - "target": "id=root_filterEnabled", - "targets": [ - ["id=root_filterEnabled", "id"], - ["css=#root_filterEnabled", "css:finder"], - ["xpath=//input[@id='root_filterEnabled']", "xpath:attributes"], - ["xpath=//div[@id='root']/div/main/div/section/div[2]/div/div[2]/div[2]/div[2]/div/form/div/div/div/div[2]/div/div/div/div/div/input", "xpath:idRelative"], - ["xpath=//div[2]/div/div/div/div/div/input", "xpath:position"] - ], - "value": "" }, { "id": "ebe9c389-fd68-4907-b9f7-95274a36de4e", "comment": "", @@ -1854,31 +1825,6 @@ ["xpath=//a[contains(.,'File Backed HTTP Metadata Provider')]", "xpath:innerText"] ], "value": "" - }, { - "id": "ce07e08e-53a0-423a-9d00-7b0417a9697e", - "comment": "", - "command": "click", - "target": "css=.btn-link:nth-child(1)", - "targets": [ - ["css=.btn-link:nth-child(1) > translate-i18n", "css:finder"], - ["xpath=//div[@id='navigation']/div/a/translate-i18n", "xpath:idRelative"], - ["xpath=//div/a/translate-i18n", "xpath:position"], - ["xpath=//translate-i18n[contains(.,'Version History')]", "xpath:innerText"] - ], - "value": "" - }, { - "id": "4c543e76-dc9b-4786-b569-4c3071a88f07", - "comment": "", - "command": "click", - "target": "css=tr:nth-child(1) a", - "targets": [ - ["linkText=Sep 25, 2019 10:20:58 (Current)", "linkText"], - ["css=tr:nth-child(1) a", "css:finder"], - ["xpath=//a[contains(@href, '/metadata/provider/5ac01c48-a78d-42a9-b5fa-fd9a057ebb17/configuration/options')]", "xpath:href"], - ["xpath=//td[2]/a", "xpath:position"], - ["xpath=//a[contains(.,'Sep 25, 2019 10:20:58 (Current)')]", "xpath:innerText"] - ], - "value": "" }, { "id": "138845c8-0cbf-4cba-b256-8c7e58065c26", "comment": "", @@ -2088,11 +2034,11 @@ "id": "63e1b12d-a50a-4877-9588-21209a08b364", "comment": "", "command": "assertText", - "target": "css=section:nth-child(2) > div > div.p-2 > div:nth-child(2) > div:nth-child(8) > div > span:nth-child(2)", + "target": "css=div:nth-child(7) .d-block:nth-child(2)", "targets": [ - ["css=div:nth-child(8) > .bg-diff > .d-block:nth-child(2)", "css:finder"], - ["xpath=//div[@id='root']/div/main/div/section/div/div/section/div/div[2]/div[2]/div[8]/div/span[2]", "xpath:idRelative"], - ["xpath=//div[8]/div/span[2]", "xpath:position"], + ["css=div:nth-child(7) .d-block:nth-child(2)", "css:finder"], + ["xpath=//div[@id='root']/div/main/div/section/div/div/section/div/div[2]/div[2]/div[7]/div/span[2]", "xpath:idRelative"], + ["xpath=//div[7]/div/span[2]", "xpath:position"], ["xpath=//span[contains(.,'PT1M')]", "xpath:innerText"] ], "value": "PT1M" diff --git a/backend/src/integration/resources/SHIBUI-1364-2.side b/backend/src/integration/resources/SHIBUI-1364-2.side index a0def58fd..f4e38e3ce 100644 --- a/backend/src/integration/resources/SHIBUI-1364-2.side +++ b/backend/src/integration/resources/SHIBUI-1364-2.side @@ -49,6 +49,13 @@ ["xpath=//button[contains(.,'Sign in')]", "xpath:innerText"] ], "value": "" + }, { + "id": "88da3c74-55d6-4ba8-84ae-4a950a10feb1", + "comment": "", + "command": "pause", + "target": "3000", + "targets": [], + "value": "" }, { "id": "b7783883-d1ad-41c9-a776-361f83e3209f", "comment": "", @@ -74,10 +81,12 @@ "id": "94e01321-ac2d-427f-89a5-7f816cea0f00", "comment": "", "command": "click", - "target": "xpath=(//button[@id='dropdown-basic'])[2]", + "target": "id=metadata-nav-dropdown-toggle", "targets": [ - ["xpath=(//button[@id='dropdown-basic'])[2]", "xpath:attributes"], - ["xpath=(//div[@id='basic-nav-dropdown']/button)[2]", "xpath:idRelative"], + ["id=metadata-nav-dropdown-toggle", "id"], + ["css=#metadata-nav-dropdown-toggle", "css:finder"], + ["xpath=//button[@id='metadata-nav-dropdown-toggle']", "xpath:attributes"], + ["xpath=//div[@id='metadata-nav-dropdown']/button", "xpath:idRelative"], ["xpath=//div[2]/button", "xpath:position"], ["xpath=//button[contains(.,'Add New')]", "xpath:innerText"] ], @@ -86,12 +95,14 @@ "id": "c65500ae-3b08-4c22-8c88-b4116d6e0c9b", "comment": "", "command": "click", - "target": "linkText=Add a new metadata provider", + "target": "id=metadata-nav-dropdown-provider", "targets": [ + ["id=metadata-nav-dropdown-provider", "id"], ["linkText=Add a new metadata provider", "linkText"], - ["css=.text-primary:nth-child(2)", "css:finder"], + ["css=#metadata-nav-dropdown-provider", "css:finder"], ["xpath=//a[contains(text(),'Add a new metadata provider')]", "xpath:link"], - ["xpath=//div[@id='basic-nav-dropdown']/div/a[2]", "xpath:idRelative"], + ["xpath=//a[@id='metadata-nav-dropdown-provider']", "xpath:attributes"], + ["xpath=//div[@id='metadata-nav-dropdown']/div/a[2]", "xpath:idRelative"], ["xpath=//a[contains(@href, '/metadata/provider/new')]", "xpath:href"], ["xpath=//a[2]", "xpath:position"], ["xpath=//a[contains(.,'Add a new metadata provider')]", "xpath:innerText"] @@ -123,6 +134,13 @@ ["xpath=//input", "xpath:position"] ], "value": "Filesystem Metadata Provider" + }, { + "id": "4f9521d5-75d5-488d-9d1b-521a48cfa508", + "comment": "", + "command": "waitForElementEditable", + "target": "name=type", + "targets": [], + "value": "30000" }, { "id": "8a575355-d9f6-455c-8ded-5a8cda8c8679", "comment": "", @@ -322,19 +340,6 @@ ["xpath=//li[3]/button", "xpath:position"] ], "value": "" - }, { - "id": "c5fbaf24-139b-4886-a437-ef41a695bbc9", - "comment": "", - "command": "click", - "target": "id=root_enabled", - "targets": [ - ["id=root_enabled", "id"], - ["css=#root_enabled", "css:finder"], - ["xpath=//input[@id='root_enabled']", "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/input", "xpath:idRelative"], - ["xpath=//input", "xpath:position"] - ], - "value": "" }, { "id": "7fcdaee3-5714-4c5a-93a7-b1b15c6b24e1", "comment": "", diff --git a/backend/src/integration/resources/SHIBUI-1364-3.side b/backend/src/integration/resources/SHIBUI-1364-3.side index 01d0ab58b..f27ff1dda 100644 --- a/backend/src/integration/resources/SHIBUI-1364-3.side +++ b/backend/src/integration/resources/SHIBUI-1364-3.side @@ -74,10 +74,12 @@ "id": "94e01321-ac2d-427f-89a5-7f816cea0f00", "comment": "", "command": "click", - "target": "xpath=(//button[@id='dropdown-basic'])[2]", + "target": "id=metadata-nav-dropdown-toggle", "targets": [ - ["xpath=(//button[@id='dropdown-basic'])[2]", "xpath:attributes"], - ["xpath=(//div[@id='basic-nav-dropdown']/button)[2]", "xpath:idRelative"], + ["id=metadata-nav-dropdown-toggle", "id"], + ["css=#metadata-nav-dropdown-toggle", "css:finder"], + ["xpath=//button[@id='metadata-nav-dropdown-toggle']", "xpath:attributes"], + ["xpath=//div[@id='metadata-nav-dropdown']/button", "xpath:idRelative"], ["xpath=//div[2]/button", "xpath:position"], ["xpath=//button[contains(.,'Add New')]", "xpath:innerText"] ], @@ -86,12 +88,14 @@ "id": "c65500ae-3b08-4c22-8c88-b4116d6e0c9b", "comment": "", "command": "click", - "target": "linkText=Add a new metadata provider", + "target": "id=metadata-nav-dropdown-provider", "targets": [ + ["id=metadata-nav-dropdown-provider", "id"], ["linkText=Add a new metadata provider", "linkText"], - ["css=.text-primary:nth-child(2)", "css:finder"], + ["css=#metadata-nav-dropdown-provider", "css:finder"], ["xpath=//a[contains(text(),'Add a new metadata provider')]", "xpath:link"], - ["xpath=//div[@id='basic-nav-dropdown']/div/a[2]", "xpath:idRelative"], + ["xpath=//a[@id='metadata-nav-dropdown-provider']", "xpath:attributes"], + ["xpath=//div[@id='metadata-nav-dropdown']/div/a[2]", "xpath:idRelative"], ["xpath=//a[contains(@href, '/metadata/provider/new')]", "xpath:href"], ["xpath=//a[2]", "xpath:position"], ["xpath=//a[contains(.,'Add a new metadata provider')]", "xpath:innerText"] @@ -123,6 +127,13 @@ ["xpath=//input", "xpath:position"] ], "value": "Local Dynamic Metadata Provider" + }, { + "id": "166ad43a-f000-4c20-813a-2e7255d863b8", + "comment": "", + "command": "waitForElementEditable", + "target": "name=type", + "targets": [], + "value": "30000" }, { "id": "aac150b1-6140-476b-8bdb-ebb83a14812d", "comment": "", @@ -399,19 +410,6 @@ ["xpath=//li[3]/button", "xpath:position"] ], "value": "" - }, { - "id": "d02ae356-8086-4794-97ba-980fc75cca79", - "comment": "", - "command": "click", - "target": "id=root_enabled", - "targets": [ - ["id=root_enabled", "id"], - ["css=#root_enabled", "css:finder"], - ["xpath=//input[@id='root_enabled']", "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/input", "xpath:idRelative"], - ["xpath=//input", "xpath:position"] - ], - "value": "" }, { "id": "dc60328b-d6e0-4f62-96c5-012f0fb5edc4", "comment": "", diff --git a/backend/src/integration/resources/SHIBUI-1364-4.side b/backend/src/integration/resources/SHIBUI-1364-4.side index 45011a7c0..47d036703 100644 --- a/backend/src/integration/resources/SHIBUI-1364-4.side +++ b/backend/src/integration/resources/SHIBUI-1364-4.side @@ -78,10 +78,12 @@ "id": "94e01321-ac2d-427f-89a5-7f816cea0f00", "comment": "", "command": "click", - "target": "xpath=(//button[@id='dropdown-basic'])[2]", + "target": "id=metadata-nav-dropdown-toggle", "targets": [ - ["xpath=(//button[@id='dropdown-basic'])[2]", "xpath:attributes"], - ["xpath=(//div[@id='basic-nav-dropdown']/button)[2]", "xpath:idRelative"], + ["id=metadata-nav-dropdown-toggle", "id"], + ["css=#metadata-nav-dropdown-toggle", "css:finder"], + ["xpath=//button[@id='metadata-nav-dropdown-toggle']", "xpath:attributes"], + ["xpath=//div[@id='metadata-nav-dropdown']/button", "xpath:idRelative"], ["xpath=//div[2]/button", "xpath:position"], ["xpath=//button[contains(.,'Add New')]", "xpath:innerText"] ], @@ -90,12 +92,14 @@ "id": "c65500ae-3b08-4c22-8c88-b4116d6e0c9b", "comment": "", "command": "click", - "target": "linkText=Add a new metadata provider", + "target": "id=metadata-nav-dropdown-provider", "targets": [ + ["id=metadata-nav-dropdown-provider", "id"], ["linkText=Add a new metadata provider", "linkText"], - ["css=.text-primary:nth-child(2)", "css:finder"], + ["css=#metadata-nav-dropdown-provider", "css:finder"], ["xpath=//a[contains(text(),'Add a new metadata provider')]", "xpath:link"], - ["xpath=//div[@id='basic-nav-dropdown']/div/a[2]", "xpath:idRelative"], + ["xpath=//a[@id='metadata-nav-dropdown-provider']", "xpath:attributes"], + ["xpath=//div[@id='metadata-nav-dropdown']/div/a[2]", "xpath:idRelative"], ["xpath=//a[contains(@href, '/metadata/provider/new')]", "xpath:href"], ["xpath=//a[2]", "xpath:position"], ["xpath=//a[contains(.,'Add a new metadata provider')]", "xpath:innerText"] @@ -632,19 +636,6 @@ ["xpath=//li[3]/button", "xpath:position"] ], "value": "" - }, { - "id": "c4d98111-537a-45a1-9bfd-e8d780a0c0b3", - "comment": "", - "command": "click", - "target": "id=root_enabled", - "targets": [ - ["id=root_enabled", "id"], - ["css=#root_enabled", "css:finder"], - ["xpath=//input[@id='root_enabled']", "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/input", "xpath:idRelative"], - ["xpath=//input", "xpath:position"] - ], - "value": "" }, { "id": "a57a12dd-b641-46eb-afce-4c7be5a8f180", "comment": "", @@ -792,19 +783,6 @@ ["xpath=//button[contains(.,'Add Entity ID  ')]", "xpath:innerText"] ], "value": "" - }, { - "id": "dff6b5d5-02ae-41a1-bae4-6ce39aeca199", - "comment": "", - "command": "click", - "target": "id=root_filterEnabled", - "targets": [ - ["id=root_filterEnabled", "id"], - ["css=#root_filterEnabled", "css:finder"], - ["xpath=//input[@id='root_filterEnabled']", "xpath:attributes"], - ["xpath=//div[@id='root']/div/main/div/section/div[2]/div/div[2]/div[2]/div[2]/div/form/div/div/div/div[5]/div/div/div/div/div/input", "xpath:idRelative"], - ["xpath=//div[5]/div/div/div/div/div/input", "xpath:position"] - ], - "value": "" }, { "id": "fdb8df7c-cb68-4c9a-9325-db6615591ff8", "comment": "",