Skip to content

Commit

Permalink
Update achecker.cy.js
Browse files Browse the repository at this point in the history
  • Loading branch information
shunguoy committed Dec 3, 2024
1 parent a8f9d23 commit f2e233d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cypress-accessibility-checker/test/cypress/e2e/achecker.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ context('Accessibility checker tests', () => {
cy.visit('no-violations.html')
.getCompliance('assert compliance rc 0 no baseline')
.assertCompliance()
.then((rc) => {console.warn("no-violations rc=" + rc);
.then((rc) => {
return expect(rc).to.equal(0)
});
});
Expand All @@ -53,15 +53,15 @@ context('Accessibility checker tests', () => {
cy.visit('violations.html')
.getCompliance('violations')
.assertCompliance(false)
.then((rc) => {console.warn("violations rc=" + rc); expect(rc).to.equal(0)});
.then((rc) => expect(rc).to.equal(0));
});

it('Fails when the baselines dont match', () => {
// Compare no-violations to a violations baseline
cy.visit('violations.html')
.getCompliance('violations-no-match')
.assertCompliance(false)
.then((rc) => { console.warn("violations no match rc=" + rc);
.then((rc) => {
expect(rc).to.equal(1);
})
});
Expand All @@ -70,7 +70,7 @@ context('Accessibility checker tests', () => {
cy.visit('violations.html')
.getCompliance('assert compliance rc 2')
.assertCompliance(false) // Don't actually run the assertion in the command so we can check the output
.then((rc) => {console.warn("violations rc2=" + rc);expect(rc).to.equal(2)});
.then((rc) => expect(rc).to.equal(2));
});
});

Expand Down

0 comments on commit f2e233d

Please sign in to comment.