Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#2490 Fix skipped tests #2609

Merged
merged 2 commits into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import SelfReportService from '@/components/skills/selfReport/SelfReportService'
import { useSkillsAnnouncer } from '@/common-components/utilities/UseSkillsAnnouncer.js'
import NoContent2 from "@/components/utils/NoContent2.vue";
import DateCell from "@/components/utils/table/DateCell.vue";
import { SkillsReporter } from '@skilltree/skills-client-js';
import * as yup from "yup";
import {useForm} from "vee-validate";

Expand All @@ -34,9 +33,9 @@ const props = defineProps({
});

const schema = yup.object({
'tagInput': yup.string().required().test('uniqueName', 'There is already an entry for this value.', (value) => {
'tagInput': yup.string().required().test('uniqueName', `There is already an entry for this ${props.tagLabel} value.`, (value) => {
return !data.value.find((i) => value.toLowerCase() === i.userTagValue?.toLowerCase());
})
}).matches(/^\w+$/, () => `${props.tagLabel} may only contain alpha-numeric characters`)
})
const { meta } = useForm({
validationSchema: schema
Expand Down
8 changes: 4 additions & 4 deletions e2e-tests/cypress/e2e/approver/approver_conf_userTags_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ describe('Approver Config User Tags Tests', () => {

});

it.skip('entering user tag conf validation', function () {
it('entering user tag conf validation', function () {
const user1 = 'user1'

cy.request('POST', `/admin/projects/proj1/users/user1/roles/ROLE_PROJECT_APPROVER`);
Expand All @@ -177,15 +177,15 @@ describe('Approver Config User Tags Tests', () => {
cy.get(`[data-cy="workloadCell_${user1}"] [data-cy="editApprovalBtn"]`).click()
// no spaces
cy.get(`[data-cy="expandedChild_${user1}"] [data-cy="userTagValueInput"]`).type('s s');
cy.get(`[data-cy="expandedChild_${user1}"] [data-cy="tagValueInputError"]`).should('have.text', 'Org may only contain alpha-numeric characters')
cy.get(`[data-cy="expandedChild_${user1}"] [data-cy="tagInputError"]`).should('have.text', 'Org may only contain alpha-numeric characters')
cy.get(`[data-cy="expandedChild_${user1}"] [data-cy="addTagKeyConfBtn"]`).should('not.be.enabled')

cy.get(`[data-cy="expandedChild_${user1}"] [data-cy="userTagValueInput"]`).type('{backspace}{backspace}');
cy.get(`[data-cy="expandedChild_${user1}"] [data-cy="tagValueInputError"]`).should('not.be.visible')
cy.get(`[data-cy="expandedChild_${user1}"] [data-cy="tagInputError"]`).should('not.be.visible')
cy.get(`[data-cy="expandedChild_${user1}"] [data-cy="addTagKeyConfBtn"]`).should('be.enabled')

cy.get(`[data-cy="expandedChild_${user1}"] [data-cy="userTagValueInput"]`).type('{backspace}FIrst');
cy.get(`[data-cy="expandedChild_${user1}"] [data-cy="tagValueInputError"]`).should('have.text', 'There is already an entry for this Org value.')
cy.get(`[data-cy="expandedChild_${user1}"] [data-cy="tagInputError"]`).should('have.text', 'There is already an entry for this Org value.')
cy.get(`[data-cy="expandedChild_${user1}"] [data-cy="addTagKeyConfBtn"]`).should('not.be.enabled')
})

Expand Down
180 changes: 4 additions & 176 deletions e2e-tests/cypress/e2e/catalog/import_skills_from_catalog_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ describe('Import skills from Catalog Tests', () => {
.should('have.text', '0');
});

it.skip('do not allow to cross-project deps for the catalog imported skills', () => {
it('do not allow to cross-project deps for the catalog imported skills', () => {
cy.createSkill(1, 1, 1);
cy.exportSkillToCatalog(1, 1, 1);

Expand All @@ -545,7 +545,7 @@ describe('Import skills from Catalog Tests', () => {
.should('not.exist'); // imported skill
});

it.skip('do not allow to use imported skills in a Global Badge', () => {
it('do not allow to use imported skills in a Global Badge', () => {
cy.createSkill(1, 1, 1);
cy.exportSkillToCatalog(1, 1, 1);

Expand Down Expand Up @@ -575,7 +575,7 @@ describe('Import skills from Catalog Tests', () => {
.should('not.exist'); // imported skill
});

it.skip('allow to add imported skills to a project badge', () => {
it('allow to add imported skills to a project badge', () => {
cy.createSkill(1, 1, 1);
cy.exportSkillToCatalog(1, 1, 1);

Expand All @@ -601,7 +601,7 @@ describe('Import skills from Catalog Tests', () => {
cy.get('[data-cy="skillsSelectionItem-proj2-skill2"]');
cy.get('[data-cy="skillsSelectionItem-proj2-skill1"]')
.click(); // imported and finalized skill
cy.get('[data-cy="simpleSkillsTable"]')
cy.get('[data-cy="badgeSkillsTable"]')
.contains('Very Great Skill 1'); // imported skill added to the badge

});
Expand Down Expand Up @@ -1061,178 +1061,6 @@ describe('Import skills from Catalog Tests', () => {
.should('not.exist');
});

it.skip('clear removes selection of current page', () => {
// mix skill names since it's sorted by skillId - this will force different projects in the first page
cy.createSkill(1, 1, 1);
cy.createSkill(1, 1, 6);
cy.createSkill(1, 1, 7);
cy.createSkill(1, 1, 4);
cy.createSkill(1, 1, 5);
cy.createSkill(1, 1, 9);
cy.createSkill(1, 1, 66);
cy.createSkill(1, 1, 67);

cy.createProject(2);
cy.createSubject(2, 1);
cy.createSkill(2, 1, 2);
cy.createSkill(2, 1, 3);
cy.createSkill(2, 1, 8);

cy.exportSkillToCatalog(1, 1, 1);
cy.exportSkillToCatalog(1, 1, 6);
cy.exportSkillToCatalog(1, 1, 7);
cy.exportSkillToCatalog(1, 1, 4);
cy.exportSkillToCatalog(1, 1, 5);
cy.exportSkillToCatalog(1, 1, 9);
cy.exportSkillToCatalog(1, 1, 66);
cy.exportSkillToCatalog(1, 1, 67);

cy.exportSkillToCatalog(2, 1, 2); // proj 2
cy.exportSkillToCatalog(2, 1, 3); // proj 2
cy.exportSkillToCatalog(2, 1, 8); // proj 2

cy.createProject(3);
cy.createSubject(3, 1);

cy.intercept('/admin/projects/proj3/skills/catalog**')
.as('getCatalogSkills');

cy.visit('/administrator/projects/proj3/subjects/subj1');

cy.get('[data-cy="importFromCatalogBtn"]')
.click();
cy.wait('@getCatalogSkills');

cy.get('[data-cy="importBtn"]')
.should('be.disabled');
cy.get('[data-cy="numSelectedSkills"]')
.should('have.text', '0');

cy.get('[data-cy="skillSelect_proj1-skill1"]')
.should('not.be.checked');
cy.get('[data-cy="skillSelect_proj2-skill2"]')
.should('not.be.checked');
cy.get('[data-cy="skillSelect_proj2-skill3"]')
.should('not.be.checked');
cy.get('[data-cy="skillSelect_proj1-skill4"]')
.should('not.be.checked');
cy.get('[data-cy="skillSelect_proj1-skill5"]')
.should('not.be.checked');

cy.get('[data-cy="selectPageOfSkillsBtn"]')
.click();

cy.get('[data-cy="skillSelect_proj1-skill1"]')
.should('be.checked');
cy.get('[data-cy="skillSelect_proj2-skill2"]')
.should('be.checked');
cy.get('[data-cy="skillSelect_proj2-skill3"]')
.should('be.checked');
cy.get('[data-cy="skillSelect_proj1-skill4"]')
.should('be.checked');
cy.get('[data-cy="skillSelect_proj1-skill5"]')
.should('be.checked');

cy.get('[data-cy="importBtn"]')
.should('be.enabled');
cy.get('[data-cy="numSelectedSkills"]')
.should('have.text', '5');
cy.get('[aria-label="Go to page 2"')
.click();
cy.wait('@getCatalogSkills');

cy.get('[data-cy="skillSelect_proj1-skill6"]')
.should('not.be.checked');
cy.get('[data-cy="skillSelect_proj1-skill7"]')
.should('not.be.checked');
cy.get('[data-cy="skillSelect_proj2-skill8"]')
.should('not.be.checked');
cy.get('[data-cy="skillSelect_proj1-skill67"]')
.should('not.be.checked');
cy.get('[data-cy="skillSelect_proj1-skill66"]')
.should('not.be.checked');
cy.get('[data-cy="selectPageOfSkillsBtn"]')
.click();
cy.get('[data-cy="importBtn"]')
.should('be.enabled');
cy.get('[data-cy="numSelectedSkills"]')
.should('have.text', '10');
cy.get('[data-cy="skillSelect_proj1-skill6"]')
.should('be.checked');
cy.get('[data-cy="skillSelect_proj1-skill7"]')
.should('be.checked');
cy.get('[data-cy="skillSelect_proj2-skill8"]')
.should('be.checked');
cy.get('[data-cy="skillSelect_proj1-skill67"]')
.should('be.checked');
cy.get('[data-cy="skillSelect_proj1-skill66"]')
.should('be.checked');
cy.get('[aria-label="Go to page 1"')
.click();
cy.wait('@getCatalogSkills');
cy.get('[data-cy="skillSelect_proj1-skill1"]')
.should('be.checked');
cy.get('[data-cy="skillSelect_proj2-skill2"]')
.should('be.checked');
cy.get('[data-cy="skillSelect_proj2-skill3"]')
.should('be.checked');
cy.get('[data-cy="skillSelect_proj1-skill4"]')
.should('be.checked');
cy.get('[data-cy="skillSelect_proj1-skill5"]')
.should('be.checked');

cy.get('[data-cy="clearSelectedBtn"]')
.click();
cy.get('[data-cy="skillSelect_proj1-skill1"]')
.should('not.be.checked');
cy.get('[data-cy="skillSelect_proj2-skill2"]')
.should('not.be.checked');
cy.get('[data-cy="skillSelect_proj2-skill3"]')
.should('not.be.checked');
cy.get('[data-cy="skillSelect_proj1-skill4"]')
.should('not.be.checked');
cy.get('[data-cy="skillSelect_proj1-skill5"]')
.should('not.be.checked');
cy.get('[data-cy="importBtn"]')
.should('be.enabled');
cy.get('[data-cy="numSelectedSkills"]')
.should('have.text', '5');

cy.get('[aria-label="Go to page 2"')
.click();
cy.wait('@getCatalogSkills');
cy.get('[data-cy="skillSelect_proj1-skill6"]')
.should('be.checked');
cy.get('[data-cy="skillSelect_proj1-skill7"]')
.should('be.checked');
cy.get('[data-cy="skillSelect_proj2-skill8"]')
.should('be.checked');
cy.get('[data-cy="skillSelect_proj1-skill67"]')
.should('be.checked');
cy.get('[data-cy="skillSelect_proj1-skill66"]')
.should('be.checked');
cy.get('[data-cy="importBtn"]')
.should('be.enabled');
cy.get('[data-cy="numSelectedSkills"]')
.should('have.text', '5');
cy.get('[data-cy="clearSelectedBtn"]')
.click();
cy.get('[data-cy="skillSelect_proj1-skill6"]')
.should('not.be.checked');
cy.get('[data-cy="skillSelect_proj1-skill7"]')
.should('not.be.checked');
cy.get('[data-cy="skillSelect_proj2-skill8"]')
.should('not.be.checked');
cy.get('[data-cy="skillSelect_proj1-skill67"]')
.should('not.be.checked');
cy.get('[data-cy="skillSelect_proj1-skill66"]')
.should('not.be.checked');
cy.get('[data-cy="importBtn"]')
.should('be.disabled');
cy.get('[data-cy="numSelectedSkills"]')
.should('have.text', '0');
});

it('respect maxSkillsPerSubject configuration', () => {
// mix skill names since it's sorted by skillId - this will force different projects in the first page
cy.intercept('GET', '/public/config', (req) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('Single Skill and Catalog Tests', () => {
cy.createSubject(1, 1);
});

it.skip('show IMPORTED badge on performed skills table', () => {
it('show IMPORTED badge on performed skills table', () => {
cy.createSkill(1, 1, 1);
cy.createSkill(1, 1, 2);
cy.createSkill(1, 1, 3);
Expand Down
11 changes: 4 additions & 7 deletions e2e-tests/cypress/e2e/my-progress_breadcrumb_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ describe('My Progress Breadcrumb Tests', () => {
.contains('Overall Points');
});

it.skip('test breadcrumbs with custom labels', function () {
it('test breadcrumbs with custom labels', function () {
// log in as project admin and set custom labels
cy.fixture('vars.json')
.then((vars) => {
Expand Down Expand Up @@ -804,7 +804,7 @@ describe('My Progress Breadcrumb Tests', () => {
.contains('Cross-Work Role Course');

// internal dependency
cy.visit('/progress-and-rankings/projects/proj1/subjects/subj1/skills/skill4/dependency/skill2');
cy.visit('/progress-and-rankings/projects/proj1/subjects/subj1/skills/skill2');
cy.get('[data-cy="breadcrumb-bar"] [data-cy=breadcrumb-skill2]')
.should('exist');
cy.get('[data-cy="breadcrumb-bar"] [data-cy=breadcrumb-skill2]')
Expand All @@ -818,12 +818,12 @@ describe('My Progress Breadcrumb Tests', () => {
cy.get('[data-cy="breadcrumb-bar"] [data-cy=breadcrumb-proj1]')
.should('have.attr', 'href');
cy.get('[data-cy=breadcrumb-bar]')
.contains(new RegExp(/^Progress And Rankings.*Work Role:\s*proj1.*Competency:\s*subj1.*Course:\s*skill4.*Prerequisite:\s*skill2$/))
.contains(new RegExp(/^Progress And Rankings.*Work Role:\s*proj1.*Competency:\s*subj1.*Course:\s*skill2.*$/))
.should('be.visible');

cy.get('[data-cy="breadcrumb-bar"] [data-cy=breadcrumb-item]')
.its('length')
.should('eq', 5);
.should('eq', 4);
cy.get('[data-cy="breadcrumb-bar"] [data-cy=breadcrumb-item]')
.eq(0)
.should('contain.text', 'Progress And Rankings');
Expand All @@ -835,9 +835,6 @@ describe('My Progress Breadcrumb Tests', () => {
.should('contain.text', 'subj1');
cy.get('[data-cy="breadcrumb-bar"] [data-cy=breadcrumb-item]')
.eq(3)
.should('contain.text', 'skill4');
cy.get('[data-cy="breadcrumb-bar"] [data-cy=breadcrumb-item]')
.eq(4)
.should('contain.text', 'skill2');

// Go to Badges page
Expand Down
Loading