forked from typemill/typemill
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Version 1.4.6: Optimize Print, add print button, fix text, update cyp…
…ress tests
- Loading branch information
1 parent
bc5c073
commit 7da5da9
Showing
17 changed files
with
133 additions
and
95 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,7 @@ describe('Typemill Setup', function() | |
cy.get('.error').should('contain', 'Length between 5 - 20') | ||
}) | ||
|
||
/* | ||
it('fails without CSRF-token', function () | ||
{ | ||
cy.request({ | ||
|
@@ -45,8 +46,26 @@ describe('Typemill Setup', function() | |
} | ||
}) | ||
.its('body') | ||
.should('include', 'Failed CSRF check') | ||
.should('include', 'The form has a timeout') | ||
}) | ||
*/ | ||
it('fails without CSRF-token', function () | ||
{ | ||
cy.visit('/setup') | ||
|
||
// enter correct data | ||
cy.get('input[name="username"]').clear().type('trendschau') | ||
cy.get('input[name="email"]').clear().type('[email protected]') | ||
cy.get('input[name="password"]').clear().type('password') | ||
cy.get('#csrf_value').then(elem => { | ||
elem.val('wrongvalue'); | ||
}); | ||
|
||
// submit and get validation errors | ||
cy.get('form').submit() | ||
cy.get('#flash-message').should('contain', 'form has a timeout') | ||
}) | ||
|
||
|
||
it('submits valid form data and visit welcome and settings page', function () | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters