Skip to content

Commit 8e9ceff

Browse files
committed
DON-1156: Check homepage accessibility
1 parent 0726a8c commit 8e9ceff

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

features/read-home-page.feature

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Feature: Read the homepage
2+
3+
As someone interested in understand Big Give, I should be able to read the homepage.
4+
5+
Scenario: Reading the homepage
6+
Given that I am on my chosen charity's Donate page
7+
Then there should be no accessibility violations detected
8+

pages/HomePage.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import {Given, Then} from "@cucumber/cucumber";
2+
import {goToUrl} from "../support/util";
3+
import checkNoAccessibilityViolations from "../support/a11y";
4+
5+
Given(
6+
/^that I am on my the home page page$/,
7+
async () => {
8+
const baseurl = process.env.BASE_URL;
9+
if (!baseurl) throw new Error('BASE_URL not defined in enviornment');
10+
11+
await goToUrl(baseurl);
12+
}
13+
);
14+
Then(
15+
/^there should be no accessibility violations detected$/,
16+
async function () {
17+
await checkNoAccessibilityViolations();
18+
});

0 commit comments

Comments
 (0)