Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WORK IN PROGRESS Create test coverage for e2e User journey #1579

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

AustenStevensMOJ
Copy link
Contributor

Change description

WORK IN PROGRESS - Created sample test coverage for e2e user journey automated testing which is to be code reviewed

JIRA link

N/A

Does this PR introduce a breaking change? (check one with "x")

  • Yes
  • [x ] No

Copy link
Contributor

@abigailsmith97 abigailsmith97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added a few comments to consider, happy to discuss further! great job on your first PR!

page = await context.newPage();
await page.goto(urlConfig.citizenStartUrl);
});
test('Start up jourey url is equal to the initial url', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: journey

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this test might be not needed as it could be incorporated into the other tests and reduce number of tests being run


expect(htmlLang).toBe('en');
});
test('Start up journey page is to have Cymraeg language link to be visible', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these two tests could maybe be merged into one test as they look like they are doing quite similar things?


const htmlLang = await page.evaluate(() => document.documentElement.lang);

expect(htmlLang).toBe('cy');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be worth checking if you continue on the user journey, the language remains welsh and does not change back to english

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants