diff --git a/e2e-tests/cypress/e2e/accessibility/accessibility_specs.js b/e2e-tests/cypress/e2e/accessibility/accessibility_specs.js index 1ce243060..9494ed30b 100644 --- a/e2e-tests/cypress/e2e/accessibility/accessibility_specs.js +++ b/e2e-tests/cypress/e2e/accessibility/accessibility_specs.js @@ -250,17 +250,6 @@ describe('Accessibility Tests', () => { }); }); }); - Cypress.Commands.add('approveAllRequests', () => { - cy.request('/admin/projects/proj1/approvals?limit=10&ascending=true&page=1&orderBy=userId') - .then((response) => { - response.body.data.forEach((item) => { - cy.wait(200); // that way sort works properly - cy.request('POST', '/admin/projects/proj1/approvals/approve', { - skillApprovalIds: [item.id], - }); - }); - }); - }); cy.createProject(1); cy.createSubject(1, 1); diff --git a/e2e-tests/cypress/e2e/client-display/skills-display-transcript-export_spec.js b/e2e-tests/cypress/e2e/client-display/skills-display-transcript-export_spec.js index a08d71ec5..2b74de9bb 100644 --- a/e2e-tests/cypress/e2e/client-display/skills-display-transcript-export_spec.js +++ b/e2e-tests/cypress/e2e/client-display/skills-display-transcript-export_spec.js @@ -18,18 +18,6 @@ const moment = require("moment-timezone"); describe('Transcript export tests', () => { - Cypress.Commands.add('approveAllRequests', () => { - cy.request('/admin/projects/proj1/approvals?limit=10&ascending=true&page=1&orderBy=userId') - .then((response) => { - response.body.data.forEach((item) => { - cy.wait(200); // that way sort works properly - cy.request('POST', '/admin/projects/proj1/approvals/approve', { - skillApprovalIds: [item.id], - }); - }); - }); - }); - const deleteDownloadDir = () => { try { rmdirSync('cypress/downloads', { maxRetries: 5, recursive: true }); diff --git a/e2e-tests/cypress/e2e/self-report/selfReport-approvalHistory_spec.js b/e2e-tests/cypress/e2e/self-report/selfReport-approvalHistory_spec.js index 00e2d7483..5d84bf776 100644 --- a/e2e-tests/cypress/e2e/self-report/selfReport-approvalHistory_spec.js +++ b/e2e-tests/cypress/e2e/self-report/selfReport-approvalHistory_spec.js @@ -39,17 +39,6 @@ describe('Self Report Approval History Tests', () => { }); }); }); - Cypress.Commands.add('approveAllRequests', () => { - cy.request('/admin/projects/proj1/approvals?limit=10&ascending=true&page=1&orderBy=userId') - .then((response) => { - response.body.data.forEach((item) => { - cy.wait(200); // that way sort works properly - cy.request('POST', '/admin/projects/proj1/approvals/approve', { - skillApprovalIds: [item.id], - }); - }); - }); - }); }); it('empty approval history', () => { diff --git a/e2e-tests/cypress/support/commands.js b/e2e-tests/cypress/support/commands.js index 6c86163ef..4c70eca22 100644 --- a/e2e-tests/cypress/support/commands.js +++ b/e2e-tests/cypress/support/commands.js @@ -1551,4 +1551,16 @@ Cypress.Commands.add("setDarkModeIfNeeded", (darkMode) => { if (darkMode && darkMode.length > 0) { cy.configureDarkMode() } -}) \ No newline at end of file +}) + +Cypress.Commands.add('approveAllRequests', () => { + cy.request('/admin/projects/proj1/approvals?limit=10&ascending=true&page=1&orderBy=userId') + .then((response) => { + response.body.data.forEach((item) => { + cy.wait(200); + cy.request('POST', '/admin/projects/proj1/approvals/approve', { + skillApprovalIds: [item.id], + }); + }); + }); +}); \ No newline at end of file diff --git a/service/src/main/java/skills/skillLoading/SubjectDataLoader.groovy b/service/src/main/java/skills/skillLoading/SubjectDataLoader.groovy index 39faf7d7d..b57e6d391 100644 --- a/service/src/main/java/skills/skillLoading/SubjectDataLoader.groovy +++ b/service/src/main/java/skills/skillLoading/SubjectDataLoader.groovy @@ -367,17 +367,6 @@ class SubjectDataLoader { ) } -// HashMap skillList = new HashMap() -// -// res.forEach { -// def id = it.skillDef.skillId + '-' + it.skillDef.projectId -// if(!skillList.containsKey(id) || it.approval.updated > skillList[id].approval.updated) { -// skillList[id] = it -// } -// } -// -// res = skillList.values().toList() - return res?.findAll {it.skillDef.type != SkillDef.ContainerType.SkillsGroup || it.skillDef.totalPoints > 0 }.sort { it.skillDef.displayOrder } }