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

Make sure focus related tests don't fail when the test container is hidden #912

Conversation

bertdeblock
Copy link
Member

Tests that rely on an element being focussed (when using e.g. ember-focus-trap) fail when the test container is hidden using e.g. display: none; or visibility: hidden.

Switching to an opacity: 0; pointer-events: none; approach fixes this.

}

testContainer.style.visibility = containerVisibility;
if (params.nocontainer) {
testContainer.classList.add('ember-testing-container-hidden');
Copy link
Member Author

Choose a reason for hiding this comment

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

First simply used a hidden class, but that is such a commonly used utility class that I switched to using ember-testing-container-hidden to avoid conflicts. I renamed the full-screen class to ember-testing-container-full-screen for the same reason and consistency.

@rwjblue rwjblue added the bug label Apr 12, 2022
@rwjblue rwjblue merged commit 4720360 into emberjs:master Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants