improve tests
This commit is contained in:
parent
014f23887f
commit
cad7f98e37
|
@ -1,6 +1,7 @@
|
||||||
describe('Basic spec', () => {
|
describe('Basic spec', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.visit('/')
|
cy.visit('/')
|
||||||
|
cy.wait(500)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('has the correct <h1>', () => {
|
it('has the correct <h1>', () => {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
describe('Login spec', () => {
|
describe('Login spec', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.visit('/')
|
cy.visit('/')
|
||||||
|
cy.wait(500)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Cannot log in to a fake instance', () => {
|
it('Cannot log in to a fake instance', () => {
|
||||||
|
@ -24,6 +25,7 @@ describe('Login spec', () => {
|
||||||
|
|
||||||
it('Logs out', () => {
|
it('Logs out', () => {
|
||||||
cy.login('foobar@localhost:3000', 'foobarfoobar')
|
cy.login('foobar@localhost:3000', 'foobarfoobar')
|
||||||
|
cy.wait(500)
|
||||||
cy.get('nav a[aria-label=Settings]').click()
|
cy.get('nav a[aria-label=Settings]').click()
|
||||||
cy.get('a').contains('Instances').click()
|
cy.get('a').contains('Instances').click()
|
||||||
cy.get('a').contains('localhost:3000').click()
|
cy.get('a').contains('localhost:3000').click()
|
||||||
|
|
|
@ -4,6 +4,7 @@ describe('Basic timeline spec', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.login('foobar@localhost:3000', 'foobarfoobar')
|
cy.login('foobar@localhost:3000', 'foobarfoobar')
|
||||||
cy.visit('/')
|
cy.visit('/')
|
||||||
|
cy.wait(500)
|
||||||
})
|
})
|
||||||
|
|
||||||
const homeTimeline = [
|
const homeTimeline = [
|
||||||
|
|
|
@ -33,8 +33,10 @@ Cypress.Commands.add('login', (email, password) => {
|
||||||
})
|
})
|
||||||
|
|
||||||
cy.visit('/settings/instances/add')
|
cy.visit('/settings/instances/add')
|
||||||
|
cy.wait(500)
|
||||||
cy.get('#instanceInput').clear().type('localhost:3000')
|
cy.get('#instanceInput').clear().type('localhost:3000')
|
||||||
cy.get('.add-new-instance').submit()
|
cy.get('.add-new-instance').submit()
|
||||||
|
cy.wait(500)
|
||||||
cy.url().should('equal', 'http://localhost:3000/auth/sign_in')
|
cy.url().should('equal', 'http://localhost:3000/auth/sign_in')
|
||||||
cy.get('input#user_email').should('exist')
|
cy.get('input#user_email').should('exist')
|
||||||
cy.get('input#user_password').should('exist')
|
cy.get('input#user_password').should('exist')
|
||||||
|
|
Loading…
Reference in a new issue