Skip to content

Commit

Permalink
#2490: attempt to fix race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
sudo-may committed Jun 20, 2024
1 parent e7d90f6 commit 13d850e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ import { useAppInfoState } from '@/stores/UseAppInfoState.js'
const route = useRoute();
const appInfo = useAppInfoState()
// const props = defineProps({
// emailEnabled: {
// type: Boolean,
// required: false
// }
// });
const emit = defineEmits(['approval-action']);
const announcer = useSkillsAnnouncer();
const colors = useColors()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const hasSkillsWithApprovals = () => {
<email-not-enabled-warning v-if="showEmailServiceWarning"/>

<div v-if="hasSkillsWithApprovals()">
<self-report-approval @approval-action="handleApprovalAction" :email-enabled="!showEmailServiceWarning"/>
<self-report-approval @approval-action="handleApprovalAction" />
<self-report-approval-history ref="selfReportApprovalHistory" class="mt-3"/>
</div>
<no-content2 v-else title="No Skills Require Approval" data-cy="noApprovalTableMsg"
Expand Down
8 changes: 8 additions & 0 deletions e2e-tests/cypress/e2e/self-report/selfReport_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,8 @@ describe('Self Report Skills Management Tests', () => {
.as('subscribe');

cy.visit('/administrator/projects/proj1/self-report');
cy.get('[data-cy="btn_edit-project"]')
cy.get('[data-cy="viewSkillLink_skill3"]')
cy.wait('@isSubscribed');
cy.contains('Subscribed')
.should('be.visible');
Expand All @@ -379,6 +381,8 @@ describe('Self Report Skills Management Tests', () => {
.should('not.be.checked');

cy.visit('/administrator/projects/proj1/self-report');
cy.get('[data-cy="btn_edit-project"]')
cy.get('[data-cy="viewSkillLink_skill3"]')
cy.wait('@isSubscribed');
cy.contains('Unsubscribed')
.should('be.visible');
Expand All @@ -387,13 +391,17 @@ describe('Self Report Skills Management Tests', () => {

//setting should be per project
cy.visit('/administrator/projects/proj2/self-report');
cy.get('[data-cy="btn_edit-project"]')
cy.get('[data-cy="viewSkillLink_skill1"]')
cy.wait('@isSubscribed');
cy.contains('Subscribed')
.should('be.visible');
cy.get('[data-cy=unsubscribeSwitch] input')
.should('be.checked');

cy.visit('/administrator/projects/proj1/self-report');
cy.get('[data-cy="btn_edit-project"]')
cy.get('[data-cy="viewSkillLink_skill3"]')
cy.wait('@isSubscribed');
cy.contains('Unsubscribed')
.should('be.visible');
Expand Down

0 comments on commit 13d850e

Please sign in to comment.