mirror of
https://github.com/typemill/typemill.git
synced 2025-08-06 14:16:46 +02:00
Version 1.5.0: Finishing
This commit is contained in:
@@ -54,17 +54,6 @@ describe('Typemill Initial Frontend', function()
|
||||
})
|
||||
})
|
||||
|
||||
it('has sitemap xml', function ()
|
||||
{
|
||||
cy.request({
|
||||
url: '/cache/sitemap.xml',
|
||||
})
|
||||
.then((resp) => {
|
||||
/* should return xml-format */
|
||||
expect(resp.headers).to.have.property('content-type','application/xml')
|
||||
})
|
||||
})
|
||||
|
||||
it('has no access to dashboard', function ()
|
||||
{
|
||||
cy.visit('/tm/settings')
|
||||
|
@@ -262,6 +262,31 @@ describe('Blox Editor', function()
|
||||
})
|
||||
})
|
||||
|
||||
it('Publishes new page', function()
|
||||
{
|
||||
cy.visit('/tm/content/visual/welcome/testpage')
|
||||
cy.url().should('include','/tm\/content\/visual\/welcome\/testpage')
|
||||
|
||||
cy.get('#publish').click().wait(500)
|
||||
|
||||
cy.visit('/welcome/testpage')
|
||||
cy.url().should('include','/welcome/testpage')
|
||||
|
||||
cy.get('.cy-nav')
|
||||
.should('contain', 'Testpage')
|
||||
})
|
||||
|
||||
it('has sitemap xml', function ()
|
||||
{
|
||||
cy.request({
|
||||
url: '/cache/sitemap.xml',
|
||||
})
|
||||
.then((resp) => {
|
||||
/* should return xml-format */
|
||||
expect(resp.headers).to.have.property('content-type','application/xml')
|
||||
})
|
||||
})
|
||||
|
||||
it('Deletes new page', function()
|
||||
{
|
||||
cy.visit('/tm/content/visual/welcome/testpage')
|
||||
|
@@ -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', '')
|
||||
})
|
||||
})
|
Reference in New Issue
Block a user