@@ -52,20 +52,21 @@ describe("integration", () => {
5252 assert ( page , "Page should be defined" ) ;
5353 assert ( testCharm , "Test charm should be defined" ) ;
5454
55- const anchor = await page ! . waitForSelector ( "nav a" ) ;
56- const innerText = await anchor . innerText ( ) ;
55+ await snapshot ( page , "Initial state" ) ;
56+
57+ const anchor = await page . waitForSelector ( "nav a" ) ;
5758 assert (
58- innerText === "common-knowledge" ,
59+ ( await anchor . innerText ( ) ) === "common-knowledge" ,
5960 "Logged in and Common Knowledge title renders" ,
6061 ) ;
6162
62- await page ! . goto (
63- `${ FRONTEND_URL } ${ testCharm ! . space } /${ testCharm ! . charmId } ` ,
63+ await page . goto (
64+ `${ FRONTEND_URL } ${ testCharm . space } /${ testCharm . charmId } ` ,
6465 ) ;
6566 await snapshot ( page , "Waiting for charm to render" ) ;
6667
6768 await waitForSelectorWithText (
68- page ! ,
69+ page ,
6970 "a[aria-current='charm-title']" ,
7071 "Simple Value: 1" ,
7172 ) ;
@@ -81,15 +82,15 @@ describe("integration", () => {
8182 // As if the reference was invalidated by a spurious re-render between
8283 // getting an element handle, and clicking it.
8384 await sleep ( 1000 ) ;
84- const button = await page ! . waitForSelector (
85+ const button = await page . waitForSelector (
8586 "div[aria-label='charm-content'] button" ,
8687 ) ;
8788 await button . click ( ) ;
8889 assert ( true , "Button clicked" ) ;
8990
9091 console . log ( "Checking if title changed" ) ;
9192 await waitForSelectorWithText (
92- page ! ,
93+ page ,
9394 "a[aria-current='charm-title']" ,
9495 "Simple Value: 2" ,
9596 ) ;
@@ -103,8 +104,8 @@ describe("integration", () => {
103104 console . log ( "Inspecting charm to verify updates propagated from browser." ) ;
104105 const charm = await inspectCharm (
105106 TOOLSHED_API_URL ,
106- testCharm ! . space ,
107- testCharm ! . charmId ,
107+ testCharm . space ,
108+ testCharm . charmId ,
108109 ) ;
109110 console . log ( "Charm:" , charm ) ;
110111 assert (
0 commit comments