mirror of
https://github.com/typemill/typemill.git
synced 2025-03-14 17:19:39 +01:00
Version 1.3.7
This commit is contained in:
parent
14c36c0d88
commit
fa615167a7
@ -4,6 +4,7 @@ describe('Typemill Setup', function()
|
||||
{
|
||||
// visit setup form
|
||||
cy.visit('/setup')
|
||||
// cy.visit('/setup',{ onBeforeLoad: (_contentWindow) => { Object.defineProperty(navigator, 'language', { value: 'fr-FR' }) } })
|
||||
cy.url().should('include','/setup')
|
||||
|
||||
// add data and check attributes
|
||||
@ -63,7 +64,7 @@ describe('Typemill Setup', function()
|
||||
Cypress.Cookies.preserveOnce('typemill-session')
|
||||
|
||||
// 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.url().should('include', '/tm/settings')
|
||||
})
|
||||
@ -74,16 +75,30 @@ describe('Typemill Setup', function()
|
||||
.should('have.value', 'TYPEMILL')
|
||||
.and('have.attr','required')
|
||||
cy.get('input[name="settings[author]"]')
|
||||
.should('have.value', 'Unknown')
|
||||
cy.get('select[name="settings[copyright]"]')
|
||||
cy.get('input[name="settings[year]"]')
|
||||
.should('have.attr', 'required')
|
||||
cy.get('select[name="settings[language]"]')
|
||||
// cy.get('select[name="settings[langattr]"]')
|
||||
cy.get('input[name="settings[sitemap]"]')
|
||||
.should('have.value', 'http://localhost/typemillTest/cache/sitemap.xml')
|
||||
.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()
|
||||
{
|
||||
@ -95,6 +110,14 @@ describe('Typemill Setup', function()
|
||||
.and('have.attr','disabled')
|
||||
cy.get('input[name="username"]')
|
||||
.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"]')
|
||||
.should('have.value', 'trendschau@gmail.com')
|
||||
.and('have.attr','required')
|
||||
@ -104,6 +127,10 @@ describe('Typemill Setup', function()
|
||||
.should('have.value', '')
|
||||
cy.get('input[name="newpassword"]')
|
||||
.should('have.value', '')
|
||||
|
||||
cy.get('#userform').submit()
|
||||
cy.get('#flash-message').should('contain', 'Saved all changes')
|
||||
|
||||
})
|
||||
|
||||
it('logouts out', function()
|
||||
|
@ -105,14 +105,19 @@ describe('Typemill Initial Frontend', function()
|
||||
/* images */
|
||||
cy.get('img').eq(0).should('have.attr', 'alt', 'alt-text')
|
||||
cy.get('img').eq(0).should('have.attr', 'src', 'media/markdown.png')
|
||||
cy.get('img').eq(2).should('have.id', 'myid')
|
||||
cy.get('figure').eq(2).should('have.id', 'myid')
|
||||
.and('have.class', 'otherclass')
|
||||
.and('have.attr', 'alt', 'alt-text')
|
||||
cy.get('img').eq(2).should('have.attr', 'alt', 'alt-text')
|
||||
.and('have.attr', 'title', 'my title')
|
||||
.and('have.attr', 'width', '150px')
|
||||
|
||||
/* blockquote */
|
||||
cy.get('blockquote').should('exist')
|
||||
|
||||
/* has navigation element */
|
||||
cy.get('.notice1').should('exist')
|
||||
cy.get('.notice2').should('exist')
|
||||
cy.get('.notice3').should('exist')
|
||||
|
||||
/* footnote */
|
||||
cy.get('sup').eq(0).should('have.id', 'fnref1:1')
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
<div class="formWrapper">
|
||||
|
||||
<form method="POST" action="{{ path_for('user.update') }}">
|
||||
<form id="userform" method="POST" action="{{ path_for('user.update') }}">
|
||||
|
||||
<section id="user" class="settings">
|
||||
|
||||
@ -93,7 +93,7 @@
|
||||
<div id="modalWindow" class="modal">
|
||||
<div class="modalInner">
|
||||
<div id="closeModal" class="closeModal">X</div>
|
||||
<form method="POST" action="{{ path_for('user.delete') }}">
|
||||
<form id="userdeleteform" method="POST" action="{{ path_for('user.delete') }}">
|
||||
<h2>{{ __('Delete') }} {{ userdata.username }}</h2>
|
||||
<p>{{ __('Do you really want to delete the user') }} {{userdata.username}}? {{ __('Please confirm') }}.</p>
|
||||
<input type="hidden" name="username" value="{{userdata.username}}">
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
<div class="formWrapper">
|
||||
|
||||
<form method="POST" action="{{ path_for('user.create') }}">
|
||||
<form id="userform" method="POST" action="{{ path_for('user.create') }}">
|
||||
|
||||
<section id="new-user" class="settings">
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user