File tree Expand file tree Collapse file tree 2 files changed +14
-8
lines changed Expand file tree Collapse file tree 2 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -7,18 +7,13 @@ describe('src/cy/commands/prompt', () => {
7
7
return
8
8
}
9
9
10
- cy . visit ( 'http://www.foobar.com:3500/fixtures/dom .html' )
10
+ cy . visit ( 'http://www.foobar.com:3500/fixtures/prompt .html' )
11
11
12
12
// TODO: add more tests when cy.prompt is built out, but for now this just
13
13
// verifies that the command executes without throwing an error
14
14
// @ts -expect-error - this will not error when we actually release the experimentalPromptCommand flag
15
- cy . prompt ( [ 'Hello, world! ' ] )
15
+ cy . prompt ( [ 'Click the "click me" button ' ] )
16
16
17
- cy . visit ( 'http://www.barbaz.com:3500/fixtures/dom.html' )
18
-
19
- cy . origin ( 'http://www.barbaz.com:3500' , ( ) => {
20
- // @ts -expect-error - this will not error when we actually release the experimentalPromptCommand flag
21
- cy . prompt ( [ 'Hello, world!' ] )
22
- } )
17
+ cy . get ( '#log' ) . should ( 'contain' , 'clicked' )
23
18
} )
24
19
} )
Original file line number Diff line number Diff line change
1
+ < html >
2
+ < body >
3
+ < button onclick ="onClick() "> Click me</ button >
4
+ < div id ="log "> </ div >
5
+ < script >
6
+ function onClick ( ) {
7
+ document . getElementById ( 'log' ) . textContent = 'clicked'
8
+ }
9
+ </ script >
10
+ </ body >
11
+ </ html >
You can’t perform that action at this time.
0 commit comments