|
@@ -4,6 +4,7 @@ describe('Typemill Setup', function()
|
|
{
|
|
{
|
|
// visit setup form
|
|
// visit setup form
|
|
cy.visit('/setup')
|
|
cy.visit('/setup')
|
|
|
|
+// cy.visit('/setup',{ onBeforeLoad: (_contentWindow) => { Object.defineProperty(navigator, 'language', { value: 'fr-FR' }) } })
|
|
cy.url().should('include','/setup')
|
|
cy.url().should('include','/setup')
|
|
|
|
|
|
// add data and check attributes
|
|
// add data and check attributes
|
|
@@ -63,7 +64,7 @@ describe('Typemill Setup', function()
|
|
Cypress.Cookies.preserveOnce('typemill-session')
|
|
Cypress.Cookies.preserveOnce('typemill-session')
|
|
|
|
|
|
// clicks link on welcome page to settings page
|
|
// clicks link on welcome page to settings page
|
|
- cy.get('.button').should('contain', 'Configure your website')
|
|
|
|
|
|
+// cy.get('.button').should('contain', 'Configure your website')
|
|
cy.get('.button').click()
|
|
cy.get('.button').click()
|
|
cy.url().should('include', '/tm/settings')
|
|
cy.url().should('include', '/tm/settings')
|
|
})
|
|
})
|
|
@@ -74,16 +75,30 @@ describe('Typemill Setup', function()
|
|
.should('have.value', 'TYPEMILL')
|
|
.should('have.value', 'TYPEMILL')
|
|
.and('have.attr','required')
|
|
.and('have.attr','required')
|
|
cy.get('input[name="settings[author]"]')
|
|
cy.get('input[name="settings[author]"]')
|
|
- .should('have.value', 'Unknown')
|
|
|
|
cy.get('select[name="settings[copyright]"]')
|
|
cy.get('select[name="settings[copyright]"]')
|
|
cy.get('input[name="settings[year]"]')
|
|
cy.get('input[name="settings[year]"]')
|
|
.should('have.attr', 'required')
|
|
.should('have.attr', 'required')
|
|
cy.get('select[name="settings[language]"]')
|
|
cy.get('select[name="settings[language]"]')
|
|
|
|
+// cy.get('select[name="settings[langattr]"]')
|
|
cy.get('input[name="settings[sitemap]"]')
|
|
cy.get('input[name="settings[sitemap]"]')
|
|
.should('have.value', 'http://localhost/typemillTest/cache/sitemap.xml')
|
|
.should('have.value', 'http://localhost/typemillTest/cache/sitemap.xml')
|
|
.and('have.attr','readonly')
|
|
.and('have.attr','readonly')
|
|
- Cypress.Cookies.preserveOnce('typemill-session')
|
|
|
|
- })
|
|
|
|
|
|
+ cy.get('input[name="settings[logo]"]')
|
|
|
|
+ cy.get('input[name="settings[deletelogo]"]')
|
|
|
|
+ cy.get('input[name="settings[favicon]"]')
|
|
|
|
+ cy.get('input[name="settings[deletefav]"]')
|
|
|
|
+ cy.get('input[name="settings[headlineanchors]"]')
|
|
|
|
+ cy.get('input[name="settings[editor]"]')
|
|
|
|
+
|
|
|
|
+ cy.get('select[name="settings[language]"]')
|
|
|
|
+ .select('en')
|
|
|
|
+ .should('have.value', 'en')
|
|
|
|
+
|
|
|
|
+ cy.get('form').submit()
|
|
|
|
+ cy.get('#flash-message').should('contain', 'Settings are stored')
|
|
|
|
+
|
|
|
|
+ Cypress.Cookies.preserveOnce('typemill-session')
|
|
|
|
+ })
|
|
|
|
|
|
it('creates default user data', function()
|
|
it('creates default user data', function()
|
|
{
|
|
{
|
|
@@ -95,6 +110,14 @@ describe('Typemill Setup', function()
|
|
.and('have.attr','disabled')
|
|
.and('have.attr','disabled')
|
|
cy.get('input[name="username"]')
|
|
cy.get('input[name="username"]')
|
|
.should('have.value', 'trendschau')
|
|
.should('have.value', 'trendschau')
|
|
|
|
+ cy.get('input[name="firstname"]')
|
|
|
|
+ .clear()
|
|
|
|
+ .type('Sebastian')
|
|
|
|
+ .should('have.value', 'Sebastian')
|
|
|
|
+ cy.get('input[name="lastname"]')
|
|
|
|
+ .clear()
|
|
|
|
+ .type('Schürmanns')
|
|
|
|
+ .should('have.value', 'Schürmanns')
|
|
cy.get('input[name="email"]')
|
|
cy.get('input[name="email"]')
|
|
.should('have.value', 'trendschau@gmail.com')
|
|
.should('have.value', 'trendschau@gmail.com')
|
|
.and('have.attr','required')
|
|
.and('have.attr','required')
|
|
@@ -104,6 +127,10 @@ describe('Typemill Setup', function()
|
|
.should('have.value', '')
|
|
.should('have.value', '')
|
|
cy.get('input[name="newpassword"]')
|
|
cy.get('input[name="newpassword"]')
|
|
.should('have.value', '')
|
|
.should('have.value', '')
|
|
|
|
+
|
|
|
|
+ cy.get('#userform').submit()
|
|
|
|
+ cy.get('#flash-message').should('contain', 'Saved all changes')
|
|
|
|
+
|
|
})
|
|
})
|
|
|
|
|
|
it('logouts out', function()
|
|
it('logouts out', function()
|