Skip to content

Commit

Permalink
Merge pull request #3087 from NationalSecurityAgency/t#3085/history_t…
Browse files Browse the repository at this point in the history
…able_justification

#3085 - added unique instance-id prop to markdown-text
  • Loading branch information
sudo-may authored Jan 15, 2025
2 parents 648fbc2 + 73b77dc commit c493c7e
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ defineExpose( {
<SkillsCardHeader title="Requested points with the following justification:"></SkillsCardHeader>
</template>
<template #content>
<markdown-text class="d-inline-block" :text="slotProps.data.requestMsg" data-cy="approvalMessage"/>
<markdown-text class="d-inline-block" :text="slotProps.data.requestMsg" data-cy="approvalMessage" :instance-id="`${slotProps.data.id}`"/>
</template>
</Card>
<Card v-else class="ml-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -979,4 +979,38 @@ describe('Self Report Approval History Tests', () => {

});

it('approval history - expand multiple justifications', () => {
cy.createSkill(1, 1, 1, { selfReportingType: 'Approval' });
cy.reportSkill(1, 1, 'user1', '2020-09-17 11:00', true, 'please approve request 1');
cy.rejectRequest();
cy.reportSkill(1, 1, 'user1', moment.utc(), true, 'please approve request 2');
cy.approveAllRequests();

cy.intercept('/admin/projects/proj1/approvals/history*')
.as('loadHistory');

cy.visit('/administrator/projects/proj1/self-report');
cy.wait('@loadHistory');

cy.get('[data-cy="expandDetailsBtn_skill1"]')
.should('have.length', 2)
.eq(0)
.click();

cy.get('[data-cy="expandDetailsBtn_skill1"]')
.should('have.length', 2)
.eq(1)
.click();

cy.get('[data-cy="approvalMessage"]')
.should('have.length', 2)
.eq(0)
.should('contain.text', 'please approve request 2')

cy.get('[data-cy="approvalMessage"]')
.should('have.length', 2)
.eq(1)
.should('contain.text', 'please approve request 1');
});

});

0 comments on commit c493c7e

Please sign in to comment.