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

Announce page change using aria-live=assertive #24

Closed
wants to merge 1 commit into from
Closed

Announce page change using aria-live=assertive #24

wants to merge 1 commit into from

Conversation

onmax
Copy link

@onmax onmax commented Aug 17, 2022

#18


const announcerAbout = page.locator('#flamethrower-announcer');
await expect(announcerAbout).toHaveText('About');

Choose a reason for hiding this comment

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

FYI, there is a tool for validating these announcements. https://www.npmjs.com/package/extend-to-be-announced
Though I'm not sure whether it integrates with playwright nicely.

Copy link
Author

Choose a reason for hiding this comment

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

Nice, I didn't know about this one. Although, not sure if it is a good idea add a new dev dependency only for this test case 🤔.

Another way of optimizing the test that I was thinking is:

I could use the same variable const announcer = page.locator('#flamethrower-announcer'); for home page and about page as technically is the same node, so maybe it keeps the reference, but I didn't try it and I don't know if it works

@codediodeio
Copy link
Member

This looks good, but we've got some conflicts to resolve now.

@onmax
Copy link
Author

onmax commented Aug 18, 2022

I am a little bit lost, and first time I am doing this. Not sure what git commands to use:

Maybe this:

git config pull.rebase false
git pull upstream pull
# Merge conflicts
git commit -m "Merge blah blah blah"
git push

Or what do you guys recommend?

@onmax onmax closed this by deleting the head repository Aug 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants