Skip to content

Commit

Permalink
fix: remove redundant step
Browse files Browse the repository at this point in the history
  • Loading branch information
cmorten committed Jan 20, 2024
1 parent 38a7629 commit ae9ab9f
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions docs/example.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ The test will check that you can navigate to the first heading on the [GitHub RE
- [Installation](./example#installation)
- [Create Playwright Config File](./example#playwright)
- [Create Test File](./example#test)
- [Create Expected Log File](./example#expected)
- [Run Test](./example#run)

## Environment Setup {#environment}
Expand Down Expand Up @@ -152,7 +151,6 @@ values={[
```ts
import { voiceOverTest as test } from "@guidepup/playwright";
import { expect } from "@playwright/test";
import itemTextSnapshot from "./itemTextSnapshot.json";

test.describe("Playwright VoiceOver", () => {
test("I can navigate the Guidepup Github page", async ({
Expand Down Expand Up @@ -188,7 +186,6 @@ test.describe("Playwright VoiceOver", () => {
```js
const { voiceOverTest as test } = require("@guidepup/playwright");
const { expect } = require("@playwright/test");
const itemTextSnapshot = require("./itemTextSnapshot.json");

test.describe("Playwright VoiceOver", () => {
test("I can navigate the Guidepup Github page", async ({
Expand All @@ -215,31 +212,12 @@ test.describe("Playwright VoiceOver", () => {
// Assert that the spoken phrases are as expected
expect(JSON.stringify(await voiceOver.spokenPhraseLog())).toMatchSnapshot();
});
});
});
```

</TabItem>
</Tabs>

## Create Expected Log File {#expected}

In our test file above we reference a `itemTextSnapshot.json` file which contains our expectations on the `itemTextLog` that we retrieve from VoiceOver after navigating to the README.md heading to check the journey was as expected.

Create this `itemTextSnapshot.json` file with the following contents:

```json
[
"Skip to content link",
"guidepup/guidepup heading level 1",
"Latest commit heading level 2",
"Git stats heading level 2",
"Files heading level 2",
"README.md heading level 2",
"Guidepup heading level 1"
]
```

## Run Test {#run}

Now run your code to see an automated screen reader test.
Expand Down

0 comments on commit ae9ab9f

Please sign in to comment.