diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2017-03-27 14:00:14 +0200 |
---|---|---|
committer | Stas Vilchik <stas-vilchik@users.noreply.github.com> | 2017-04-03 10:38:52 +0200 |
commit | 32a73efa05cb12056a93f08b9124e647213f1f02 (patch) | |
tree | 89c545631a613d2041383b5143afb0e040c327e0 /it | |
parent | be8738ea1e0322d81e238c4462c7ec6f22d2177c (diff) | |
download | sonarqube-32a73efa05cb12056a93f08b9124e647213f1f02.tar.gz sonarqube-32a73efa05cb12056a93f08b9124e647213f1f02.zip |
SONAR-9008 support quality profiles for organizations
Diffstat (limited to 'it')
18 files changed, 1466 insertions, 1 deletions
diff --git a/it/it-tests/src/test/java/it/Category5Suite.java b/it/it-tests/src/test/java/it/Category5Suite.java index 9050e43e2a2..5bd6f18cc49 100644 --- a/it/it-tests/src/test/java/it/Category5Suite.java +++ b/it/it-tests/src/test/java/it/Category5Suite.java @@ -20,6 +20,7 @@ package it; import it.organization.OrganizationMembershipTest; +import it.organization.OrganizationQualityProfilesPageTest; import it.serverSystem.ClusterTest; import it.serverSystem.RestartTest; import it.serverSystem.ServerSystemRestartingOrchestrator; @@ -47,7 +48,8 @@ import org.junit.runners.Suite; UpdateCenterTest.class, RealmAuthenticationTest.class, SsoAuthenticationTest.class, - OrganizationMembershipTest.class + OrganizationMembershipTest.class, + OrganizationQualityProfilesPageTest.class }) public class Category5Suite { diff --git a/it/it-tests/src/test/java/it/organization/OrganizationQualityProfilesPageTest.java b/it/it-tests/src/test/java/it/organization/OrganizationQualityProfilesPageTest.java new file mode 100644 index 00000000000..3cabbe545d0 --- /dev/null +++ b/it/it-tests/src/test/java/it/organization/OrganizationQualityProfilesPageTest.java @@ -0,0 +1,206 @@ +/* + * SonarQube + * Copyright (C) 2009-2017 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package it.organization; + +import com.codeborne.selenide.Condition; +import com.sonar.orchestrator.Orchestrator; +import com.sonar.orchestrator.build.SonarScanner; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.ClassRule; +import org.junit.Ignore; +import org.junit.Test; +import org.sonarqube.ws.client.PostRequest; +import org.sonarqube.ws.client.WsClient; +import org.sonarqube.ws.client.organization.CreateWsRequest; +import pageobjects.Navigation; + +import static com.codeborne.selenide.Selenide.$; +import static java.util.Collections.emptyMap; +import static util.ItUtils.newAdminWsClient; +import static util.ItUtils.projectDir; +import static util.ItUtils.xooPlugin; +import static util.selenium.Selenese.runSelenese; + +public class OrganizationQualityProfilesPageTest { + + @ClassRule + public static final Orchestrator orchestrator = Orchestrator.builderEnv() + .addPlugin(xooPlugin()) + .build(); + + private static WsClient adminWsClient; + private static final String ORGANIZATION = "test-org"; + + @BeforeClass + public static void setUp() { + adminWsClient = newAdminWsClient(orchestrator); + orchestrator.resetData(); + orchestrator.getServer().post("api/organizations/enable_support", emptyMap()); + createOrganization(); + } + + @Before + public void createSampleProfile() { + createProfile("xoo", "sample"); + inheritProfile("xoo", "sample", "Basic"); + analyzeProject("shared/xoo-sample"); + addProfileToProject("xoo", "sample", "sample"); + } + + @After + public void deleteSampleProfile() { + setDefault("xoo", "Basic"); + deleteProfile("xoo", "sample"); + deleteProfile("xoo", "new name"); + } + + @Test + public void testNoGlobalPage(){ + Navigation nav = Navigation.get(orchestrator); + nav.open("/profiles"); + $(".page-wrapper-simple").should(Condition.visible); + } + + @Test + public void testHomePage() throws Exception { + runSelenese(orchestrator, + "/organization/OrganizationQualityProfilesPageTest/should_display_list.html", + "/organization/OrganizationQualityProfilesPageTest/should_open_from_list.html", + "/organization/OrganizationQualityProfilesPageTest/should_filter_by_language.html"); + } + + @Test + public void testProfilePage() throws Exception { + runSelenese(orchestrator, + "/organization/OrganizationQualityProfilesPageTest/should_display_profile_rules.html", + "/organization/OrganizationQualityProfilesPageTest/should_display_profile_inheritance.html", + "/organization/OrganizationQualityProfilesPageTest/should_display_profile_projects.html", + "/organization/OrganizationQualityProfilesPageTest/should_display_profile_exporters.html"); + } + + @Test + public void testNotFound() { + Navigation nav = Navigation.get(orchestrator); + nav.open("/organizations/test-org/quality_profiles/show?key=unknown"); + $(".quality-profile-not-found").should(Condition.visible); + } + + @Test + public void testProfileChangelog() throws Exception { + runSelenese(orchestrator, + "/organization/OrganizationQualityProfilesPageTest/should_display_changelog.html"); + } + + @Ignore("find a way to know profile key inside selenium tests") + @Test + public void testComparison() throws Exception { + runSelenese(orchestrator, "/organization/OrganizationQualityProfilesPageTest/should_compare.html"); + } + + @Test + public void testCreation() throws Exception { + runSelenese(orchestrator, "/organization/OrganizationQualityProfilesPageTest/should_create.html"); + } + + @Test + public void testDeletion() throws Exception { + runSelenese(orchestrator, "/organization/OrganizationQualityProfilesPageTest/should_delete.html"); + } + + @Test + public void testCopying() throws Exception { + runSelenese(orchestrator, "/organization/OrganizationQualityProfilesPageTest/should_copy.html"); + } + + @Test + public void testRenaming() throws Exception { + runSelenese(orchestrator, "/organization/OrganizationQualityProfilesPageTest/should_rename.html"); + } + + @Test + public void testSettingDefault() throws Exception { + runSelenese(orchestrator, "/organization/OrganizationQualityProfilesPageTest/should_set_default.html"); + } + + @Test + public void testRestoration() throws Exception { + deleteProfile("xoo", "empty"); + + runSelenese(orchestrator, + "/organization/OrganizationQualityProfilesPageTest/should_restore.html", + "/organization/OrganizationQualityProfilesPageTest/should_restore_built_in.html"); + } + + private static void createProfile(String language, String name) { + adminWsClient.wsConnector().call( + new PostRequest("api/qualityprofiles/create") + .setParam("language", language) + .setParam("name", name) + .setParam("organization", ORGANIZATION)); + } + + private static void inheritProfile(String language, String name, String parentName) { + adminWsClient.wsConnector().call( + new PostRequest("api/qualityprofiles/change_parent") + .setParam("language", language) + .setParam("profileName", name) + .setParam("parentName", parentName) + .setParam("organization", ORGANIZATION)); + } + + private static void analyzeProject(String path) { + orchestrator.executeBuild(SonarScanner.create(projectDir(path)).setProperties( + "sonar.organization", ORGANIZATION, + "sonar.login", "admin", + "sonar.password", "admin" + )); + } + + private static void addProfileToProject(String language, String profileName, String projectKey) { + adminWsClient.wsConnector().call( + new PostRequest("api/qualityprofiles/add_project") + .setParam("language", language) + .setParam("profileName", profileName) + .setParam("organization", ORGANIZATION) + .setParam("projectKey", projectKey)); + } + + private static void deleteProfile(String language, String name) { + adminWsClient.wsConnector().call( + new PostRequest("api/qualityprofiles/delete") + .setParam("language", language) + .setParam("profileName", name) + .setParam("organization", ORGANIZATION)); + } + + private static void setDefault(String language, String name) { + adminWsClient.wsConnector().call( + new PostRequest("api/qualityprofiles/set_default") + .setParam("language", language) + .setParam("profileName", name) + .setParam("organization", ORGANIZATION)); + } + + private static void createOrganization() { + adminWsClient.organizations().create(new CreateWsRequest.Builder().setKey(ORGANIZATION).setName(ORGANIZATION).build()); + } +} diff --git a/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_compare.html b/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_compare.html new file mode 100644 index 00000000000..b8ea98d1690 --- /dev/null +++ b/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_compare.html @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head profile="http://selenium-ide.openqa.org/profiles/test-case"> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> + <link rel="selenium.base" href="http://localhost:49506"/> + <title>should_display_changelog</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr> +<td rowspan="1" colspan="3">should_display_changelog</td> +</tr> +</thead> +<tbody> +<tr> + <td>open</td> + <td>/organizations/test-org/quality_profiles</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=.quality-profiles-table-name a[href^="/organizations/test-org/quality_profiles/show?key=xoo-sample"]</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=.quality-profiles-table-name a[href^="/organizations/test-org/quality_profiles/show?key=xoo-sample"]</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=.quality-profile-header .dropdown-toggle</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=.quality-profile-header .dropdown-toggle</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=#quality-profile-compare</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=.js-profile-comparison .Select</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=.js-profile-comparison .Select-control</td> + <td></td> +</tr> +</tbody> +</table> +</body> +</html> diff --git a/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_copy.html b/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_copy.html new file mode 100644 index 00000000000..e233ad8f005 --- /dev/null +++ b/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_copy.html @@ -0,0 +1,110 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head profile="http://selenium-ide.openqa.org/profiles/test-case"> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> + <link rel="selenium.base" href="http://localhost:49506"/> + <title>should_create</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr> +<td rowspan="1" colspan="3">should_create</td> +</tr> +</thead> +<tbody> +<tr> + <td>open</td> + <td>/sessions/logout</td> + <td></td> +</tr> +<tr> + <td>open</td> + <td>/sessions/login</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>id=password</td> + <td>admin</td> +</tr> +<tr> + <td>type</td> + <td>id=login</td> + <td>admin</td> +</tr> +<tr> + <td>clickAndWait</td> + <td>name=commit</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=.js-user-authenticated</td> + <td></td> +</tr> +<tr> + <td>open</td> + <td>/organizations/test-org/quality_profiles</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=table[data-language="xoo"] tr[data-name="sample"] .quality-profiles-table-name a</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=table[data-language="xoo"] tr[data-name="sample"] .quality-profiles-table-name a</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=.quality-profile-header .dropdown-toggle</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=.quality-profile-header .dropdown-toggle</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=#quality-profile-copy</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>css=#copy-profile-name</td> + <td>copied</td> +</tr> +<tr> + <td>click</td> + <td>css=#copy-profile-submit</td> + <td></td> +</tr> +<tr> + <td>waitForText</td> + <td>css=.quality-profile-header</td> + <td>*copied*</td> +</tr> +<tr> + <td>waitForText</td> + <td>css=.quality-profile-rules</td> + <td>*1*Bugs*0*Vulnerabilities*0*Code Smells*1*</td> +</tr> +<tr> + <td>open</td> + <td>/organizations/test-org/quality_profiles</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=table[data-language="xoo"] tr[data-name="copied"]</td> + <td></td> +</tr> +</tbody> +</table> +</body> +</html> diff --git a/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_create.html b/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_create.html new file mode 100644 index 00000000000..253880e05b4 --- /dev/null +++ b/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_create.html @@ -0,0 +1,110 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head profile="http://selenium-ide.openqa.org/profiles/test-case"> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> + <link rel="selenium.base" href="http://localhost:49506"/> + <title>should_create</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr> +<td rowspan="1" colspan="3">should_create</td> +</tr> +</thead> +<tbody> +<tr> + <td>open</td> + <td>/sessions/logout</td> + <td></td> +</tr> +<tr> + <td>open</td> + <td>/sessions/login</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>id=password</td> + <td>admin</td> +</tr> +<tr> + <td>type</td> + <td>id=login</td> + <td>admin</td> +</tr> +<tr> + <td>clickAndWait</td> + <td>name=commit</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=.js-user-authenticated</td> + <td></td> +</tr> +<tr> + <td>open</td> + <td>/organizations/test-org/quality_profiles</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=#quality-profiles-create</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=#quality-profiles-create</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=#create-profile-name</td> + <td></td> +</tr> +<tr> + <td>assertElementPresent</td> + <td>css=#create-profile-form-backup-XooProfileImporter</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>css=#create-profile-name</td> + <td>test</td> +</tr> +<tr> + <td>click</td> + <td>css=#create-profile-submit</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=.quality-profile-header</td> + <td></td> +</tr> +<tr> + <td>waitForText</td> + <td>css=.quality-profile-header</td> + <td>*test*</td> +</tr> +<tr> + <td>waitForText</td> + <td>css=.quality-profile-rules</td> + <td>*Bugs*0*Vulnerabilities*0*Code Smells*0*</td> +</tr> +<tr> + <td>open</td> + <td>/organizations/test-org/quality_profiles</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=.quality-profiles-table-row[data-name="test"]</td> + <td></td> +</tr> +</tbody> +</table> +</body> +</html> diff --git a/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_delete.html b/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_delete.html new file mode 100644 index 00000000000..bdaab3efc06 --- /dev/null +++ b/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_delete.html @@ -0,0 +1,115 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head profile="http://selenium-ide.openqa.org/profiles/test-case"> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> + <link rel="selenium.base" href="http://localhost:49506"/> + <title>should_create</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr> +<td rowspan="1" colspan="3">should_create</td> +</tr> +</thead> +<tbody> +<tr> + <td>open</td> + <td>/sessions/logout</td> + <td></td> +</tr> +<tr> + <td>open</td> + <td>/sessions/login</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>id=password</td> + <td>admin</td> +</tr> +<tr> + <td>type</td> + <td>id=login</td> + <td>admin</td> +</tr> +<tr> + <td>clickAndWait</td> + <td>name=commit</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=.js-user-authenticated</td> + <td></td> +</tr> +<tr> + <td>open</td> + <td>/organizations/test-org/quality_profiles</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=table[data-language="xoo"] tr[data-name="sample"] .quality-profiles-table-name a</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=table[data-language="xoo"] tr[data-name="sample"] .quality-profiles-table-name a</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=.quality-profile-header .dropdown-toggle</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=.quality-profile-header .dropdown-toggle</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=#quality-profile-delete</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=#delete-profile-submit</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=#delete-profile-submit</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=table[data-language="xoo"] tr[data-name="Basic"]</td> + <td></td> +</tr> +<tr> + <td>waitForElementNotPresent</td> + <td>css=table[data-language="xoo"] tr[data-name="sample"]</td> + <td></td> +</tr> +<tr> + <td>open</td> + <td>/organizations/test-org/quality_profiles</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=table[data-language="xoo"] tr[data-name="Basic"]</td> + <td></td> +</tr> +<tr> + <td>assertElementNotPresent</td> + <td>css=table[data-language="xoo"] tr[data-name="sample"]</td> + <td></td> +</tr> +</tbody> +</table> +</body> +</html> diff --git a/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_display_changelog.html b/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_display_changelog.html new file mode 100644 index 00000000000..417700e47db --- /dev/null +++ b/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_display_changelog.html @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head profile="http://selenium-ide.openqa.org/profiles/test-case"> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> + <link rel="selenium.base" href="http://localhost:49506"/> + <title>should_display_changelog</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr> +<td rowspan="1" colspan="3">should_display_changelog</td> +</tr> +</thead> +<tbody> +<tr> + <td>open</td> + <td>/organizations/test-org/quality_profiles</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=table[data-language="xoo"] tr[data-name="Basic"] .quality-profiles-table-name a</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=table[data-language="xoo"] tr[data-name="Basic"] .quality-profiles-table-name a</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=a[href^="/organizations/test-org/quality_profiles/changelog"]</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=a[href^="/organizations/test-org/quality_profiles/changelog"]</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=.js-profile-changelog-event</td> + <td></td> +</tr> +<tr> + <td>assertText</td> + <td>css=.js-profile-changelog-event</td> + <td>*Administrator*Activated*Has Tag*Major*tag*xoo*</td> +</tr> +</tbody> +</table> +</body> +</html> diff --git a/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_display_list.html b/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_display_list.html new file mode 100644 index 00000000000..b3341945d1c --- /dev/null +++ b/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_display_list.html @@ -0,0 +1,74 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head profile="http://selenium-ide.openqa.org/profiles/test-case"> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> + <title>should_display_list</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr> +<td rowspan="1" colspan="3">should_display_list</td> +</tr> +</thead> +<tbody> +<tr> + <td>open</td> + <td>/organizations/test-org/quality_profiles</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=.quality-profiles-table</td> + <td></td> +</tr> +<tr> + <td>assertElementPresent</td> + <td>css=.quality-profiles-table .data[data-language="xoo"]</td> + <td></td> +</tr> +<tr> + <td>assertElementPresent</td> + <td>css=.quality-profiles-table .data[data-language="xoo2"]</td> + <td></td> +</tr> +<tr> + <td>assertElementPresent</td> + <td>css=table[data-language="xoo"] tr[data-name="Basic"]</td> + <td></td> +</tr> +<tr> + <td>assertText</td> + <td>css=table[data-language="xoo"] tr[data-name="Basic"] .quality-profiles-table-name</td> + <td>*Basic*</td> +</tr> +<tr> + <td>assertText</td> + <td>css=table[data-language="xoo"] tr[data-name="Basic"] .quality-profiles-table-projects</td> + <td>*Default*</td> +</tr> +<tr> + <td>assertText</td> + <td>css=table[data-language="xoo"] tr[data-name="Basic"] .quality-profiles-table-rules</td> + <td>*1*</td> +</tr> +<tr> + <td>assertElementPresent</td> + <td>css=table[data-language="xoo"] tr[data-name="Basic"] .quality-profiles-table-rules a[href^="/organizations/test-org/rules#qprofile"]</td> + <td></td> +</tr> +<tr> + <td>assertText</td> + <td>css=table[data-language="xoo"] tr[data-name="empty"] .quality-profiles-table-projects</td> + <td>*0*</td> +</tr> +<tr> + <td>assertText</td> + <td>css=table[data-language="xoo2"] tr[data-name="Basic"] .quality-profiles-table-name</td> + <td>*Basic*</td> +</tr> +</tbody> +</table> +</body> +</html> diff --git a/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_display_profile_exporters.html b/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_display_profile_exporters.html new file mode 100644 index 00000000000..b26d162f2e7 --- /dev/null +++ b/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_display_profile_exporters.html @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head profile="http://selenium-ide.openqa.org/profiles/test-case"> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> + <link rel="selenium.base" href="http://localhost:49506"/> + <title>should_display_profile_projects.html</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr> +<td rowspan="1" colspan="3">should_display_profile_projects.html</td> +</tr> +</thead> +<tbody> +<tr> + <td>open</td> + <td>/organizations/test-org/quality_profiles</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=table[data-language="xoo"] tr[data-name="sample"] .quality-profiles-table-name a</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=table[data-language="xoo"] tr[data-name="sample"] .quality-profiles-table-name a</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=.quality-profile-exporters</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=.quality-profile-exporters [data-key="XooFakeExporter"]</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=.quality-profile-exporters a[href^="/api/qualityprofiles/export"]</td> + <td></td> +</tr> +</tbody> +</table> +</body> +</html> diff --git a/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_display_profile_inheritance.html b/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_display_profile_inheritance.html new file mode 100644 index 00000000000..c403fbf5196 --- /dev/null +++ b/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_display_profile_inheritance.html @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head profile="http://selenium-ide.openqa.org/profiles/test-case"> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> + <link rel="selenium.base" href="http://localhost:49506"/> + <title>should_display_profile_inheritance.html</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr> +<td rowspan="1" colspan="3">should_display_profile_inheritance.html</td> +</tr> +</thead> +<tbody> +<tr> + <td>open</td> + <td>/organizations/test-org/quality_profiles</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=table[data-language="xoo"] tr[data-name="sample"] .quality-profiles-table-name a</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=table[data-language="xoo"] tr[data-name="sample"] .quality-profiles-table-name a</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=.quality-profile-inheritance</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=.js-inheritance-ancestor</td> + <td></td> +</tr> +<tr> + <td>assertText</td> + <td>css=.js-inheritance-ancestor</td> + <td>*Basic*1*</td> +</tr> +<tr> + <td>assertElementPresent</td> + <td>css=.js-inheritance-current</td> + <td></td> +</tr> +<tr> + <td>assertText</td> + <td>css=.js-inheritance-current</td> + <td>*sample*1*</td> +</tr> +</tbody> +</table> +</body> +</html> diff --git a/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_display_profile_projects.html b/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_display_profile_projects.html new file mode 100644 index 00000000000..062014eb239 --- /dev/null +++ b/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_display_profile_projects.html @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head profile="http://selenium-ide.openqa.org/profiles/test-case"> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> + <link rel="selenium.base" href="http://localhost:49506"/> + <title>should_display_profile_projects.html</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr> +<td rowspan="1" colspan="3">should_display_profile_projects.html</td> +</tr> +</thead> +<tbody> +<tr> + <td>open</td> + <td>/organizations/test-org/quality_profiles</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=table[data-language="xoo"] tr[data-name="sample"] .quality-profiles-table-name a</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=table[data-language="xoo"] tr[data-name="sample"] .quality-profiles-table-name a</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=.quality-profile-projects</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=.js-profile-project</td> + <td></td> +</tr> +<tr> + <td>assertText</td> + <td>css=.js-profile-project</td> + <td>*Sample*</td> +</tr> +</tbody> +</table> +</body> +</html> diff --git a/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_display_profile_rules.html b/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_display_profile_rules.html new file mode 100644 index 00000000000..6b497fc7b58 --- /dev/null +++ b/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_display_profile_rules.html @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head profile="http://selenium-ide.openqa.org/profiles/test-case"> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> + <link rel="selenium.base" href="http://localhost:49506"/> + <title>should_display_profile_rules.html</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr> +<td rowspan="1" colspan="3">should_display_profile_rules.html</td> +</tr> +</thead> +<tbody> +<tr> + <td>open</td> + <td>/organizations/test-org/quality_profiles</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=table[data-language="xoo"] tr[data-name="Basic"] .quality-profiles-table-name a</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=table[data-language="xoo"] tr[data-name="Basic"] .quality-profiles-table-name a</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=.quality-profile-rules</td> + <td></td> +</tr> +<tr> + <td>waitForText</td> + <td>css=.quality-profile-rules</td> + <td>*Active*1*Bugs*0*Vulnerabilities*0*Code Smells*1*</td> +</tr> +</tbody> +</table> +</body> +</html> diff --git a/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_filter_by_language.html b/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_filter_by_language.html new file mode 100644 index 00000000000..a913a70a34f --- /dev/null +++ b/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_filter_by_language.html @@ -0,0 +1,89 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head profile="http://selenium-ide.openqa.org/profiles/test-case"> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> + <title>should_filter_by_language</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr> +<td rowspan="1" colspan="3">should_filter_by_language</td> +</tr> +</thead> +<tbody> +<tr> + <td>open</td> + <td>/organizations/test-org/quality_profiles</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=.quality-profiles-table .data[data-language="xoo"]</td> + <td></td> +</tr> +<tr> + <td>assertElementPresent</td> + <td>css=.quality-profiles-table .data[data-language="xoo2"]</td> + <td></td> +</tr> +<tr> + <td>assertText</td> + <td>css=.js-language-filter</td> + <td>*All*</td> +</tr> +<tr> + <td>click</td> + <td>css=.js-language-filter</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=.js-language-filter-option[data-language="xoo2"]</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=.js-language-filter-option[data-language="xoo2"]</td> + <td></td> +</tr> +<tr> + <td>waitForElementNotPresent</td> + <td>css=.quality-profiles-table[data-language="xoo"]</td> + <td></td> +</tr> +<tr> + <td>assertElementPresent</td> + <td>css=.quality-profiles-table .data[data-language="xoo2"]</td> + <td></td> +</tr> +<tr> + <td>assertText</td> + <td>css=.js-language-filter</td> + <td>*Xoo2*</td> +</tr> +<tr> + <td>open</td> + <td>/organizations/test-org/quality_profiles?language=xoo2</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=.quality-profiles-table .data[data-language="xoo2"]</td> + <td></td> +</tr> +<tr> + <td>assertElementNotPresent</td> + <td>css=.quality-profiles-table[data-language="xoo"]</td> + <td></td> +</tr> +<tr> + <td>assertText</td> + <td>css=.js-language-filter</td> + <td>*Xoo2*</td> +</tr> +</tbody> +</table> +</body> +</html> diff --git a/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_open_from_list.html b/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_open_from_list.html new file mode 100644 index 00000000000..2e753ba1cd7 --- /dev/null +++ b/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_open_from_list.html @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head profile="http://selenium-ide.openqa.org/profiles/test-case"> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> + <title>should_open_from_list</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr> +<td rowspan="1" colspan="3">should_open_from_list</td> +</tr> +</thead> +<tbody> +<tr> + <td>open</td> + <td>/organizations/test-org/quality_profiles</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=table[data-language="xoo"] tr[data-name="Basic"]</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=table[data-language="xoo"] tr[data-name="Basic"] .quality-profiles-table-name a</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=.quality-profile-header</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=.quality-profile-rules</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=.quality-profile-inheritance</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=.quality-profile-projects</td> + <td></td> +</tr> +</tbody> +</table> +</body> +</html> diff --git a/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_rename.html b/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_rename.html new file mode 100644 index 00000000000..c0c437e809f --- /dev/null +++ b/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_rename.html @@ -0,0 +1,110 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head profile="http://selenium-ide.openqa.org/profiles/test-case"> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> + <link rel="selenium.base" href="http://localhost:49506"/> + <title>should_create</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr> +<td rowspan="1" colspan="3">should_create</td> +</tr> +</thead> +<tbody> +<tr> + <td>open</td> + <td>/sessions/logout</td> + <td></td> +</tr> +<tr> + <td>open</td> + <td>/sessions/login</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>id=password</td> + <td>admin</td> +</tr> +<tr> + <td>type</td> + <td>id=login</td> + <td>admin</td> +</tr> +<tr> + <td>clickAndWait</td> + <td>name=commit</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=.js-user-authenticated</td> + <td></td> +</tr> +<tr> + <td>open</td> + <td>/organizations/test-org/quality_profiles</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=table[data-language="xoo"] tr[data-name="sample"] .quality-profiles-table-name a</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=table[data-language="xoo"] tr[data-name="sample"] .quality-profiles-table-name a</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=.quality-profile-header .dropdown-toggle</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=.quality-profile-header .dropdown-toggle</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=#quality-profile-rename</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=#rename-profile-name</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>css=#rename-profile-name</td> + <td>new name</td> +</tr> +<tr> + <td>click</td> + <td>css=#rename-profile-submit</td> + <td></td> +</tr> +<tr> + <td>waitForText</td> + <td>css=.quality-profile-header</td> + <td>*new name*</td> +</tr> +<tr> + <td>open</td> + <td>/organizations/test-org/quality_profiles</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=table[data-language="xoo"] tr[data-name="new name"] .quality-profiles-table-name a</td> + <td></td> +</tr> +</tbody> +</table> +</body> +</html> diff --git a/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_restore.html b/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_restore.html new file mode 100644 index 00000000000..1debd02fcbb --- /dev/null +++ b/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_restore.html @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head profile="http://selenium-ide.openqa.org/profiles/test-case"> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> + <link rel="selenium.base" href="http://localhost:49506"/> + <title>should_create</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr> +<td rowspan="1" colspan="3">should_create</td> +</tr> +</thead> +<tbody> +<tr> + <td>open</td> + <td>/sessions/logout</td> + <td></td> +</tr> +<tr> + <td>open</td> + <td>/sessions/login</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>id=password</td> + <td>admin</td> +</tr> +<tr> + <td>type</td> + <td>id=login</td> + <td>admin</td> +</tr> +<tr> + <td>clickAndWait</td> + <td>name=commit</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=.js-user-authenticated</td> + <td></td> +</tr> +<tr> + <td>open</td> + <td>/organizations/test-org/quality_profiles</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=.js-more-admin-actions</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=.js-more-admin-actions</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=#quality-profiles-restore</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=#restore-profile-backup</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=#restore-profile-submit</td> + <td></td> +</tr> +</tbody> +</table> +</body> +</html> diff --git a/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_restore_built_in.html b/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_restore_built_in.html new file mode 100644 index 00000000000..82005c7102e --- /dev/null +++ b/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_restore_built_in.html @@ -0,0 +1,95 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head profile="http://selenium-ide.openqa.org/profiles/test-case"> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> + <link rel="selenium.base" href="http://localhost:49506"/> + <title>should_create</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr> +<td rowspan="1" colspan="3">should_create</td> +</tr> +</thead> +<tbody> +<tr> + <td>open</td> + <td>/sessions/logout</td> + <td></td> +</tr> +<tr> + <td>open</td> + <td>/sessions/login</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>id=password</td> + <td>admin</td> +</tr> +<tr> + <td>type</td> + <td>id=login</td> + <td>admin</td> +</tr> +<tr> + <td>clickAndWait</td> + <td>name=commit</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=.js-user-authenticated</td> + <td></td> +</tr> +<tr> + <td>open</td> + <td>/organizations/test-org/quality_profiles</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=.quality-profiles-table-row[data-name="sample"]</td> + <td></td> +</tr> +<tr> + <td>assertElementNotPresent</td> + <td>css=.quality-profiles-table-row[data-name="empty"]</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=.js-more-admin-actions</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=#quality-profiles-restore-built-in</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=#restore-built-in-profiles-submit</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=#restore-built-in-profiles-form .alert-success</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=.js-modal-close</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=.quality-profiles-table-row[data-name="empty"]</td> + <td></td> +</tr> +</tbody> +</table> +</body> +</html> diff --git a/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_set_default.html b/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_set_default.html new file mode 100644 index 00000000000..bb996462b3e --- /dev/null +++ b/it/it-tests/src/test/resources/organization/OrganizationQualityProfilesPageTest/should_set_default.html @@ -0,0 +1,100 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head profile="http://selenium-ide.openqa.org/profiles/test-case"> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> + <link rel="selenium.base" href="http://localhost:49506"/> + <title>should_create</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr> +<td rowspan="1" colspan="3">should_create</td> +</tr> +</thead> +<tbody> +<tr> + <td>open</td> + <td>/sessions/logout</td> + <td></td> +</tr> +<tr> + <td>open</td> + <td>/sessions/login</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>id=password</td> + <td>admin</td> +</tr> +<tr> + <td>type</td> + <td>id=login</td> + <td>admin</td> +</tr> +<tr> + <td>clickAndWait</td> + <td>name=commit</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=.js-user-authenticated</td> + <td></td> +</tr> +<tr> + <td>open</td> + <td>/organizations/test-org/quality_profiles</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=table[data-language="xoo"] tr[data-name="sample"] .quality-profiles-table-name a</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=table[data-language="xoo"] tr[data-name="sample"] .quality-profiles-table-name a</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=.quality-profile-header .dropdown-toggle</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=.quality-profile-header .dropdown-toggle</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=#quality-profile-set-as-default</td> + <td></td> +</tr> +<tr> + <td>waitForText</td> + <td>css=.quality-profile-projects</td> + <td>*Default*</td> +</tr> +<tr> + <td>open</td> + <td>/organizations/test-org/quality_profiles</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>css=.quality-profiles-table-row[data-name="sample"]</td> + <td></td> +</tr> +<tr> + <td>assertText</td> + <td>css=.quality-profiles-table-row[data-name="sample"] .quality-profiles-table-projects</td> + <td>*Default*</td> +</tr> +</tbody> +</table> +</body> +</html> |