Skip to content

Commit

Permalink
Cypress per thread message count (#24589)
Browse files Browse the repository at this point in the history
  • Loading branch information
timothy-steele-va authored Jun 20, 2023
1 parent b470e75 commit 301ca2d
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ const ThreadListItem = props => {
)}
<span />{' '}
{messageCount > 1 && (
<span className="message-count">({messageCount} messages)</span>
<span className="message-count" data-testid="message-count">
({messageCount} messages)
</span>
)}
</>
) : (
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import SecureMessagingSite from './sm_site/SecureMessagingSite';
import PatientInboxPage from './pages/PatientInboxPage';
import inboxMessages from './fixtures/messages-response.json';

describe('Secure Messaging Message Details AXE Check', () => {
it('Axe Check Message Details Page', () => {
const landingPage = new PatientInboxPage();
const site = new SecureMessagingSite();
site.login();
const date = new Date();
date.setDate(date.getDate() - 2);
landingPage.loadInboxMessages(inboxMessages);
cy.get('[data-testid="message-count"]').should($msgCount => {
expect($msgCount.first()).to.contain(
inboxMessages.data.at(0).attributes.messageCount,
);
});
cy.injectAxe();
cy.axeCheck('main', {
rules: {
'aria-required-children': {
enabled: false,
},
},
});
});
});

0 comments on commit 301ca2d

Please sign in to comment.