File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -75,8 +75,8 @@ private void jsValidation() {
7575 }
7676
7777 private void navigateAway () {
78- jenkins .runThenConfirmAlert (() -> driver . findElement ( By . xpath ( "//ol[@id= \" breadcrumbs \" ]/li[1]/a" ))
79- .click ());
78+ jenkins .runThenConfirmAlert (
79+ () -> driver . findElement ( By . id ( "jenkins-head-icon" )) .click ());
8080 sleep (1000 ); // Needed for some reason
8181 }
8282}
Original file line number Diff line number Diff line change @@ -65,8 +65,8 @@ public void testUnordered() {
6565 * Navigate back to the dashboard first to dismiss the alert so that CspRule can check for violations (see
6666 * FormValidationTest).
6767 */
68- jenkins .runThenConfirmAlert (() -> driver . findElement ( By . xpath ( "//ol[@id= \" breadcrumbs \" ]/li[1]/a" ))
69- .click ());
68+ jenkins .runThenConfirmAlert (
69+ () -> driver . findElement ( By . id ( "jenkins-head-icon" )) .click ());
7070 sleep (1000 );
7171 }
7272}
Original file line number Diff line number Diff line change @@ -71,8 +71,8 @@ public void check_config_is_persisted() {
7171 * Navigate back to the dashboard first to dismiss the alert so that CspRule can check for violations (see
7272 * FormValidationTest).
7373 */
74- jenkins .runThenConfirmAlert (() -> driver . findElement ( By . xpath ( "//ol[@id= \" breadcrumbs \" ]/li[1]/a" ))
75- .click ());
74+ jenkins .runThenConfirmAlert (
75+ () -> driver . findElement ( By . id ( "jenkins-head-icon" )) .click ());
7676 sleep (1000 );
7777 }
7878
Original file line number Diff line number Diff line change 33import static org .hamcrest .MatcherAssert .assertThat ;
44import static org .hamcrest .Matchers .endsWith ;
55import static org .hamcrest .Matchers .equalToIgnoringCase ;
6- import static org .hamcrest .Matchers .hasSize ;
76import static org .hamcrest .Matchers .is ;
87import static org .jenkinsci .test .acceptance .Matchers .hasContent ;
98import static org .junit .Assert .assertEquals ;
@@ -208,7 +207,6 @@ public void configureDashboardNameAndDescription() {
208207 assertThat (url , endsWith (name + "/" ));
209208
210209 final List <String > breadCrumbs = v .breadCrumbs .getBreadCrumbs ();
211- assertThat (breadCrumbs , hasSize (2 ));
212210 final String nameCrumb = breadCrumbs .get (breadCrumbs .size () - 1 );
213211 assertThat (nameCrumb , is (name ));
214212
Original file line number Diff line number Diff line change @@ -47,8 +47,8 @@ public void send_test_mail() throws IOException {
4747 * Navigate back to the dashboard first to dismiss the alert so that CspRule can check for violations (see
4848 * FormValidationTest).
4949 */
50- jenkins .runThenConfirmAlert (() -> driver . findElement ( By . xpath ( "//ol[@id= \" breadcrumbs \" ]/li[1]/a" ))
51- .click ());
50+ jenkins .runThenConfirmAlert (
51+ () -> driver . findElement ( By . id ( "jenkins-head-icon" )) .click ());
5252 sleep (1000 );
5353 }
5454
Original file line number Diff line number Diff line change @@ -75,8 +75,8 @@ public void systemSecretFileCredentialTest() throws URISyntaxException {
7575 * Navigate back to the dashboard first to dismiss the alert so that CspRule can check for violations (see
7676 * FormValidationTest).
7777 */
78- jenkins .runThenConfirmAlert (() -> driver . findElement ( By . xpath ( "//ol[@id= \" breadcrumbs \" ]/li[1]/a" ))
79- .click ());
78+ jenkins .runThenConfirmAlert (
79+ () -> driver . findElement ( By . id ( "jenkins-head-icon" )) .click ());
8080 sleep (1000 );
8181 }
8282
@@ -88,8 +88,8 @@ public void systemSecretTextCredentialTest() throws URISyntaxException {
8888 * Navigate back to the dashboard first to dismiss the alert so that CspRule can check for violations (see
8989 * FormValidationTest).
9090 */
91- jenkins .runThenConfirmAlert (() -> driver . findElement ( By . xpath ( "//ol[@id= \" breadcrumbs \" ]/li[1]/a" ))
92- .click ());
91+ jenkins .runThenConfirmAlert (
92+ () -> driver . findElement ( By . id ( "jenkins-head-icon" )) .click ());
9393 sleep (1000 );
9494 }
9595
Original file line number Diff line number Diff line change @@ -152,8 +152,8 @@ public void newSlaveWithExistingCredential() throws Exception {
152152 * Navigate back to the dashboard first to dismiss the alert so that CspRule can check for violations (see
153153 * FormValidationTest).
154154 */
155- jenkins .runThenConfirmAlert (() -> driver . findElement ( By . xpath ( "//ol[@id= \" breadcrumbs \" ]/li[1]/a" ))
156- .click ());
155+ jenkins .runThenConfirmAlert (
156+ () -> driver . findElement ( By . id ( "jenkins-head-icon" )) .click ());
157157 sleep (1000 );
158158 }
159159
You can’t perform that action at this time.
0 commit comments