-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
69 changed files
with
1,961 additions
and
1,850 deletions.
There are no files selected for viewing
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
51 changes: 51 additions & 0 deletions
51
...tests/tests-cypress/cypress/integration/001-CONFIGURATION/001-test-update-notification.js
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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/** | ||
* Functionality tested | ||
* - Notification box for new versions on main dashboard | ||
* - Notification alert for new versions on configuration screens | ||
* | ||
*/ | ||
var utils = require('../../support/utils'); | ||
describe('Update notification box', function () { | ||
|
||
/** | ||
* Checks when module needs update on the main dashboard | ||
*/ | ||
it('Needs update on main dashboard', function () { | ||
cy.logToAdmin(); | ||
cy.get('#hipayupdate') | ||
.should('exist') | ||
.should('be.visible'); | ||
cy.get('#hipayupdate > .panel-heading') | ||
.should('contain', 'HiPay Information'); | ||
cy.get('#hipayupdate #hipayNotifLogo') | ||
.should('exist') | ||
.should('be.visible'); | ||
cy.get('#hipayupdate p') | ||
.should('exist') | ||
.should('be.visible') | ||
.should(($div) => { | ||
const text = $div.text(); | ||
expect(text).to.match(/^(\s*)Une nouvelle version du module HiPay Enterprise est disponible\.(\s*)Voir les détails de la version 2\.7\.0(\s*)ou(\s*)mettre à jour\.(\s*)$/); | ||
}); | ||
cy.adminLogOut(); | ||
}); | ||
|
||
/** | ||
* Checks when module needs update on the config page | ||
*/ | ||
it('Needs update on config page', function () { | ||
cy.logToAdmin(); | ||
cy.goToHipayModuleAdmin(); | ||
cy.get('#hipayupdate') | ||
.should('exist') | ||
.should('be.visible') | ||
.should('have.class', 'alert') | ||
.should('have.class', 'alert-danger') | ||
.should(($div) => { | ||
const text = $div.text(); | ||
expect(text).to.match(/^(\s*)Une nouvelle version du module HiPay Enterprise est disponible\.(\s*)Voir les détails de la version 2\.7\.0(\s*)ou(\s*)mettre à jour\.(\s*)$/); | ||
}); | ||
cy.adminLogOut(); | ||
}); | ||
}); | ||
|
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
Oops, something went wrong.