+ :filter-value="filters.global.value"
+ :read-only="projConfig.isReadOnlyProj || slotProps.data.isCatalogImportedSkills"
+ />
-import { onMounted, onBeforeMount, ref } from 'vue';
+import { onMounted, ref } from 'vue';
import { useRoute } from 'vue-router';
import { useProjectUserState } from '@/stores/UseProjectUserState.js';
import { useConfirm } from 'primevue/useconfirm';
@@ -100,7 +100,7 @@ const sortField = (column) => {
table.value.options.pagination.currentPage = 1
loadData();
}
-onBeforeMount(() => {
+const loadTableFields = () => {
const fields = [
{
key: 'skillId',
@@ -123,10 +123,13 @@ onBeforeMount(() => {
});
}
table.value.options.fields = fields;
-})
+}
onMounted(() => {
- projectUserState.loadUserDetailsState(projectId.value, route.params.userId)
- loadData();
+ projConfig.afterProjConfigStateLoaded().then(() => {
+ loadTableFields()
+ projectUserState.loadUserDetailsState(projectId.value, route.params.userId)
+ loadData();
+ });
})
const loadData = () => {
UsersService.getUserInfo(projectId.value, userId.value).then((res) => {
diff --git a/e2e-tests/cypress/e2e/approver/approver_role_spec.js b/e2e-tests/cypress/e2e/approver/approver_role_spec.js
index d9405121c6..f02cc0ceee 100644
--- a/e2e-tests/cypress/e2e/approver/approver_role_spec.js
+++ b/e2e-tests/cypress/e2e/approver/approver_role_spec.js
@@ -174,7 +174,7 @@ describe('Approver Role Tests', () => {
runCheck(1, 'View', 'Approver','not.')
});
- it.skip('/subj page - approver role has no mutation controls', function () {
+ it('/subj page - approver role has no mutation controls', function () {
const runCheck = (projNum, manageButtonTxt = 'Manage', assertChainPrepend = null) => {
const chainerPrepend = assertChainPrepend ? assertChainPrepend : '';
cy.visit(`/administrator/projects/proj${projNum}/subjects/subj1`);
@@ -185,8 +185,7 @@ describe('Approver Role Tests', () => {
cy.get('[data-cy="newGroupButton"]').should(`${chainerPrepend}exist`)
cy.get('[data-cy="newSkillButton"]').should(`${chainerPrepend}exist`)
cy.get('[data-cy="skillActionsBtn"]').should(`${chainerPrepend}exist`)
- cy.get('[data-cy="clearSelectedSkillsBtn"]').should(`${chainerPrepend}exist`)
- cy.get('[data-cy="selectAllSkillsBtn"]').should(`${chainerPrepend}exist`)
+ cy.get('[data-cy="skillsTable"] [data-pc-name="headercheckbox"] [data-pc-section="input"]').should(`${chainerPrepend}exist`)
cy.get('[data-cy="editSkillButton_skill1"]').should(`${chainerPrepend}exist`)
cy.get('[data-cy="editSkillButton_skill2"]').should(`${chainerPrepend}exist`)
@@ -196,17 +195,21 @@ describe('Approver Role Tests', () => {
cy.get('[data-cy="copySkillButton_skill2"]').should(`${chainerPrepend}exist`)
cy.get('[data-cy="copySkillButton_skill3"]').should(`${chainerPrepend}exist`)
+ cy.get('[data-cy="deleteSkillButton_skill1"]').should(`${chainerPrepend}exist`)
+ cy.get('[data-cy="deleteSkillButton_skill2"]').should(`${chainerPrepend}exist`)
cy.get('[data-cy="deleteSkillButton_skill3"]').should(`${chainerPrepend}exist`)
- cy.get('[data-cy="deleteSkillButton_skill3"]').should(`${chainerPrepend}exist`)
- cy.get('[data-cy="deleteSkillButton_skill3"]').should(`${chainerPrepend}exist`)
- cy.get('[data-cy="manageSkillLink_skill3"]').contains(manageButtonTxt)
- cy.get('[data-cy="manageSkillLink_skill3"]').contains(manageButtonTxt)
- cy.get('[data-cy="manageSkillLink_skill3"]').contains(manageButtonTxt)
+ cy.get('[data-cy="manageSkillLink_skill1"]').invoke('attr', 'aria-label').should('contain', manageButtonTxt)
+ cy.get('[data-cy="manageSkillLink_skill2"]').invoke('attr', 'aria-label').should('contain', manageButtonTxt)
+ cy.get('[data-cy="manageSkillLink_skill3"]').invoke('attr', 'aria-label').should('contain', manageButtonTxt)
+
+ cy.get('[data-cy="skillsTable"] [data-p-index="0"] [data-pc-name="rowcheckbox"]').should(`${chainerPrepend}exist`)
+ cy.get('[data-cy="skillsTable"] [data-p-index="1"] [data-pc-name="rowcheckbox"]').should(`${chainerPrepend}exist`)
+ cy.get('[data-cy="skillsTable"] [data-p-index="2"] [data-pc-name="rowcheckbox"]').should(`${chainerPrepend}exist`)
- cy.get('[data-cy="skillSelect-skill1"]').should(`${chainerPrepend}exist`)
- cy.get('[data-cy="skillSelect-skill2"]').should(`${chainerPrepend}exist`)
- cy.get('[data-cy="skillSelect-skill3"]').should(`${chainerPrepend}exist`)
+ if (assertChainPrepend == null) {
+ cy.get('[data-cy="enableDisplayOrderSort"]').click()
+ }
cy.get('[data-cy="orderMoveDown_skill1"]').should(`${chainerPrepend}exist`)
cy.get('[data-cy="orderMoveDown_skill2"]').should(`${chainerPrepend}exist`)
@@ -384,7 +387,7 @@ describe('Approver Role Tests', () => {
runCheck(1, 'View','not.')
});
- it.skip('/users/user/skillEvents page - approver role has no mutation controls', function () {
+ it('/users/user/skillEvents page - approver role has no mutation controls', function () {
const runCheck = (projNum, manageButtonTxt = 'Manage', assertChainPrepend = null) => {
const chainerPrepend = assertChainPrepend ? assertChainPrepend : '';
cy.visit(`/administrator/projects/proj${projNum}/users/user2/skillEvents`);
@@ -395,7 +398,7 @@ describe('Approver Role Tests', () => {
runCheck(1, 'View','not.')
});
- it.skip('/metrics page - approver role has no mutation controls', function () {
+ it('/metrics page - approver role has no mutation controls', function () {
const runCheck = (projNum, manageButtonTxt = 'Manage', assertChainPrepend = null) => {
const chainerPrepend = assertChainPrepend ? assertChainPrepend : '';
cy.visit(`/administrator/projects/proj${projNum}/metrics`);
diff --git a/e2e-tests/cypress/support/commands.js b/e2e-tests/cypress/support/commands.js
index be1b4ac2ce..1135752a8d 100644
--- a/e2e-tests/cypress/support/commands.js
+++ b/e2e-tests/cypress/support/commands.js
@@ -235,7 +235,7 @@ Cypress.Commands.add("removeFromMyProjects", (projNum) => {
cy.request('DELETE', `/api/myprojects/proj${projNum}`, {});
});
-Cypress.Commands.add("register", (user, pass, grantRoot, usernameForDisplay = null) => {
+Cypress.Commands.add("register", (user, pass, grantRoot, usernameForDisplay = null, firstName = 'Firstname', lastName = 'LastName') => {
let requestStatus = 0;
cy.request(`/app/users/validExistingDashboardUserId/${user}`)
.then((response) => {
@@ -243,8 +243,8 @@ Cypress.Commands.add("register", (user, pass, grantRoot, usernameForDisplay = nu
if (grantRoot) {
cy.log(`Creating root user [${user}]`)
cy.request('PUT', '/createRootAccount', {
- firstName: 'Firstname',
- lastName: 'LastName',
+ firstName,
+ lastName,
email: user,
password: pass,
usernameForDisplay,