Skip to content

Commit

Permalink
MHV-64949: Opt in out buttons content fixed (#33646)
Browse files Browse the repository at this point in the history
* MHV-64949: Opt in out buttons content fixed

* MHV-64949: Cypress test fixed
  • Loading branch information
mattwrightva authored Dec 18, 2024
1 parent 9066859 commit 2d9b1c6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,8 @@ const SettingsPage = () => {
const title = `Opt ${
isSharing ? 'out of' : 'back in to'
} sharing your electronic health information?`;
const primaryButtonText = isSharing ? 'Yes, opt out' : 'Yes, opt in';
const secondaryButtonText = isSharing
? "No, don't opt out"
: "No, don't opt in";
const primaryButtonText = isSharing ? 'Opt out' : 'Opt in';
const secondaryButtonText = isSharing ? "Don't opt out" : "Don't opt in";
return (
<VaModal
modalTitle={title}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ class SettingsPage extends BaseListPage {
).as('postOptOut');

cy.get('[data-testid="open-opt-in-out-modal-button"]').click();
cy.get('button:contains("Yes, opt out")').click();
cy.get('va-modal')
.contains('button', 'Opt out')
.click();
cy.wait('@postOptOut');
};

Expand All @@ -60,7 +62,9 @@ class SettingsPage extends BaseListPage {
).as('postOptIn');

cy.get('[data-testid="open-opt-in-out-modal-button"]').click();
cy.get('button:contains("Yes, opt in")').click();
cy.get('va-modal')
.contains('button', 'Opt in')
.click();
cy.wait('@postOptIn');
};
}
Expand Down

0 comments on commit 2d9b1c6

Please sign in to comment.