Skip to content

Commit

Permalink
#2943 - fixing test
Browse files Browse the repository at this point in the history
  • Loading branch information
rmmayo committed Nov 8, 2024
1 parent da41eea commit d5cb299
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions e2e-tests/cypress/e2e/projects_admin_management_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,10 @@ describe('Projects Admin Management Tests', () => {
.find('td')
.as('row2');
cy.get('@row1')
.eq(0)
.eq(1)
.contains('[email protected]');
cy.get('@row2')
.eq(0)
.eq(1)
.contains('[email protected]');
} else {
// the default user in oauth mode is different and results in a different sorting order
Expand All @@ -196,10 +196,10 @@ describe('Projects Admin Management Tests', () => {
.find('td')
.as('row2');
cy.get('@row1')
.eq(0)
.eq(1)
.contains('foo bar');
cy.get('@row2')
.eq(0)
.eq(1)
.contains('[email protected]');
}
});
Expand Down Expand Up @@ -315,8 +315,8 @@ describe('Projects Admin Management Tests', () => {
const expectedUserName = Cypress.env('oauthMode') ? 'foo bar' : 'skills@';
cy.get(`${tableSelector} thead th`).contains('Role').click();
cy.validateTable(tableSelector, [
[{ colIndex: 0, value: expectedUserName }, { colIndex: 1, value: 'Administrator' }],
[{ colIndex: 0, value: 'root@' }, { colIndex: 1, value: 'Approver' }],
[{ colIndex: 1, value: expectedUserName }, { colIndex: 2, value: 'Administrator' }],
[{ colIndex: 1, value: 'root@' }, { colIndex: 2, value: 'Approver' }],
], 5, true, null, false);

// reload and retest
Expand All @@ -326,8 +326,8 @@ describe('Projects Admin Management Tests', () => {
// verify that table loaded
cy.get(`${tableSelector} [data-cy="[email protected]"] [data-cy="editUserBtn"]`)
cy.validateTable(tableSelector, [
[{ colIndex: 0, value: expectedUserName }, { colIndex: 1, value: 'Administrator' }],
[{ colIndex: 0, value: 'root@' }, { colIndex: 1, value: 'Approver' }],
[{ colIndex: 1, value: expectedUserName }, { colIndex: 2, value: 'Administrator' }],
[{ colIndex: 1, value: 'root@' }, { colIndex: 2, value: 'Approver' }],
], 5, true, null, false);

cy.get(`${tableSelector} [data-cy="[email protected]"] [data-cy="editUserBtn"]`).click();
Expand All @@ -340,8 +340,8 @@ describe('Projects Admin Management Tests', () => {
return a[0].value?.localeCompare(b[0].value)
}
cy.validateTable(tableSelector, [
[{ colIndex: 0, value: 'root@' }, { colIndex: 1, value: 'Administrator' }],
[{ colIndex: 0, value: expectedUserName }, { colIndex: 1, value: 'Administrator' }],
[{ colIndex: 1, value: 'root@' }, { colIndex: 2, value: 'Administrator' }],
[{ colIndex: 1, value: expectedUserName }, { colIndex: 2, value: 'Administrator' }],
].sort(compare), 5, true, null, false);
});

Expand Down

0 comments on commit d5cb299

Please sign in to comment.