1
0
mirror of https://github.com/typemill/typemill.git synced 2025-10-23 02:26:02 +02:00

Version 1.5.0: Finishing

This commit is contained in:
trendschau
2021-10-10 12:19:13 +02:00
parent 5c4a7c9f6a
commit bc04fa7544
13 changed files with 82 additions and 69 deletions

View File

@@ -44,7 +44,7 @@ describe('Typemill Login', function()
cy.url().should('include', '/tm/login')
})
it('blocks after 3 fails', function ()
it('captcha after 1 fail', function ()
{
cy.visit('/tm/login')
@@ -55,17 +55,16 @@ describe('Typemill Login', function()
cy.get('#flash-message').should('contain', 'wrong password or username')
cy.get('input[name="username"]').should('have.value', 'wrong')
cy.get('input[name="password"]').should('have.value', '')
cy.get('input[name="captcha"]').should('have.value', '')
// validation fails second
cy.get('input[name="password"]').clear().type('pass')
// captcha fails first
cy.get('input[name="username"]').clear().type('trendschau')
cy.get('input[name="password"]').clear().type('password')
cy.get('input[name="captcha"]').clear().type('wrong')
cy.get('form').submit()
cy.get('#flash-message').should('contain', 'wrong password or username')
// validation fails third and login is blocked
cy.get('input[name="password"]').clear().type('pass')
cy.get('form').submit()
cy.get('#flash-message').should('contain', 'Too many bad logins')
cy.contains('wait')
cy.contains('forgot password')
cy.get('#flash-message').should('contain', 'Captcha is wrong')
cy.get('input[name="username"]').should('have.value', 'trendschau')
cy.get('input[name="password"]').should('have.value', '')
cy.get('input[name="captcha"]').should('have.value', '')
})
})