From c766bf1c741d83c27abad95c23a043e539744627 Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Fri, 10 Mar 2017 14:29:42 +0100 Subject: [PATCH] SONAR-6315 do not rely on quality profile keys in ITs required for IT to work now that quality profile key is not based on the QP's name anymore --- it/it-tests/src/test/java/it/ui/UiTest.java | 2 +- .../QualityProfilesPageTest/should_copy.html | 6 +++--- .../QualityProfilesPageTest/should_delete.html | 12 ++++++------ .../should_display_changelog.html | 8 ++++---- .../should_display_list.html | 14 +++++++------- .../should_display_profile_exporters.html | 4 ++-- .../should_display_profile_inheritance.html | 4 ++-- .../should_display_profile_projects.html | 4 ++-- .../should_display_profile_rules.html | 4 ++-- .../should_open_from_list.html | 4 ++-- .../QualityProfilesPageTest/should_rename.html | 11 +++-------- .../should_set_default.html | 4 ++-- 12 files changed, 36 insertions(+), 41 deletions(-) diff --git a/it/it-tests/src/test/java/it/ui/UiTest.java b/it/it-tests/src/test/java/it/ui/UiTest.java index c197debb469..4c789853776 100644 --- a/it/it-tests/src/test/java/it/ui/UiTest.java +++ b/it/it-tests/src/test/java/it/ui/UiTest.java @@ -107,7 +107,7 @@ public class UiTest { .click(); // on profile page - assertThat(url()).contains("/profiles/show?key=xoo-basic"); + assertThat(url()).contains("/profiles/show"); $(".quality-profile-inheritance") .shouldBe(visible) .shouldHave(text("active rules")); diff --git a/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_copy.html b/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_copy.html index 16812ddbb28..d8ff976d04d 100644 --- a/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_copy.html +++ b/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_copy.html @@ -51,12 +51,12 @@ waitForElementPresent - css=.quality-profiles-table-name a[href^="/profiles/show?key=xoo-sample"] + css=table[data-language="xoo"] tr[data-name="sample"] .quality-profiles-table-name a click - css=.quality-profiles-table-name a[href^="/profiles/show?key=xoo-sample"] + css=table[data-language="xoo"] tr[data-name="sample"] .quality-profiles-table-name a @@ -101,7 +101,7 @@ waitForElementPresent - css=.quality-profiles-table-row[data-name="copied"] + css=table[data-language="xoo"] tr[data-name="copied"] diff --git a/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_delete.html b/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_delete.html index c83aa07fdfc..69e80a57c98 100644 --- a/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_delete.html +++ b/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_delete.html @@ -51,12 +51,12 @@ waitForElementPresent - css=.quality-profiles-table-name a[href^="/profiles/show?key=xoo-sample"] + css=table[data-language="xoo"] tr[data-name="sample"] .quality-profiles-table-name a click - css=.quality-profiles-table-name a[href^="/profiles/show?key=xoo-sample"] + css=table[data-language="xoo"] tr[data-name="sample"] .quality-profiles-table-name a @@ -86,12 +86,12 @@ waitForElementPresent - css=.quality-profiles-table-row[data-name="Basic"] + css=table[data-language="xoo"] tr[data-name="Basic"] waitForElementNotPresent - css=.quality-profiles-table-row[data-name="sample"] + css=table[data-language="xoo"] tr[data-name="sample"] @@ -101,12 +101,12 @@ waitForElementPresent - css=.quality-profiles-table-row[data-name="Basic"] + css=table[data-language="xoo"] tr[data-name="Basic"] assertElementNotPresent - css=.quality-profiles-table-row[data-name="sample"] + css=table[data-language="xoo"] tr[data-name="sample"] diff --git a/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_display_changelog.html b/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_display_changelog.html index 18851fbf8b5..8614c2fdab9 100644 --- a/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_display_changelog.html +++ b/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_display_changelog.html @@ -21,22 +21,22 @@ waitForElementPresent - css=.quality-profiles-table-name a[href^="/profiles/show?key=xoo-basic"] + css=table[data-language="xoo"] tr[data-name="Basic"] .quality-profiles-table-name a click - css=.quality-profiles-table-name a[href^="/profiles/show?key=xoo-basic"] + css=table[data-language="xoo"] tr[data-name="Basic"] .quality-profiles-table-name a waitForElementPresent - css=a[href^="/profiles/changelog?key=xoo-basic"] + css=a[href^="/profiles/changelog"] click - css=a[href^="/profiles/changelog?key=xoo-basic"] + css=a[href^="/profiles/changelog"] diff --git a/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_display_list.html b/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_display_list.html index 05a3d763f2b..9e3cf206099 100644 --- a/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_display_list.html +++ b/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_display_list.html @@ -35,37 +35,37 @@ assertElementPresent - css=.quality-profiles-table-row[data-key^="xoo-basic"] + css=table[data-language="xoo"] tr[data-name="Basic"] assertText - css=.quality-profiles-table-row[data-key^="xoo-basic"] .quality-profiles-table-name + css=table[data-language="xoo"] tr[data-name="Basic"] .quality-profiles-table-name *Basic* assertText - css=.quality-profiles-table-row[data-key^="xoo-basic"] .quality-profiles-table-projects + css=table[data-language="xoo"] tr[data-name="Basic"] .quality-profiles-table-projects *Default* assertText - css=.quality-profiles-table-row[data-key^="xoo-basic"] .quality-profiles-table-rules + css=table[data-language="xoo"] tr[data-name="Basic"] .quality-profiles-table-rules *1* assertElementPresent - css=.quality-profiles-table-row[data-key^="xoo-basic"] .quality-profiles-table-rules a[href^="/coding_rules#qprofile=xoo-basic"] + css=table[data-language="xoo"] tr[data-name="Basic"] .quality-profiles-table-rules a[href^="/coding_rules#qprofile"] assertText - css=.quality-profiles-table-row[data-key^="xoo-empty"] .quality-profiles-table-projects + css=table[data-language="xoo"] tr[data-name="empty"] .quality-profiles-table-projects *0* assertText - css=.quality-profiles-table-row[data-key^="xoo2-basic"] .quality-profiles-table-name + css=table[data-language="xoo2"] tr[data-name="Basic"] .quality-profiles-table-name *Basic* diff --git a/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_display_profile_exporters.html b/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_display_profile_exporters.html index aaabd19baac..ea8b1d321f1 100644 --- a/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_display_profile_exporters.html +++ b/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_display_profile_exporters.html @@ -21,12 +21,12 @@ waitForElementPresent - css=.quality-profiles-table-name a[href^="/profiles/show?key=xoo-sample"] + css=table[data-language="xoo"] tr[data-name="sample"] .quality-profiles-table-name a click - css=.quality-profiles-table-name a[href^="/profiles/show?key=xoo-sample"] + css=table[data-language="xoo"] tr[data-name="sample"] .quality-profiles-table-name a diff --git a/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_display_profile_inheritance.html b/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_display_profile_inheritance.html index 22477a9b4d4..501ae5b5df8 100644 --- a/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_display_profile_inheritance.html +++ b/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_display_profile_inheritance.html @@ -21,12 +21,12 @@ waitForElementPresent - css=.quality-profiles-table-name a[href^="/profiles/show?key=xoo-sample"] + css=table[data-language="xoo"] tr[data-name="sample"] .quality-profiles-table-name a click - css=.quality-profiles-table-name a[href^="/profiles/show?key=xoo-sample"] + css=table[data-language="xoo"] tr[data-name="sample"] .quality-profiles-table-name a diff --git a/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_display_profile_projects.html b/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_display_profile_projects.html index fba5742452a..ff38495e318 100644 --- a/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_display_profile_projects.html +++ b/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_display_profile_projects.html @@ -21,12 +21,12 @@ waitForElementPresent - css=.quality-profiles-table-name a[href^="/profiles/show?key=xoo-sample"] + css=table[data-language="xoo"] tr[data-name="sample"] .quality-profiles-table-name a click - css=.quality-profiles-table-name a[href^="/profiles/show?key=xoo-sample"] + css=table[data-language="xoo"] tr[data-name="sample"] .quality-profiles-table-name a diff --git a/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_display_profile_rules.html b/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_display_profile_rules.html index 9819f42bdec..eb5ccf3194b 100644 --- a/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_display_profile_rules.html +++ b/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_display_profile_rules.html @@ -21,12 +21,12 @@ waitForElementPresent - css=.quality-profiles-table-name a[href^="/profiles/show?key=xoo-basic"] + css=table[data-language="xoo"] tr[data-name="Basic"] .quality-profiles-table-name a click - css=.quality-profiles-table-name a[href^="/profiles/show?key=xoo-basic"] + css=table[data-language="xoo"] tr[data-name="Basic"] .quality-profiles-table-name a diff --git a/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_open_from_list.html b/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_open_from_list.html index a41de0e79c7..de19c00a017 100644 --- a/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_open_from_list.html +++ b/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_open_from_list.html @@ -20,12 +20,12 @@ waitForElementPresent - css=.quality-profiles-table-row[data-key^="xoo-basic"] + css=table[data-language="xoo"] tr[data-name="Basic"] click - css=.quality-profiles-table-row[data-key^="xoo-basic"] .quality-profiles-table-name a + css=table[data-language="xoo"] tr[data-name="Basic"] .quality-profiles-table-name a diff --git a/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_rename.html b/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_rename.html index d86dbc2040c..7f533d09f36 100644 --- a/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_rename.html +++ b/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_rename.html @@ -51,12 +51,12 @@ waitForElementPresent - css=.quality-profiles-table-name a[href^="/profiles/show?key=xoo-sample"] + css=table[data-language="xoo"] tr[data-name="sample"] .quality-profiles-table-name a click - css=.quality-profiles-table-name a[href^="/profiles/show?key=xoo-sample"] + css=table[data-language="xoo"] tr[data-name="sample"] .quality-profiles-table-name a @@ -101,12 +101,7 @@ waitForElementPresent - css=.quality-profiles-table-name a[href^="/profiles/show?key=xoo-sample"] - - - - assertElementPresent - css=.quality-profiles-table-row[data-name="new name"] + css=table[data-language="xoo"] tr[data-name="new name"] .quality-profiles-table-name a diff --git a/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_set_default.html b/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_set_default.html index 9d514aa3c86..3f1d0db80a4 100644 --- a/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_set_default.html +++ b/it/it-tests/src/test/resources/qualityProfile/QualityProfilesPageTest/should_set_default.html @@ -51,12 +51,12 @@ waitForElementPresent - css=.quality-profiles-table-name a[href^="/profiles/show?key=xoo-sample"] + css=table[data-language="xoo"] tr[data-name="sample"] .quality-profiles-table-name a click - css=.quality-profiles-table-name a[href^="/profiles/show?key=xoo-sample"] + css=table[data-language="xoo"] tr[data-name="sample"] .quality-profiles-table-name a -- 2.39.5