/
config-warning.cy.ts
29 lines (24 loc) · 1.07 KB
/
config-warning.cy.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
describe('baseUrl', () => {
it('should show baseUrl warning if Cypress cannot connect to provided baseUrl', () => {
cy.scaffoldProject('config-with-base-url-warning')
cy.openProject('config-with-base-url-warning')
cy.visitLaunchpad()
cy.get('[data-cy-testingtype="e2e"]').click()
cy.get('[data-cy="alert"]').contains('Warning: Cannot Connect Base Url Warning')
cy.withCtx((ctx) => {
ctx._apis.projectApi.isListening = sinon.stub().resolves(null)
})
cy.contains('button', 'Try again').click()
cy.get('[data-cy="alert"]').should('not.exist')
})
})
describe('experimentalStudio', () => {
it('should show experimentalStudio warning if Cypress detects experimentalStudio config has been set', () => {
cy.scaffoldProject('experimental-studio')
cy.openProject('experimental-studio')
cy.visitLaunchpad()
cy.get('[data-cy="warning-alert"]').contains('Warning: Experimental Studio Removed')
cy.get('[data-cy-testingtype="e2e"]').click()
cy.get('[data-cy="warning-alert"]').contains('Warning: Experimental Studio Removed')
})
})