Skip to content

Commit

Permalink
#2490: fixing oauth tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sudo-may committed Jun 19, 2024
1 parent 4a2a39c commit 48b862b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion e2e-tests/cypress/e2e/approver/approver_conf_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ describe('Approver Config Tests', () => {

cy.get(`[data-cy="workloadCell_${user1}"] [data-cy="editApprovalBtn"]`).click()
cy.get(`[data-cy="expandedChild_${user1}"] [data-cy="userIdInput"]`).click();
cy.selectItem(`[data-cy="expandedChild_${user1}"] [data-cy="userIdInput"] #existingUserInput`, 'userA', true, true);
cy.selectItem(`[data-cy="expandedChild_${user1}"] [data-cy="userIdInput"] #existingUserInput`, 'userb', true, true);
// cy.get(`[data-cy="expandedChild_${user1}"] [data-cy="userIdInput"] .vs__dropdown-option`).contains('userA').click({force: true});
cy.get(`[data-cy="expandedChild_${user1}"] [data-cy="addUserConfBtn"]`).click()
cy.get(`[data-cy="workloadCell_${user1}"]`).contains('1 Specific User')
Expand Down
4 changes: 2 additions & 2 deletions e2e-tests/cypress/e2e/approver/approver_conf_users_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ describe('Approver Config Users Tests', () => {
cy.get(`[data-cy="expandedChild_${user1}"] [data-cy="addUserConfBtn"]`).should('be.disabled')

// cy.get(`[data-cy="expandedChild_${user1}"] [data-cy="userIdInput"]`).click();
cy.selectItem(`[data-cy="expandedChild_${user1}"] [data-cy="userIdInput"] #existingUserInput`, 'userA', true, true);
cy.selectItem(`[data-cy="expandedChild_${user1}"] [data-cy="userIdInput"] #existingUserInput`, 'usera', true, true);
// cy.get(`[data-cy="expandedChild_${user1}"] [data-cy="userIdInput"] .p-dropdown-option`).contains('userA').click();
cy.get(`[data-cy="expandedChild_${user1}"] [data-cy="addUserConfBtn"]`).should('be.enabled')

Expand All @@ -79,7 +79,7 @@ describe('Approver Config Users Tests', () => {
cy.get(`[data-cy="workloadCell_${user1}"]`).contains('1 Specific User')

// cy.get(`[data-cy="expandedChild_${user1}"] [data-cy="userIdInput"]`).click();
cy.selectItem(`[data-cy="expandedChild_${user1}"] [data-cy="userIdInput"] #existingUserInput`, 'userB', true, true);
cy.selectItem(`[data-cy="expandedChild_${user1}"] [data-cy="userIdInput"] #existingUserInput`, 'userb', true, true);
// cy.get(`[data-cy="expandedChild_${user1}"] [data-cy="userIdInput"] .p-dropdown-option`).contains('userB').click();
cy.get(`[data-cy="expandedChild_${user1}"] [data-cy="addUserConfBtn"]`).should('be.enabled')
cy.get(`[data-cy="expandedChild_${user1}"] [data-cy="addUserConfBtn"]`).click()
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/cypress/e2e/inception/inception_skills_specs.js
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ describe('Inception Skills Tests', () => {
cy.get(`[data-cy="expandedChild_${user1}"] [data-cy="noUserConf"]`).should('exist')

cy.get(`[data-cy="expandedChild_${user1}"] [data-cy="userIdInput"]`).click();
cy.selectItem(`[data-cy="expandedChild_${user1}"] [data-cy="userIdInput"] #existingUserInput`, 'userA', true, true);
cy.selectItem(`[data-cy="expandedChild_${user1}"] [data-cy="userIdInput"] #existingUserInput`, 'usera', true, true);
cy.get(`[data-cy="expandedChild_${user1}"] [data-cy="addUserConfBtn"]`).should('be.enabled')

cy.assertInceptionPoints('Skills', 'ConfigureSelfApprovalWorkload', 0, false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,11 @@ class SuggestUsersSpecs extends DefaultIntSpec {
// user by registering with dashboard
createService(users[1])

String user1UserIdForDisplay = userAttrsRepo.findByUserIdIgnoreCase(users[1].toLowerCase()).userIdForDisplay

when:
def allUsers = skillsService.suggestClientUsers("user")

then:
allUsers.userId == [users[0], user1UserIdForDisplay]
allUsers.userId == [users[0], users[1]].collect { it.toLowerCase() }.sort()
}
}

0 comments on commit 48b862b

Please sign in to comment.