From 1ef941b5c7b4faa45f7f19461a8b1d81ccac540d Mon Sep 17 00:00:00 2001 From: Grégoire Aubert Date: Thu, 20 Jul 2017 16:53:00 +0200 Subject: SONAR-9566 Remove organization name from component path when in issues page at org level --- tests/src/test/java/org/sonarqube/pageobjects/issues/IssuesPage.java | 5 +++++ .../java/org/sonarqube/tests/issue/OrganizationIssuesPageTest.java | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/src/test/java/org/sonarqube/pageobjects/issues/IssuesPage.java b/tests/src/test/java/org/sonarqube/pageobjects/issues/IssuesPage.java index 572b69b8454..0918af6b0ae 100644 --- a/tests/src/test/java/org/sonarqube/pageobjects/issues/IssuesPage.java +++ b/tests/src/test/java/org/sonarqube/pageobjects/issues/IssuesPage.java @@ -66,6 +66,11 @@ public class IssuesPage { return this; } + public IssuesPage componentsShouldNotContain(String path) { + this.getIssuesPathComponents().forEach(element -> element.shouldNotHave(text(path))); + return this; + } + public IssuesPage bulkChangeOpen() { $("#issues-bulk-change").shouldBe(visible).click(); $("#bulk-change-form").shouldBe(visible); diff --git a/tests/src/test/java/org/sonarqube/tests/issue/OrganizationIssuesPageTest.java b/tests/src/test/java/org/sonarqube/tests/issue/OrganizationIssuesPageTest.java index f6f5a1dcaeb..979467ee693 100644 --- a/tests/src/test/java/org/sonarqube/tests/issue/OrganizationIssuesPageTest.java +++ b/tests/src/test/java/org/sonarqube/tests/issue/OrganizationIssuesPageTest.java @@ -73,10 +73,11 @@ public class OrganizationIssuesPageTest { nav.openIssues(org1.getKey()) .issuesCount(2) - .componentsShouldContain(org1.getName()); + .componentsShouldNotContain(org1.getName()); nav.openIssues() - .issuesCount(4); + .issuesCount(4) + .componentsShouldContain("Org "); } private String provisionProject(Organizations.Organization organization) { -- cgit v1.2.3