From 5899b032eb08d49aa85cac80ede7eed86c9a4ec0 Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Mon, 22 Jan 2018 10:02:17 +0100 Subject: [PATCH] SONAR-10293 add IT --- .../qa/util/pageobjects/SourceViewer.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/pageobjects/SourceViewer.java b/server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/pageobjects/SourceViewer.java index 5da34d9c7fd..78ed2c8a146 100644 --- a/server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/pageobjects/SourceViewer.java +++ b/server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/pageobjects/SourceViewer.java @@ -37,4 +37,18 @@ public class SourceViewer { return $(".bubble-popup").shouldBe(visible); } + public SourceViewer shouldHaveNewLines(int ...lines) { + for (int line : lines) { + this.el.$(".source-line-filtered[data-line-number=\"" + line + "\"").shouldBe(visible); + } + return this; + } + + public SourceViewer shouldNotHaveNewLines(int ...lines) { + for (int line : lines) { + this.el.$(".source-line-filtered[data-line-number=\"" + line + "\"").shouldNotBe(visible); + } + return this; + } + } -- 2.39.5