Skip to content

Commit

Permalink
Adapt test to advanced component change in core (#414)
Browse files Browse the repository at this point in the history
  • Loading branch information
timja authored Dec 31, 2022
1 parent e65760f commit f2e3985
Showing 1 changed file with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -255,16 +255,7 @@ public void defaultTriggers() throws Exception {
assertEquals("Should be at the Configure System page",
"Configure System [Jenkins]", page.getTitleText());

List<DomElement> settings = page.getByXPath(".//div[@class='advancedLink' and span[starts-with(@id, 'yui-gen')]/span[@class='first-child']/button[./text()='Default Triggers...']]");
assertEquals(1, settings.size());
DomNode div = settings.get(0);
DomNode advancedBody = div.getNextSibling();
assertEquals("div", advancedBody.getLocalName());
DomNode tbody = advancedBody.getFirstChild();
assertEquals("div", tbody.getLocalName());
assertFalse(tbody.getChildNodes().isEmpty());

List<DomNode> nodes = div.getByXPath(".//button[./text()='Default Triggers...']");
List<DomNode> nodes = page.getByXPath(".//button[contains(text(),'Default Triggers')]");
assertEquals(1, nodes.size());
HtmlButton defaultTriggers = (HtmlButton)nodes.get(0);
defaultTriggers.click();
Expand Down

0 comments on commit f2e3985

Please sign in to comment.