-
Notifications
You must be signed in to change notification settings - Fork 289
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Exports the functions inside the admin file so they are accessible within the `hedyApp` Fixes #5865 **How to test** * Login as admin * Go to http://localhost:8080/admin/users and use the filter * It should work * I also added a cypress test **Checklist** Done? Check if you have it all in place using this list: (mark with x if done)
- Loading branch information
Showing
5 changed files
with
58 additions
and
15 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
Large diffs are not rendered by default.
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
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
30 changes: 22 additions & 8 deletions
30
tests/cypress/e2e/admin_page/user_overview/view_all_users.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 |
---|---|---|
@@ -1,14 +1,28 @@ | ||
|
||
import { goToAdminUsersPage } from '../../tools/navigation/nav.js'; | ||
|
||
it('should view all users', () => { | ||
goToAdminUsersPage(); | ||
|
||
cy.getDataCy('view_all_button').should('be.not.disabled').should('be.visible').click(); | ||
describe('Test for users page within admins UI', () => { | ||
it('should view all users', () => { | ||
goToAdminUsersPage(); | ||
|
||
cy.getDataCy('view_all_button').should('be.not.disabled').should('be.visible').click(); | ||
|
||
cy.location().should((loc) => { | ||
console.log(loc); | ||
expect(loc.pathname).equal(Cypress.env('admin_users_page')); | ||
expect(loc.search).equal('?filter=all'); | ||
}) | ||
}) | ||
|
||
cy.location().should((loc) => { | ||
console.log(loc); | ||
expect(loc.pathname).equal(Cypress.env('admin_users_page')); | ||
expect(loc.search).equal('?filter=all'); | ||
it('should be able to use the filter', () => { | ||
goToAdminUsersPage(); | ||
cy.getDataCy('admin_filter_category').select('last_login') | ||
cy.getDataCy('admin_start_date').type('2024-10-10') | ||
cy.getDataCy('admin_end_date').type('2024-10-11') | ||
cy.getDataCy('submit').click() | ||
cy.location().should((loc) => { | ||
expect(loc.search).equal('?filter=last_login&start=2024-10-10&end=2024-10-11') | ||
}) | ||
}) | ||
}) | ||
}) |