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