@@ -2,14 +2,19 @@ import StudioUrlPrompt from './StudioUrlPrompt.vue'
2
2
3
3
describe ( '<StudioUrlPrompt />' , ( ) => {
4
4
it ( 'renders' , ( ) => {
5
- cy . mount ( < StudioUrlPrompt urlInProgress = "" /> )
5
+ cy . mount ( < StudioUrlPrompt urlInProgress = "" overlayZIndex = { 50 } /> )
6
6
cy . percySnapshot ( )
7
7
} )
8
8
9
+ it ( 'zindex of overlay matches passed in zindex' , ( ) => {
10
+ cy . mount ( < StudioUrlPrompt urlInProgress = "" overlayZIndex = { 99 } /> )
11
+ cy . get ( '[cy-data="studio-url-overlay"]' ) . should ( 'have.css' , 'z-index' , '99' )
12
+ } )
13
+
9
14
it ( 'emits cancel when button is clicked' , ( ) => {
10
15
const cancelStub = cy . stub ( )
11
16
12
- cy . mount ( < StudioUrlPrompt urlInProgress = "" onCancel = { cancelStub } /> )
17
+ cy . mount ( < StudioUrlPrompt urlInProgress = "" overlayZIndex = { 50 } onCancel = { cancelStub } /> )
13
18
14
19
cy . findByText ( 'Cancel' ) . click ( ) . then ( ( ) => {
15
20
expect ( cancelStub ) . to . be . called
@@ -19,7 +24,7 @@ describe('<StudioUrlPrompt />', () => {
19
24
it ( 'disables submit button when url field is empty' , ( ) => {
20
25
const continueStub = cy . stub ( )
21
26
22
- cy . mount ( < StudioUrlPrompt urlInProgress = "" onSubmit = { continueStub } /> )
27
+ cy . mount ( < StudioUrlPrompt urlInProgress = "" overlayZIndex = { 50 } onSubmit = { continueStub } /> )
23
28
24
29
cy . findByText ( 'Continue ➜' ) . should ( 'be.disabled' )
25
30
} )
@@ -29,7 +34,7 @@ describe('<StudioUrlPrompt />', () => {
29
34
30
35
const url = 'http://localhost:8080'
31
36
32
- cy . mount ( < StudioUrlPrompt urlInProgress = { url } onSubmit = { continueStub } /> )
37
+ cy . mount ( < StudioUrlPrompt urlInProgress = { url } overlayZIndex = { 50 } onSubmit = { continueStub } /> )
33
38
34
39
cy . findByText ( 'Continue ➜' ) . click ( ) . then ( ( ) => {
35
40
expect ( continueStub ) . to . be . called
0 commit comments