Skip to content

Commit

Permalink
3032 Update tests for new column
Browse files Browse the repository at this point in the history
  • Loading branch information
dwalizer committed Jan 7, 2025
1 parent 7c55ec8 commit e45efde
Showing 1 changed file with 48 additions and 48 deletions.
96 changes: 48 additions & 48 deletions e2e-tests/cypress/e2e/users_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,22 @@ describe('Users Tests', () => {

// default sort order is 'Points Last Earned' desc
cy.validateTable(tableSelector, [
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(7, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(6, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(5, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(4, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(3, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(2, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(7, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(6, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(5, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(4, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(3, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(2, 'day')) }],
], 5);

cy.get(`${tableSelector}`).contains('Points Last Earned').click();
cy.validateTable(tableSelector, [
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(2, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(3, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(4, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(5, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(6, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(7, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(2, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(3, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(4, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(5, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(6, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(7, 'day')) }],
], 5);

cy.get(`${tableSelector}`).contains('User').click();
Expand Down Expand Up @@ -138,12 +138,12 @@ describe('Users Tests', () => {

// default sort order is 'Points Last Earned' desc
cy.validateTable(tableSelector, [
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(7, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(6, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(5, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(4, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(3, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(2, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(7, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(6, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(5, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(4, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(3, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(2, 'day')) }],
], 5);

cy.get('[data-pc-extend="paginator"] [aria-label="Page 1"]').click()
Expand All @@ -160,10 +160,10 @@ describe('Users Tests', () => {
cy.get('[data-cy="archiveUsersTableBtn"]').should('be.disabled');

cy.validateTable(tableSelector, [
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(7, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(5, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(3, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(2, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(7, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(5, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(3, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(2, 'day')) }],
], 5);

// navigate to archived users
Expand Down Expand Up @@ -198,12 +198,12 @@ describe('Users Tests', () => {

cy.wait('@getUsers')
cy.validateTable(tableSelector, [
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(7, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(6, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(5, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(4, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(3, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(2, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(7, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(6, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(5, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(4, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(3, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(2, 'day')) }],
], 5);

cy.get('[data-p-index="0"] [data-pc-name="rowcheckbox"]').click()
Expand Down Expand Up @@ -1050,7 +1050,7 @@ describe('Users Tests', () => {
cy.clickNav('Users');
cy.wait('@getUsers')

cy.get(`${tableSelector} th`).should('have.length', 5)
cy.get(`${tableSelector} th`).should('have.length', 6)
cy.get(`${tableSelector}`).should('contain', 'Org');
cy.validateTable(tableSelector, [
[{colIndex: 2, value: 'tagA'}],
Expand Down Expand Up @@ -1093,7 +1093,7 @@ describe('Users Tests', () => {
cy.wait('@loadConfig')
cy.clickNav('Users');
cy.wait('@getUsers')
cy.get(`${tableSelector} th`).should('have.length', 4)
cy.get(`${tableSelector} th`).should('have.length', 5)
cy.get(`${tableSelector}`).should('not.contain', 'Org');
});

Expand Down Expand Up @@ -1136,7 +1136,7 @@ describe('Users Tests', () => {
cy.clickNav('Users');
cy.wait('@getUsers')

cy.get(`${tableSelector} th`).should('have.length', 5)
cy.get(`${tableSelector} th`).should('have.length', 6)

cy.get(`${tableSelector} [data-cy="usersTable_viewDetailsLink"]`).first().click();
cy.wait('@getUserTags')
Expand Down Expand Up @@ -1174,7 +1174,7 @@ describe('Users Tests', () => {
cy.clickNav('Users');
cy.wait('@getUsers')

cy.get(`${tableSelector} th`).should('have.length', 5)
cy.get(`${tableSelector} th`).should('have.length', 6)

cy.get(`${tableSelector} [data-cy="usersTable_viewDetailsLink"]`).first().click();
cy.contains("Client Display");
Expand All @@ -1193,50 +1193,50 @@ describe('Users Tests', () => {

// default sort order is 'Points Last Earned' desc
cy.validateTable(tableSelector, [
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(7, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(6, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(5, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(4, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(3, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(2, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(7, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(6, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(5, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(4, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(3, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(2, 'day')) }],
], 5);

cy.get('[data-cy=users-progress-input]').type('{selectall}50')
cy.get('[data-cy="users-filterBtn"]').click();
// users-progress-input

cy.validateTable(tableSelector, [
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(7, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(6, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(5, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(4, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(7, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(6, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(5, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(4, 'day')) }],
], 5);

cy.get('[data-cy=users-progress-input]').type('{selectall}60')
cy.get('[data-cy="users-filterBtn"]').click();
// users-progress-input

cy.validateTable(tableSelector, [
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(7, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(6, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(5, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(7, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(6, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(5, 'day')) }],
], 5);

cy.get('[data-cy=users-progress-input]').type('{selectall}70')
cy.get('[data-cy="users-filterBtn"]').click();
// users-progress-input

cy.validateTable(tableSelector, [
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(7, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(6, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(7, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(6, 'day')) }],
], 5);

cy.get('[data-cy=users-progress-input]').type('{selectall}80')
cy.get('[data-cy="users-filterBtn"]').click();
// users-progress-input

cy.validateTable(tableSelector, [
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 4, value: dateFormatter(m.clone().add(7, 'day')) }],
[{ colIndex: 1, value: '[email protected]' }, { colIndex: 5, value: dateFormatter(m.clone().add(7, 'day')) }],
], 5);

cy.get('[data-cy=users-progress-input]').type('{selectall}90')
Expand Down

0 comments on commit e45efde

Please sign in to comment.