forked from joomla/joomla-cms
-
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.
Adding username reminder test. (joomla#40369)
* adding reminder test * code style change * code style change
- Loading branch information
1 parent
3c1c108
commit 73793b3
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
tests/System/integration/site/components/com_users/Remind.cy.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,27 @@ | ||
describe('Test the remind view', () => { | ||
it('can open the reminder form for test user through menu item', () => { | ||
cy.db_createUser({ name: 'test user', email: 'test@example.com' }) | ||
.then(() => cy.db_createMenuItem({ title: 'Automated test reminder', link: 'index.php?option=com_users&view=remind' })) | ||
.then(() => { | ||
cy.visit('/'); | ||
|
||
cy.get('a:contains(Automated test reminder)').click(); | ||
cy.get('#jform_email').type('test@example.com'); | ||
cy.get('.controls > .btn').click(); | ||
|
||
cy.get('#system-message-container').should('contain.text', 'If the email address you entered is registered on this site you will shortly receive an email with a reminder.'); | ||
}); | ||
}); | ||
|
||
it('can display the remind view for test user', () => { | ||
cy.db_createUser({ name: 'test user', email: 'test@example.com' }) | ||
.then(() => { | ||
cy.visit('index.php?option=com_users&view=remind'); | ||
|
||
cy.get('#jform_email').type('test@example.com'); | ||
cy.get('.controls > .btn').click(); | ||
|
||
cy.get('#system-message-container').should('contain.text', 'If the email address you entered is registered on this site you will shortly receive an email with a reminder.'); | ||
}); | ||
}); | ||
}); |