From 034e26798e3681db53a1336aaf85d5b5a3208b40 Mon Sep 17 00:00:00 2001 From: Dima May Date: Wed, 19 Jun 2024 10:09:14 +0000 Subject: [PATCH 1/8] #2490: running oauth CI --- .github/workflows/build-and-test-oauth.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-and-test-oauth.yml b/.github/workflows/build-and-test-oauth.yml index c9d248709a..ba0f580866 100644 --- a/.github/workflows/build-and-test-oauth.yml +++ b/.github/workflows/build-and-test-oauth.yml @@ -25,6 +25,7 @@ on: schedule: - cron: '0 6 * * *' workflow_dispatch: + push: # pull_request: # paths-ignore: # - 'README.md' From 1ea441d672dc9d7e94348bacf0cf55d61edba60d Mon Sep 17 00:00:00 2001 From: Dima May Date: Wed, 19 Jun 2024 11:29:18 +0000 Subject: [PATCH 2/8] #2490: added oauth login logic back --- .github/workflows/build-and-test-oauth.yml | 3 +-- dashboard-prime/src/components/access/Login.vue | 2 +- dashboard-prime/src/stores/UseAuthState.js | 8 +++++--- e2e-tests/package.json | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-and-test-oauth.yml b/.github/workflows/build-and-test-oauth.yml index ba0f580866..8cb9ffe7d4 100644 --- a/.github/workflows/build-and-test-oauth.yml +++ b/.github/workflows/build-and-test-oauth.yml @@ -141,7 +141,7 @@ jobs: - name: Check running containers run: docker ps -a - - name: Caputre Hydra Oauth Service logs + - name: Capture Hydra Oauth Service logs run: | mkdir -p ./e2e-tests/logs docker logs hydra > ./e2e-tests/logs/hydra.out & @@ -166,7 +166,6 @@ jobs: npm install npm run backend:dropAllDBTables npm run cyServices:start:skills-service:oauth - npm run cyServices:start:client-display:oauth cd .. - name: Run Cypress tests diff --git a/dashboard-prime/src/components/access/Login.vue b/dashboard-prime/src/components/access/Login.vue index 9d00a2f8eb..0ff2e2370f 100644 --- a/dashboard-prime/src/components/access/Login.vue +++ b/dashboard-prime/src/components/access/Login.vue @@ -81,7 +81,7 @@ onBeforeMount(() => { } }) const oAuth2Login = (registrationId) => { - // this.$store.dispatch('oAuth2Login', registrationId); + authState.oAuth2Login(registrationId) } diff --git a/dashboard-prime/src/stores/UseAuthState.js b/dashboard-prime/src/stores/UseAuthState.js index f7f00165a3..ae55ca1341 100644 --- a/dashboard-prime/src/stores/UseAuthState.js +++ b/dashboard-prime/src/stores/UseAuthState.js @@ -1,5 +1,5 @@ import { computed, ref } from 'vue' -import { useRouter } from 'vue-router' +import { useRoute, useRouter } from 'vue-router' import { defineStore } from 'pinia' import axios from 'axios' import { SkillsConfiguration } from '@skilltree/skills-client-js' @@ -17,6 +17,7 @@ export const useAuthState = defineStore('authState', () => { const oAuthAuth = ref(false) const router = useRouter() + const route = useRoute() const appConfig = useAppConfig() const appInfoState = useAppInfoState() @@ -95,8 +96,9 @@ export const useAuthState = defineStore('authState', () => { } const oAuth2Login = (oAuthId) => { setOauth2AuthUser() - const { redirect } = router.currentRoute.query - window.location = `/oauth2/authorization/${encodeURIComponent(oAuthId)}${redirect ? `?skillsRedirectUri=${redirect}` : ''}` + const redirect = route.query.redirect + const newLocation = `/oauth2/authorization/${encodeURIComponent(oAuthId)}${redirect ? `?skillsRedirectUri=${redirect}` : ''}` + window.location = newLocation } const restoreSessionIfAvailable = () => { setRestoringSession(true) diff --git a/e2e-tests/package.json b/e2e-tests/package.json index 6386476ff6..76933c6df8 100644 --- a/e2e-tests/package.json +++ b/e2e-tests/package.json @@ -50,7 +50,7 @@ "backend:start:verifyEmail:ci": "mkdir -p ./logs && npm run backend:start:verifyEmail > ./logs/skills-service.out &", "backend:start:oauth:ci": "mkdir -p ./logs && npm run backend:start:oauth > ./logs/skills-service.out &", "backend:start:rabbitmq:ci": "mkdir -p ./logs && npm run backend:start:rabbitmq > ./logs/skills-service.out &", - "backend:waitToStart": "npx wait-on -t 160000 http://localhost:8080", + "backend:waitToStart": "echo \"Started waiting for skills-service at[$(date)]\" && npx wait-on -t 160000 http://localhost:8080", "backend:resetDb": "export PGPASSWORD=skillsPassword && psql -U postgres -h $npm_package_config_dbHost -d $npm_package_config_dbName -f ./cypress/db/reset.sql", "backend:clearDb": "export PGPASSWORD=skillsPassword && psql -U postgres -h $npm_package_config_dbHost -d $npm_package_config_dbName -f ./cypress/db/clear.sql", "backend:setupInviteOnly": "export PGPASSWORD=skillsPassword && psql -U postgres -h $npm_package_config_dbHost -d $npm_package_config_dbName -f ./cypress/db/createInviteOnlyProject.sql", From 397e07c1516ba9e96360787056d9839541bb9a8d Mon Sep 17 00:00:00 2001 From: Dima May Date: Wed, 19 Jun 2024 13:04:11 +0000 Subject: [PATCH 3/8] #2490: debugging oauth ci --- .github/workflows/build-and-test-oauth.yml | 3 +-- e2e-tests/package.json | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-and-test-oauth.yml b/.github/workflows/build-and-test-oauth.yml index 8cb9ffe7d4..2a4d7073c2 100644 --- a/.github/workflows/build-and-test-oauth.yml +++ b/.github/workflows/build-and-test-oauth.yml @@ -163,8 +163,7 @@ jobs: - name: Start services for Cypress tests run: | cd e2e-tests - npm install - npm run backend:dropAllDBTables +# npm run backend:dropAllDBTables npm run cyServices:start:skills-service:oauth cd .. diff --git a/e2e-tests/package.json b/e2e-tests/package.json index 76933c6df8..238765a4b1 100644 --- a/e2e-tests/package.json +++ b/e2e-tests/package.json @@ -50,7 +50,7 @@ "backend:start:verifyEmail:ci": "mkdir -p ./logs && npm run backend:start:verifyEmail > ./logs/skills-service.out &", "backend:start:oauth:ci": "mkdir -p ./logs && npm run backend:start:oauth > ./logs/skills-service.out &", "backend:start:rabbitmq:ci": "mkdir -p ./logs && npm run backend:start:rabbitmq > ./logs/skills-service.out &", - "backend:waitToStart": "echo \"Started waiting for skills-service at[$(date)]\" && npx wait-on -t 160000 http://localhost:8080", + "backend:waitToStart": "echo \"Started waiting for skills-service at [$(date)]\" && npx wait-on -t 160000 http://localhost:8080", "backend:resetDb": "export PGPASSWORD=skillsPassword && psql -U postgres -h $npm_package_config_dbHost -d $npm_package_config_dbName -f ./cypress/db/reset.sql", "backend:clearDb": "export PGPASSWORD=skillsPassword && psql -U postgres -h $npm_package_config_dbHost -d $npm_package_config_dbName -f ./cypress/db/clear.sql", "backend:setupInviteOnly": "export PGPASSWORD=skillsPassword && psql -U postgres -h $npm_package_config_dbHost -d $npm_package_config_dbName -f ./cypress/db/createInviteOnlyProject.sql", @@ -62,7 +62,7 @@ "client-display:waitToStart": "npx wait-on -t 160000 http://localhost:8083", "cyServices:start:skills-service": "npm run backend:start:ci && npm run backend:waitToStart", "cyServices:start:skills-service:verifyEmail": "npm run fake-smtp:start:ci && npm run backend:start:verifyEmail:ci && npm run backend:waitToStart", - "cyServices:start:skills-service:oauth": "npm run fake-smtp:start:ci && npm run backend:start:oauth:ci && npm run backend:waitToStart", + "cyServices:start:skills-service:oauth": "npm run fake-smtp:start:ci && npm run backend:start:oauth && npm run backend:waitToStart", "cyServices:start:skills-service:rabbitmq": "npm run fake-smtp:start:ci && npm run backend:start:rabbitmq:ci && npm run backend:waitToStart", "cyServices:start:client-display": "npm run client-display:serve:ci && npm run client-display:waitToStart", "cyServices:start:client-display:oauth": "npm run client-display:serve:ci:oauth && npm run client-display:waitToStart", From 21fa8f87b08c6bcba6c15393b9dea6afe4412716 Mon Sep 17 00:00:00 2001 From: Dima May Date: Wed, 19 Jun 2024 13:05:23 +0000 Subject: [PATCH 4/8] #2490: debugging oauth ci --- .github/workflows/build-and-test-oauth.yml | 1 - .github/workflows/build-and-test.yml | 12 ++++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-and-test-oauth.yml b/.github/workflows/build-and-test-oauth.yml index 2a4d7073c2..089969c835 100644 --- a/.github/workflows/build-and-test-oauth.yml +++ b/.github/workflows/build-and-test-oauth.yml @@ -163,7 +163,6 @@ jobs: - name: Start services for Cypress tests run: | cd e2e-tests -# npm run backend:dropAllDBTables npm run cyServices:start:skills-service:oauth cd .. diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 07b4bc3668..70fdc35b1d 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -18,12 +18,12 @@ on: schedule: - cron: '0 5 * * *' workflow_dispatch: - push: - paths-ignore: - - 'README.md' - - '.github/workflows/build-and-test-postgres.yml' - - '.github/workflows/publish-image-snapshot.yml' - - '.gitlab-ci.yml' +# push: +# paths-ignore: +# - 'README.md' +# - '.github/workflows/build-and-test-postgres.yml' +# - '.github/workflows/publish-image-snapshot.yml' +# - '.gitlab-ci.yml' jobs: build-skills-service-for-ui-tests: From 5a7da4823c8b0b9cb14c0c67806a2468f9ad2401 Mon Sep 17 00:00:00 2001 From: Dima May Date: Wed, 19 Jun 2024 13:08:17 +0000 Subject: [PATCH 5/8] #2490: debugging oauth ci --- .github/workflows/build-and-test-oauth.yml | 4 ++-- e2e-tests/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-and-test-oauth.yml b/.github/workflows/build-and-test-oauth.yml index 089969c835..d74315f770 100644 --- a/.github/workflows/build-and-test-oauth.yml +++ b/.github/workflows/build-and-test-oauth.yml @@ -39,7 +39,7 @@ jobs: - uses: actions/setup-node@v3 with: - node-version: '14' + node-version: '20.11.0' - uses: actions/setup-java@v3 with: @@ -115,7 +115,7 @@ jobs: - uses: actions/setup-node@v3 with: - node-version: '14' + node-version: '20.11.0' - uses: actions/setup-java@v3 with: diff --git a/e2e-tests/package.json b/e2e-tests/package.json index 238765a4b1..f67cb8057d 100644 --- a/e2e-tests/package.json +++ b/e2e-tests/package.json @@ -62,7 +62,7 @@ "client-display:waitToStart": "npx wait-on -t 160000 http://localhost:8083", "cyServices:start:skills-service": "npm run backend:start:ci && npm run backend:waitToStart", "cyServices:start:skills-service:verifyEmail": "npm run fake-smtp:start:ci && npm run backend:start:verifyEmail:ci && npm run backend:waitToStart", - "cyServices:start:skills-service:oauth": "npm run fake-smtp:start:ci && npm run backend:start:oauth && npm run backend:waitToStart", + "cyServices:start:skills-service:oauth": "npm run fake-smtp:start:ci && npm run backend:start:oauth:ci && npm run backend:waitToStart", "cyServices:start:skills-service:rabbitmq": "npm run fake-smtp:start:ci && npm run backend:start:rabbitmq:ci && npm run backend:waitToStart", "cyServices:start:client-display": "npm run client-display:serve:ci && npm run client-display:waitToStart", "cyServices:start:client-display:oauth": "npm run client-display:serve:ci:oauth && npm run client-display:waitToStart", From bd6055a807bbc36b1409326b5ceb2b62ce42df03 Mon Sep 17 00:00:00 2001 From: Dima May Date: Wed, 19 Jun 2024 13:16:25 +0000 Subject: [PATCH 6/8] #2490: debugging oauth ci --- .github/workflows/build-and-test-oauth.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-and-test-oauth.yml b/.github/workflows/build-and-test-oauth.yml index d74315f770..35d0212b3c 100644 --- a/.github/workflows/build-and-test-oauth.yml +++ b/.github/workflows/build-and-test-oauth.yml @@ -169,6 +169,7 @@ jobs: - name: Run Cypress tests run: | cd e2e-tests + npm install ../.github/scripts/runSubsetOfCypressTests.sh -t 20 -c ${{ matrix.container }} cd .. env: From 4a2a39c13376db44e3116994e975d8218efcdcd6 Mon Sep 17 00:00:00 2001 From: Dima May Date: Wed, 19 Jun 2024 14:23:44 +0000 Subject: [PATCH 7/8] #2490: fixing oauth tests --- .github/workflows/build-and-test.yml | 11 ++++---- .../e2e/approver/approver_conf_users_spec.js | 26 ++++++++++++------- .../e2e/projects_admin_management_spec.js | 6 ++++- .../skills/storage/repos/UserAttrsRepo.groovy | 2 +- 4 files changed, 28 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 70fdc35b1d..3c59f7e06d 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -18,12 +18,11 @@ on: schedule: - cron: '0 5 * * *' workflow_dispatch: -# push: -# paths-ignore: -# - 'README.md' -# - '.github/workflows/build-and-test-postgres.yml' -# - '.github/workflows/publish-image-snapshot.yml' -# - '.gitlab-ci.yml' + push: + paths-ignore: + - 'README.md' + - '.github/workflows/build-and-test-postgres.yml' + - '.github/workflows/publish-image-snapshot.yml' jobs: build-skills-service-for-ui-tests: diff --git a/e2e-tests/cypress/e2e/approver/approver_conf_users_spec.js b/e2e-tests/cypress/e2e/approver/approver_conf_users_spec.js index 4b5df53070..04ac7780d2 100644 --- a/e2e-tests/cypress/e2e/approver/approver_conf_users_spec.js +++ b/e2e-tests/cypress/e2e/approver/approver_conf_users_spec.js @@ -200,15 +200,23 @@ describe('Approver Config Users Tests', () => { const headerSelector = `${tableSelector} thead tr th`; cy.get(headerSelector).contains('User').click(); - cy.selectItem(`[data-cy="expandedChild_${user1}"] [data-cy="userIdInput"] #existingUserInput`, 'userE', true, true); - cy.get(`[data-cy="expandedChild_${user1}"] [data-cy="addUserConfBtn"]`).click() - cy.validateTable(tableSelector, [ - [{ colIndex: 0, value: 'userA' }], - [{ colIndex: 0, value: 'userB' }], - [{ colIndex: 0, value: 'userC' }], - [{ colIndex: 0, value: 'userD' }], - [{ colIndex: 0, value: 'userE' }], - ], 4); + cy.fixture('vars.json').then((vars) => { + const defaultUser = Cypress.env('oauthMode') ? 'foo' : vars.defaultUser + cy.selectItem(`[data-cy="expandedChild_${user1}"] [data-cy="userIdInput"] #existingUserInput`, defaultUser, true, true); + cy.get(`[data-cy="expandedChild_${user1}"] [data-cy="addUserConfBtn"]`).click() + + const compare = (a, b) => { + return a[0].value?.localeCompare(b[0].value) + } + const expected = [ + [{ colIndex: 0, value: 'userA' }], + [{ colIndex: 0, value: 'userB' }], + [{ colIndex: 0, value: 'userC' }], + [{ colIndex: 0, value: 'userD' }], + [{ colIndex: 0, value: defaultUser }], + ].sort(compare) + cy.validateTable(tableSelector, expected, 4); + }) }) }); diff --git a/e2e-tests/cypress/e2e/projects_admin_management_spec.js b/e2e-tests/cypress/e2e/projects_admin_management_spec.js index cdb0f77282..12f611378b 100644 --- a/e2e-tests/cypress/e2e/projects_admin_management_spec.js +++ b/e2e-tests/cypress/e2e/projects_admin_management_spec.js @@ -335,10 +335,14 @@ describe('Projects Admin Management Tests', () => { cy.get('[data-pc-section="panel"] [data-pc-section="itemlabel"]').contains('Administrator').click(); cy.wait('@addAdmin') cy.get(`${tableSelector} thead th`).contains('User').click(); + + const compare = (a, b) => { + 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' }], - ], 5, true, null, false); + ].sort(compare), 5, true, null, false); }); it('Existing users are not suggested', () => { diff --git a/service/src/main/java/skills/storage/repos/UserAttrsRepo.groovy b/service/src/main/java/skills/storage/repos/UserAttrsRepo.groovy index ac84d22f34..bc20b2d07b 100644 --- a/service/src/main/java/skills/storage/repos/UserAttrsRepo.groovy +++ b/service/src/main/java/skills/storage/repos/UserAttrsRepo.groovy @@ -43,7 +43,7 @@ interface UserAttrsRepo extends CrudRepository { @Query(value='''select attrs.email from user_attrs attrs where attrs.user_id = ?1''', nativeQuery = true) String findEmailByUserId(String userId) - @Query("SELECT DISTINCT(ua.userIdForDisplay) from UserAttrs ua where lower(ua.userIdForDisplay) LIKE %?1% order by ua.userIdForDisplay asc" ) + @Query("SELECT DISTINCT(ua.userId) from UserAttrs ua where lower(ua.userId) LIKE %?1% order by ua.userId asc" ) List findDistinctUserIdForDisplay(String userUserIdForDisplayQuery, Pageable pageable) } From 48b862b6f44faaf8787e48a0c67609771b7f903f Mon Sep 17 00:00:00 2001 From: Dima May Date: Wed, 19 Jun 2024 14:59:11 +0000 Subject: [PATCH 8/8] #2490: fixing oauth tests --- e2e-tests/cypress/e2e/approver/approver_conf_spec.js | 2 +- e2e-tests/cypress/e2e/approver/approver_conf_users_spec.js | 4 ++-- e2e-tests/cypress/e2e/inception/inception_skills_specs.js | 2 +- .../src/test/java/skills/intTests/SuggestUsersSpecs.groovy | 3 +-- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/e2e-tests/cypress/e2e/approver/approver_conf_spec.js b/e2e-tests/cypress/e2e/approver/approver_conf_spec.js index bfd4555279..e58be3df72 100644 --- a/e2e-tests/cypress/e2e/approver/approver_conf_spec.js +++ b/e2e-tests/cypress/e2e/approver/approver_conf_spec.js @@ -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') diff --git a/e2e-tests/cypress/e2e/approver/approver_conf_users_spec.js b/e2e-tests/cypress/e2e/approver/approver_conf_users_spec.js index 04ac7780d2..080b11a6b2 100644 --- a/e2e-tests/cypress/e2e/approver/approver_conf_users_spec.js +++ b/e2e-tests/cypress/e2e/approver/approver_conf_users_spec.js @@ -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') @@ -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() diff --git a/e2e-tests/cypress/e2e/inception/inception_skills_specs.js b/e2e-tests/cypress/e2e/inception/inception_skills_specs.js index eabbdd8981..e20cb3d5c7 100644 --- a/e2e-tests/cypress/e2e/inception/inception_skills_specs.js +++ b/e2e-tests/cypress/e2e/inception/inception_skills_specs.js @@ -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) diff --git a/service/src/test/java/skills/intTests/SuggestUsersSpecs.groovy b/service/src/test/java/skills/intTests/SuggestUsersSpecs.groovy index 7967a20d41..772347cfc0 100644 --- a/service/src/test/java/skills/intTests/SuggestUsersSpecs.groovy +++ b/service/src/test/java/skills/intTests/SuggestUsersSpecs.groovy @@ -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() } }