fix old integration tests, implement basic ones

- Closes #456
main
Mike Fix 6 years ago
parent 4a87519409
commit 17e44654c6

@ -0,0 +1,22 @@
/* eslint-env mocha */
/* global cy */
import { editorVisible } from '../support'
describe('Basic', () => {
it('Should open editor with the correct text encoding', () => {
cy.visit('/?code=%250A%252F*%2520Passing%2520Boolean%2520as%2520method%2520to%2520find%2520returns%2520the%250A%2520*%2520first%2520truthy%2520value%2520in%2520the%2520array!%250A%2520*%252F%250A%255Bfalse%252C%2520false%252C%2520%27%27%252C%2520undefined%252C%2520%27qwijo%27%252C%25200%255D.find(Boolean)%2520%252F%252F%2520%27qwijo%27')
editorVisible()
cy.contains(
'#container',
'/* Passing Boolean as method to find returns the * first truthy value in the array! */[false, false, \'\', undefined, \'qwijo\', 0].find(Boolean) // \'qwijo\''
)
})
it('Should open editor with the correct text even with bad URI component', () => {
cy.visit('/?code=%25')
editorVisible()
cy.contains('#container', '%')
})
})

@ -7,6 +7,6 @@ describe('Gist', () => {
editorVisible()
cy.contains('Y-Combinator implemented in JavaScript')
cy.get('#downshift-input-Auto').should('have.value', 'JavaScript')
cy.get('#downshift-input-JavaScript').should('have.value', 'JavaScript')
})
})

Loading…
Cancel
Save