/
webkit.cy.ts
31 lines (26 loc) · 1.04 KB
/
webkit.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
30
31
describe('WebKit-specific behavior', { browser: 'webkit' }, () => {
it('cy.origin() is disabled', (done) => {
cy.on('fail', (err) => {
expect(err.message).to.equal('`cy.origin()` is not currently supported in experimental WebKit.')
expect(err.docsUrl).to.equal('https://on.cypress.io/webkit-experiment')
done()
})
cy.origin('foo', () => {})
})
it('cy.session() is disabled', (done) => {
cy.on('fail', (err) => {
expect(err.message).to.equal('`cy.session()` is not currently supported in experimental WebKit.')
expect(err.docsUrl).to.equal('https://on.cypress.io/webkit-experiment')
done()
})
cy.session('foo', () => {})
})
it('cy.session() is disabled', (done) => {
cy.on('fail', (err) => {
expect(err.message).to.include('`forceNetworkError` was passed, but it is not currently supported in experimental WebKit.')
expect(err.docsUrl).to.equal('https://on.cypress.io/intercept')
done()
})
cy.intercept('http://foo.com', { forceNetworkError: true })
})
})