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

Fix clickable tests (add interaction tests for focus and few behaviour tests) #609

Merged
merged 9 commits into from
Mar 29, 2022

Conversation

hadasfa
Copy link
Contributor

@hadasfa hadasfa commented Mar 29, 2022

No description provided.

role={role}
onClick={disabled ? undefined : onClick}
id={id}
onKeyDown={disabled ? undefined : onKeyDown}
tabIndex={tabIndex}
tabIndex={disabled ? -1 : tabIndex}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

fix bug - we allowed focus on disabled clickable element

Copy link
Contributor

@laviomri laviomri left a comment

Choose a reason for hiding this comment

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

package-lock shouldn't have any changes - something's probably wrong @hadasfa

export const statesPlaySuite = interactionSuite({
tests: [states_onClickTabFocusElementTest],
afterEach: async () => {
debugger;
Copy link
Contributor

Choose a reason for hiding this comment

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

😱

await pressNavigationKey(NAVIGATIONS_COMMANDS.TAB);
expect(document.activeElement).toEqual(clickableElement);
await pressNavigationKey(NAVIGATIONS_COMMANDS.TAB);
console.log(document.activeElement);
Copy link
Contributor

Choose a reason for hiding this comment

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

whoops

Copy link
Contributor

@laviomri laviomri left a comment

Choose a reason for hiding this comment

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

don't forget the package-lock :D

@hadasfa hadasfa merged commit b7367b3 into master Mar 29, 2022
@hadasfa hadasfa deleted the tests/hadas/interaction-tests branch March 29, 2022 16:19
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.

2 participants