From 608effb9a840e9e3b171c2cfd48e084f104d73f1 Mon Sep 17 00:00:00 2001 From: Bill Smith Date: Tue, 8 Oct 2019 17:27:01 -0700 Subject: [PATCH] SHIBUI-1437 Selenium updates WIP --- .../admin/ui/SeleniumSIDETest.groovy | 10 +++--- .../integration/resources/SHIBUI-1281.side | 32 ++++++++++--------- .../integration/resources/SHIBUI-1333.side | 32 ++++++++++--------- .../integration/resources/SHIBUI-1334-1.side | 32 ++++++++++--------- .../integration/resources/SHIBUI-1361.side | 24 ++++++++++---- .../integration/resources/SHIBUI-1385-1.side | 32 ++++++++++--------- 6 files changed, 90 insertions(+), 72 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 75b178d6b..2a9969ff6 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 @@ -88,21 +88,21 @@ class SeleniumSIDETest extends Specification { // TODO: Uncomment the below commented tests once they've been updated to use the new configuration screen where: name | file -// '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' 'SHIBUI-1352: Create FileSystem provider' | '/SHIBUI-1352-2.side' -// 'SHIBUI-1333: Verify metadata source configuration' | '/SHIBUI-1333.side' -// 'SHIBUI-1334: Verify metadata source versioning' | '/SHIBUI-1334-1.side' + 'SHIBUI-1333: Verify metadata source configuration' | '/SHIBUI-1333.side' + 'SHIBUI-1334: Verify metadata source versioning' | '/SHIBUI-1334-1.side' // 'SHIBUI-1334: Verify metadata provider versioning' | '/SHIBUI-1334-2.side' 'SHIBUI-1335: Verify File Backed HTTP Metadata Provider Filters' | '/SHIBUI-1335-1.side' 'SHIBUI-1335: Verify Filesystem Metadata Provider Filters' | '/SHIBUI-1335-2.side' 'SHIBUI-1335: Verify Local Dynamic Metadata Provider Filters' | '/SHIBUI-1335-3.side' 'SHIBUI-1335: Verify Dynamic HTTP Metadata Provider Filters' | '/SHIBUI-1335-4.side' 'SHIBUI-1392: Verify provider with script filter is persistable' | '/SHIBUI-1392.side' -// 'SHIBUI-1361: Verify dates display in proper format' | '/SHIBUI-1361.side' -// 'SHIBUI-1385: Restore a metadata source version' | '/SHIBUI-1385-1.side' + 'SHIBUI-1361: Verify dates display in proper format' | '/SHIBUI-1361.side' + 'SHIBUI-1385: Restore a metadata source version' | '/SHIBUI-1385-1.side' // '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' diff --git a/backend/src/integration/resources/SHIBUI-1281.side b/backend/src/integration/resources/SHIBUI-1281.side index 00502648f..1c2e25d80 100644 --- a/backend/src/integration/resources/SHIBUI-1281.side +++ b/backend/src/integration/resources/SHIBUI-1281.side @@ -1768,10 +1768,11 @@ "id": "3baa7bd3-55c0-4d10-8aa3-c0daa63ec4d4", "comment": "", "command": "assertText", - "target": "css=.px-3 > summary-property:nth-child(2) > .mb-3 > .d-block:nth-child(2)", + "target": "css=.d-block > primitive-property:nth-child(1) .text-truncate", "targets": [ - ["css=.px-3 > summary-property:nth-child(2) > .mb-3 > .d-block:nth-child(2)", "css:finder"], - ["xpath=//summary-property/div/span", "xpath:position"], + ["css=.d-block > primitive-property:nth-child(1) .text-truncate", "css:finder"], + ["xpath=//metadata-configuration[@id='configuration']/div/section/div/div[2]/object-property/primitive-property/div/div/span[2]", "xpath:idRelative"], + ["xpath=//div/span[2]", "xpath:position"], ["xpath=//span[contains(.,'test-1234')]", "xpath:innerText"] ], "value": "test-1234" @@ -1779,34 +1780,35 @@ "id": "0d355ff0-0449-49a7-ae75-14d7c405b97c", "comment": "", "command": "assertText", - "target": "css=.px-3:nth-child(2) > summary-property:nth-child(2) tr:nth-child(2) > td:nth-child(1)", + "target": "css=.mb-4:nth-child(7) .py-2:nth-child(3) > .d-flex:nth-child(1) > .text-truncate", "targets": [ - ["css=.px-3:nth-child(2) > summary-property:nth-child(2) tr:nth-child(2) > td:nth-child(1)", "css:finder"], - ["xpath=//div[2]/section[2]/summary-property/div/table/tbody/tr[2]/td", "xpath:position"], - ["xpath=//td[contains(.,'http://test.org/assert2')]", "xpath:innerText"] + ["css=.mb-4:nth-child(7) .py-2:nth-child(3) > .d-flex:nth-child(1) > .text-truncate", "css:finder"], + ["xpath=//metadata-configuration[@id='configuration']/div/section[7]/div/div[2]/object-property/array-property/div/div[3]/div/div[2]", "xpath:idRelative"], + ["xpath=//section[7]/div/div[2]/object-property/array-property/div/div[3]/div/div[2]", "xpath:position"] ], "value": "http://test.org/assert2" }, { "id": "e53030b6-f344-4361-981d-b8303a721c5d", "comment": "", "command": "assertText", - "target": "css=summary-property:nth-child(2) > .mb-3 > .list-unstyled > li:nth-child(5)", + "target": "css=array-property:nth-child(8) .border-0", "targets": [ - ["css=summary-property:nth-child(2) > .mb-3 > .list-unstyled > li:nth-child(5)", "css:finder"], - ["xpath=//li[5]", "xpath:position"], - ["xpath=//li[contains(.,'somethingElse')]", "xpath:innerText"] + ["css=array-property:nth-child(8) .border-0", "css:finder"], + ["xpath=//metadata-configuration[@id='configuration']/div/section[8]/div/div[2]/object-property/object-property/array-property/div/ul/li[5]", "xpath:idRelative"], + ["xpath=//section[8]/div/div[2]/object-property/object-property/array-property/div/ul/li[5]", "xpath:position"] ], "value": "somethingElse" }, { "id": "18636780-2feb-458f-97be-cf4a625b22e1", "comment": "", "command": "assertText", - "target": "css=summary-property:nth-child(10) .d-block:nth-child(2)", + "target": "css=.d-flex:nth-child(5) > .py-2 > span", "targets": [ - ["css=summary-property:nth-child(10) .d-block:nth-child(2)", "css:finder"], - ["xpath=//summary-property[10]/div/span", "xpath:position"] + ["css=.d-flex:nth-child(5) > .py-2 > span", "css:finder"], + ["xpath=//metadata-configuration[@id='configuration']/div/section[9]/div/div[2]/object-property/array-property/div/div[5]/div/span", "xpath:idRelative"], + ["xpath=//div/div[5]/div/span", "xpath:position"] ], - "value": "true" + "value": "True" }, { "id": "1406d7e4-907d-4359-8de8-a40206f0993e", "comment": "", diff --git a/backend/src/integration/resources/SHIBUI-1333.side b/backend/src/integration/resources/SHIBUI-1333.side index 78143b150..6bd0d2c8f 100644 --- a/backend/src/integration/resources/SHIBUI-1333.side +++ b/backend/src/integration/resources/SHIBUI-1333.side @@ -1768,10 +1768,11 @@ "id": "3baa7bd3-55c0-4d10-8aa3-c0daa63ec4d4", "comment": "", "command": "assertText", - "target": "css=.px-3 > summary-property:nth-child(2) > .mb-3 > .d-block:nth-child(2)", + "target": "css=.d-block > primitive-property:nth-child(1) .text-truncate", "targets": [ - ["css=.px-3 > summary-property:nth-child(2) > .mb-3 > .d-block:nth-child(2)", "css:finder"], - ["xpath=//summary-property/div/span", "xpath:position"], + ["css=.d-block > primitive-property:nth-child(1) .text-truncate", "css:finder"], + ["xpath=//metadata-configuration[@id='configuration']/div/section/div/div[2]/object-property/primitive-property/div/div/span[2]", "xpath:idRelative"], + ["xpath=//div/span[2]", "xpath:position"], ["xpath=//span[contains(.,'test-1234')]", "xpath:innerText"] ], "value": "test-1234" @@ -1779,34 +1780,35 @@ "id": "0d355ff0-0449-49a7-ae75-14d7c405b97c", "comment": "", "command": "assertText", - "target": "css=.px-3:nth-child(2) > summary-property:nth-child(2) tr:nth-child(2) > td:nth-child(1)", + "target": "css=.mb-4:nth-child(7) .py-2:nth-child(3) > .d-flex:nth-child(1) > .text-truncate", "targets": [ - ["css=.px-3:nth-child(2) > summary-property:nth-child(2) tr:nth-child(2) > td:nth-child(1)", "css:finder"], - ["xpath=//div[2]/section[2]/summary-property/div/table/tbody/tr[2]/td", "xpath:position"], - ["xpath=//td[contains(.,'http://test.org/assert2')]", "xpath:innerText"] + ["css=.mb-4:nth-child(7) .py-2:nth-child(3) > .d-flex:nth-child(1) > .text-truncate", "css:finder"], + ["xpath=//metadata-configuration[@id='configuration']/div/section[7]/div/div[2]/object-property/array-property/div/div[3]/div/div[2]", "xpath:idRelative"], + ["xpath=//section[7]/div/div[2]/object-property/array-property/div/div[3]/div/div[2]", "xpath:position"] ], "value": "http://test.org/assert2" }, { "id": "e53030b6-f344-4361-981d-b8303a721c5d", "comment": "", "command": "assertText", - "target": "css=summary-property:nth-child(2) > .mb-3 > .list-unstyled > li:nth-child(5)", + "target": "css=array-property:nth-child(8) .border-0", "targets": [ - ["css=summary-property:nth-child(2) > .mb-3 > .list-unstyled > li:nth-child(5)", "css:finder"], - ["xpath=//li[5]", "xpath:position"], - ["xpath=//li[contains(.,'somethingElse')]", "xpath:innerText"] + ["css=array-property:nth-child(8) .border-0", "css:finder"], + ["xpath=//metadata-configuration[@id='configuration']/div/section[8]/div/div[2]/object-property/object-property/array-property/div/ul/li[5]", "xpath:idRelative"], + ["xpath=//section[8]/div/div[2]/object-property/object-property/array-property/div/ul/li[5]", "xpath:position"] ], "value": "somethingElse" }, { "id": "18636780-2feb-458f-97be-cf4a625b22e1", "comment": "", "command": "assertText", - "target": "css=summary-property:nth-child(10) .d-block:nth-child(2)", + "target": "css=.d-flex:nth-child(5) > .py-2 > span", "targets": [ - ["css=summary-property:nth-child(10) .d-block:nth-child(2)", "css:finder"], - ["xpath=//summary-property[10]/div/span", "xpath:position"] + ["css=.d-flex:nth-child(5) > .py-2 > span", "css:finder"], + ["xpath=//metadata-configuration[@id='configuration']/div/section[9]/div/div[2]/object-property/array-property/div/div[5]/div/span", "xpath:idRelative"], + ["xpath=//div/div[5]/div/span", "xpath:position"] ], - "value": "true" + "value": "True" }, { "id": "1406d7e4-907d-4359-8de8-a40206f0993e", "comment": "", diff --git a/backend/src/integration/resources/SHIBUI-1334-1.side b/backend/src/integration/resources/SHIBUI-1334-1.side index 664dcaad0..09f5ade14 100644 --- a/backend/src/integration/resources/SHIBUI-1334-1.side +++ b/backend/src/integration/resources/SHIBUI-1334-1.side @@ -1768,10 +1768,11 @@ "id": "3baa7bd3-55c0-4d10-8aa3-c0daa63ec4d4", "comment": "", "command": "assertText", - "target": "css=.px-3 > summary-property:nth-child(2) > .mb-3 > .d-block:nth-child(2)", + "target": "css=.d-block > primitive-property:nth-child(1) .text-truncate", "targets": [ - ["css=.px-3 > summary-property:nth-child(2) > .mb-3 > .d-block:nth-child(2)", "css:finder"], - ["xpath=//summary-property/div/span", "xpath:position"], + ["css=.d-block > primitive-property:nth-child(1) .text-truncate", "css:finder"], + ["xpath=//metadata-configuration[@id='configuration']/div/section/div/div[2]/object-property/primitive-property/div/div/span[2]", "xpath:idRelative"], + ["xpath=//div/span[2]", "xpath:position"], ["xpath=//span[contains(.,'test-1234')]", "xpath:innerText"] ], "value": "test-1234" @@ -1779,34 +1780,35 @@ "id": "0d355ff0-0449-49a7-ae75-14d7c405b97c", "comment": "", "command": "assertText", - "target": "css=.px-3:nth-child(2) > summary-property:nth-child(2) tr:nth-child(2) > td:nth-child(1)", + "target": "css=.mb-4:nth-child(7) .py-2:nth-child(3) > .d-flex:nth-child(1) > .text-truncate", "targets": [ - ["css=.px-3:nth-child(2) > summary-property:nth-child(2) tr:nth-child(2) > td:nth-child(1)", "css:finder"], - ["xpath=//div[2]/section[2]/summary-property/div/table/tbody/tr[2]/td", "xpath:position"], - ["xpath=//td[contains(.,'http://test.org/assert2')]", "xpath:innerText"] + ["css=.mb-4:nth-child(7) .py-2:nth-child(3) > .d-flex:nth-child(1) > .text-truncate", "css:finder"], + ["xpath=//metadata-configuration[@id='configuration']/div/section[7]/div/div[2]/object-property/array-property/div/div[3]/div/div[2]", "xpath:idRelative"], + ["xpath=//section[7]/div/div[2]/object-property/array-property/div/div[3]/div/div[2]", "xpath:position"] ], "value": "http://test.org/assert2" }, { "id": "e53030b6-f344-4361-981d-b8303a721c5d", "comment": "", "command": "assertText", - "target": "css=summary-property:nth-child(2) > .mb-3 > .list-unstyled > li:nth-child(5)", + "target": "css=array-property:nth-child(8) .border-0", "targets": [ - ["css=summary-property:nth-child(2) > .mb-3 > .list-unstyled > li:nth-child(5)", "css:finder"], - ["xpath=//li[5]", "xpath:position"], - ["xpath=//li[contains(.,'somethingElse')]", "xpath:innerText"] + ["css=array-property:nth-child(8) .border-0", "css:finder"], + ["xpath=//metadata-configuration[@id='configuration']/div/section[8]/div/div[2]/object-property/object-property/array-property/div/ul/li[5]", "xpath:idRelative"], + ["xpath=//section[8]/div/div[2]/object-property/object-property/array-property/div/ul/li[5]", "xpath:position"] ], "value": "somethingElse" }, { "id": "18636780-2feb-458f-97be-cf4a625b22e1", "comment": "", "command": "assertText", - "target": "css=summary-property:nth-child(10) .d-block:nth-child(2)", + "target": "css=.d-flex:nth-child(5) > .py-2 > span", "targets": [ - ["css=summary-property:nth-child(10) .d-block:nth-child(2)", "css:finder"], - ["xpath=//summary-property[10]/div/span", "xpath:position"] + ["css=.d-flex:nth-child(5) > .py-2 > span", "css:finder"], + ["xpath=//metadata-configuration[@id='configuration']/div/section[9]/div/div[2]/object-property/array-property/div/div[5]/div/span", "xpath:idRelative"], + ["xpath=//div/div[5]/div/span", "xpath:position"] ], - "value": "true" + "value": "True" }, { "id": "1406d7e4-907d-4359-8de8-a40206f0993e", "comment": "", diff --git a/backend/src/integration/resources/SHIBUI-1361.side b/backend/src/integration/resources/SHIBUI-1361.side index a406e46d7..45a9f12c5 100644 --- a/backend/src/integration/resources/SHIBUI-1361.side +++ b/backend/src/integration/resources/SHIBUI-1361.side @@ -81,9 +81,9 @@ ], "value": "" }, { - "id": "b49d6ed7-75ea-4be8-9a79-c7fd83287aa0", + "id": "55a876d6-70b7-46f6-aab1-7efacb79156f", "comment": "", - "command": "click", + "command": "waitForElementEditable", "target": "id=/name", "targets": [ ["id=/name", "id"], @@ -92,7 +92,7 @@ ["xpath=//input[@id='/name']", "xpath:attributes"], ["xpath=//input", "xpath:position"] ], - "value": "" + "value": "30000" }, { "id": "54dc29f7-bbe0-4c2b-a76e-e67a61f57a96", "comment": "", @@ -545,15 +545,25 @@ "id": "52f5680c-c63d-411e-8332-52901f12ea3b", "comment": "", "command": "assertText", - "target": "css=.px-3:nth-child(1) > summary-property:nth-child(2) > .mb-3 > .d-block:nth-child(2)", - "targets": [], + "target": "css=.mb-4:nth-child(1) primitive-property:nth-child(1) .d-block:nth-child(2)", + "targets": [ + ["css=.mb-4:nth-child(1) primitive-property:nth-child(1) .d-block:nth-child(2)", "css:finder"], + ["xpath=//metadata-configuration[@id='configuration']/div/section/div/div[2]/object-property/primitive-property/div/div/span[2]", "xpath:idRelative"], + ["xpath=//div/span[2]", "xpath:position"], + ["xpath=//span[contains(.,'Test Metadata Provider')]", "xpath:innerText"] + ], "value": "Test Metadata Provider" }, { "id": "67ff44aa-1efd-4b13-a0e9-3648a09911dd", "comment": "", "command": "assertText", - "target": "css=.px-3:nth-child(2) > summary-property:nth-child(2) > .mb-3 > .d-block:nth-child(2)", - "targets": [], + "target": "css=.mb-4:nth-child(2) primitive-property:nth-child(1) .d-block:nth-child(2)", + "targets": [ + ["css=.mb-4:nth-child(2) primitive-property:nth-child(1) .d-block:nth-child(2)", "css:finder"], + ["xpath=//metadata-configuration[@id='configuration']/div/section[2]/div/div[2]/object-property/primitive-property/div/div/span[2]", "xpath:idRelative"], + ["xpath=//section[2]/div/div[2]/object-property/primitive-property/div/div/span[2]", "xpath:position"], + ["xpath=//span[contains(.,'123')]", "xpath:innerText"] + ], "value": "123" }, { "id": "f5197d46-41a7-4ef2-ac40-19f80c953929", diff --git a/backend/src/integration/resources/SHIBUI-1385-1.side b/backend/src/integration/resources/SHIBUI-1385-1.side index af7a78773..50a9c9210 100644 --- a/backend/src/integration/resources/SHIBUI-1385-1.side +++ b/backend/src/integration/resources/SHIBUI-1385-1.side @@ -1775,10 +1775,11 @@ "id": "3baa7bd3-55c0-4d10-8aa3-c0daa63ec4d4", "comment": "", "command": "assertText", - "target": "css=.px-3 > summary-property:nth-child(2) > .mb-3 > .d-block:nth-child(2)", + "target": "css=.d-block > primitive-property:nth-child(1) .text-truncate", "targets": [ - ["css=.px-3 > summary-property:nth-child(2) > .mb-3 > .d-block:nth-child(2)", "css:finder"], - ["xpath=//summary-property/div/span", "xpath:position"], + ["css=.d-block > primitive-property:nth-child(1) .text-truncate", "css:finder"], + ["xpath=//metadata-configuration[@id='configuration']/div/section/div/div[2]/object-property/primitive-property/div/div/span[2]", "xpath:idRelative"], + ["xpath=//div/span[2]", "xpath:position"], ["xpath=//span[contains(.,'test-1234')]", "xpath:innerText"] ], "value": "test-1234" @@ -1786,34 +1787,35 @@ "id": "0d355ff0-0449-49a7-ae75-14d7c405b97c", "comment": "", "command": "assertText", - "target": "css=.px-3:nth-child(2) > summary-property:nth-child(2) tr:nth-child(2) > td:nth-child(1)", + "target": "css=.mb-4:nth-child(7) .py-2:nth-child(3) > .d-flex:nth-child(1) > .text-truncate", "targets": [ - ["css=.px-3:nth-child(2) > summary-property:nth-child(2) tr:nth-child(2) > td:nth-child(1)", "css:finder"], - ["xpath=//div[2]/section[2]/summary-property/div/table/tbody/tr[2]/td", "xpath:position"], - ["xpath=//td[contains(.,'http://test.org/assert2')]", "xpath:innerText"] + ["css=.mb-4:nth-child(7) .py-2:nth-child(3) > .d-flex:nth-child(1) > .text-truncate", "css:finder"], + ["xpath=//metadata-configuration[@id='configuration']/div/section[7]/div/div[2]/object-property/array-property/div/div[3]/div/div[2]", "xpath:idRelative"], + ["xpath=//section[7]/div/div[2]/object-property/array-property/div/div[3]/div/div[2]", "xpath:position"] ], "value": "http://test.org/assert2" }, { "id": "e53030b6-f344-4361-981d-b8303a721c5d", "comment": "", "command": "assertText", - "target": "css=summary-property:nth-child(2) > .mb-3 > .list-unstyled > li:nth-child(5)", + "target": "css=array-property:nth-child(8) .border-0", "targets": [ - ["css=summary-property:nth-child(2) > .mb-3 > .list-unstyled > li:nth-child(5)", "css:finder"], - ["xpath=//li[5]", "xpath:position"], - ["xpath=//li[contains(.,'somethingElse')]", "xpath:innerText"] + ["css=array-property:nth-child(8) .border-0", "css:finder"], + ["xpath=//metadata-configuration[@id='configuration']/div/section[8]/div/div[2]/object-property/object-property/array-property/div/ul/li[5]", "xpath:idRelative"], + ["xpath=//section[8]/div/div[2]/object-property/object-property/array-property/div/ul/li[5]", "xpath:position"] ], "value": "somethingElse" }, { "id": "18636780-2feb-458f-97be-cf4a625b22e1", "comment": "", "command": "assertText", - "target": "css=summary-property:nth-child(10) .d-block:nth-child(2)", + "target": "css=.d-flex:nth-child(5) > .py-2 > span", "targets": [ - ["css=summary-property:nth-child(10) .d-block:nth-child(2)", "css:finder"], - ["xpath=//summary-property[10]/div/span", "xpath:position"] + ["css=.d-flex:nth-child(5) > .py-2 > span", "css:finder"], + ["xpath=//metadata-configuration[@id='configuration']/div/section[9]/div/div[2]/object-property/array-property/div/div[5]/div/span", "xpath:idRelative"], + ["xpath=//div/div[5]/div/span", "xpath:position"] ], - "value": "true" + "value": "True" }, { "id": "1406d7e4-907d-4359-8de8-a40206f0993e", "comment": "",