@@ -5,26 +5,21 @@ describe("Fetch Status", () => {
55 cy . visit ( "/" ) ;
66
77 // Go immediately to query
8- cy . contains ( "Mixed book query" ) . click ( ) ;
9-
10- // Open the sources and verify
11- cy . get ( '[aria-label="Sources info"]' ) . click ( ) ;
12- cy . get ( '[aria-label="Verify source"]' ) . each ( ( $button ) => {
13- cy . wrap ( $button ) . click ( ) ;
14- } ) ;
8+ cy . contains ( "A book query testing sources with and without authentication required" ) . click ( ) ;
159
1610 // Check if the public and restricted sources appear
11+ cy . get ( '[aria-label="Sources info"]' ) . click ( ) ;
12+
1713 cy . contains ( "http://localhost:8080/example/favourite-books" ) ;
1814 cy . contains ( "http://localhost:8080/example/wish-list" ) ;
1915
2016 // Check if the correct icons appear
2117 cy . get ( '[aria-label="Authentication required"]' ) . should ( "exist" ) ;
2218 cy . get ( '[aria-label="Fetch failed"]' ) . should ( "exist" ) ;
23- cy . get ( '[aria-label="Verification failed"]' ) . should ( "exist" )
2419
2520 cy . get ( '[aria-label="No authentication required"]' ) . should ( "exist" ) ;
2621 cy . get ( '[aria-label="Fetch was succesful"]' ) . should ( "exist" ) ;
27- cy . get ( '[aria-label="Verification succeeded"]' ) . should ( "exist" ) ;
22+
2823
2924 // Checking that a non-authorized book is not appearing
3025 cy . contains ( "It Ends With Us" ) . should ( "not.exist" ) ;
@@ -54,26 +49,20 @@ describe("Fetch Status", () => {
5449 cy . url ( ) . should ( "eq" , "http://localhost:5173/" ) ;
5550
5651 // Go to the mixed book query
57- cy . contains ( "Mixed book query" ) . click ( ) ;
52+ cy . contains ( "A book query testing sources with and without authentication required " ) . click ( ) ;
5853
59- // Open the sources and verify
54+ // Check if the public and restricted sources appear
6055 cy . get ( '[aria-label="Sources info"]' ) . click ( ) ;
61- cy . get ( '[aria-label="Verify source"]' ) . each ( ( $button ) => {
62- cy . wrap ( $button ) . click ( ) ;
63- } ) ;
6456
65- // Check if the public and restricted sources appear
6657 cy . contains ( "http://localhost:8080/example/favourite-books" ) ;
6758 cy . contains ( "http://localhost:8080/example/wish-list" ) ;
6859
6960 // Check if the correct icons appear
7061 cy . get ( '[aria-label="Authentication required"]' ) . should ( "exist" ) ;
7162 cy . get ( '[aria-label="Fetch Failed"]' ) . should ( "not.exist" ) ;
72- cy . get ( '[aria-label="Verification failed"]' ) . should ( "not.exist" ) ;
7363
7464 cy . get ( '[aria-label="No authentication required"]' ) . should ( "exist" ) ;
7565 cy . get ( '[aria-label="Fetch was succesful"]' ) . should ( "exist" ) ;
76- cy . get ( '[aria-label="Verification succeeded"]' ) . should ( "exist" ) ;
7766
7867 // Checking that you see authorized books
7968 cy . contains ( "It Ends With Us" ) ;
0 commit comments