@@ -13,7 +13,6 @@ const {
13
13
waitForNoSpinners,
14
14
input,
15
15
signIntoTerra,
16
- noSpinnersAfter,
17
16
} = require ( '../utils/integration-utils' ) ;
18
17
19
18
const testPreviewDrsUriFn = _ . flow (
@@ -28,25 +27,36 @@ const testPreviewDrsUriFn = _.flow(
28
27
} ,
29
28
} ;
30
29
30
+ console . log ( 'signing in...' ) ;
31
31
await signIntoTerra ( page , { token, testUrl } ) ;
32
32
33
+ console . log ( 'creating entity...' ) ;
33
34
await createEntityInWorkspace ( page , billingProject , workspaceName , testEntity ) ;
34
35
36
+ console . log ( 'listing workspaces...' ) ;
35
37
await click ( page , clickable ( { textContains : 'View Workspaces' } ) ) ;
36
38
await waitForNoSpinners ( page ) ;
39
+
40
+ console . log ( 'opening test workspace...' ) ;
37
41
await fillIn ( page , input ( { placeholder : 'Search by name, project, or bucket' } ) , workspaceName ) ;
38
42
await click ( page , clickable ( { textContains : workspaceName } ) , { timeout : Millis . ofMinute } ) ;
43
+ await findText ( page , 'About the workspace' ) ;
39
44
40
- await noSpinnersAfter ( page , {
41
- action : ( ) => click ( page , navChild ( 'data' ) ) ,
42
- } ) ;
43
-
45
+ // Wait for the "test_entity" link to appear.
44
46
// Loading the workspace page now means we need to make a Google API call to
45
- // fetch the GCS bucket location. Wait a bit for it.
46
- await waitForNoSpinners ( page ) ;
47
+ // fetch the GCS bucket location, which takes a while; we don't need to wait for
48
+ // all spinners to disapper.
49
+ console . log ( 'opening Data tab...' ) ;
50
+ await click ( page , navChild ( 'data' ) ) ;
51
+ await findText ( page , `${ testEntity . entityType } ` ) ;
52
+
53
+ console . log ( 'opening data table...' ) ;
47
54
await click ( page , clickable ( { textContains : testEntity . entityType } ) ) ;
55
+ console . log ( 'opening preview for entity...' ) ;
48
56
await click ( page , elementInDataTableRow ( testEntity . name , testEntity . attributes . file_uri ) ) ;
57
+ console . log ( 'waiting for no spinners in preview modal...' ) ;
49
58
await waitForNoSpinners ( page ) ;
59
+ console . log ( 'verifying text in preview modal...' ) ;
50
60
await findText ( page , 'Filename' ) ;
51
61
await findText ( page , 'File size' ) ;
52
62
} ) ;
0 commit comments