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

STCOM-880 focus-related tests #1628

Closed
wants to merge 5 commits into from
Closed

Conversation

JohnC-80
Copy link
Contributor

@JohnC-80 JohnC-80 commented Oct 8, 2021

React changed its behavior for focus/blur events, so simulating these events programmatically has changed...
focus() still works, but blur() does not... as opposed to blur a focusout event must be dispatched....

see facebook/react#19606 (comment) for the basic details/solution....

will need folio-org/stripes-testing#124

@JohnC-80 JohnC-80 changed the title STCOM-880 focus-related testsskip less things, change radio button test to properly reflect focus … STCOM-880 focus-related tests Oct 8, 2021
@github-actions
Copy link

github-actions bot commented Oct 8, 2021

Jest Unit Test Statistics

0 files  ±0  0 suites  ±0   0s ⏱️ ±0s
0 tests ±0  0 ✔️ ±0  0 💤 ±0  0 ±0 

Results for commit b69ed53. ± Comparison against base commit c5a4d02.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Oct 8, 2021

BigTest Unit Test Statistics

       1 files  ±0         1 suites  ±0   2s ⏱️ -3s
1 172 tests  - 4  1 167 ✔️ +9  5 💤  - 11  0  - 2 
1 174 runs   - 4  1 169 ✔️ +9  5 💤  - 11  0  - 2 

Results for commit b69ed53. ± Comparison against base commit c5a4d02.

♻️ This comment has been updated with latest results.

@JohnC-80 JohnC-80 requested a review from zburke October 8, 2021 22:09
@sonarcloud
Copy link

sonarcloud bot commented Oct 11, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information


import Popover from '../Popover';
import PopoverInteractor from './interactor';
Copy link
Member

Choose a reason for hiding this comment

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

Can we remove ./interactor.js then? Or should we instead replace it with lines 16-24 below? It feels wrong to have both.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The local, BigTest OG interactors might have to stick around for a bit - unless we know for certain that no ui-app level tests OR other interactors depend on them.

Comment on lines +19 to +23
pressEscape: ({ perform }) => {
return perform((el) => {
return el.dispatchEvent(new KeyboardEvent('keyup', { bubbles: true, cancelable: true, keyCode: 27 }));
});
}
Copy link
Member

Choose a reason for hiding this comment

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

Thank you for this helpfully-named function to the otherwise completely opaque keyboard-up-on-number-27.

Copy link
Member

@zburke zburke left a comment

Choose a reason for hiding this comment

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

I'm super psyched to see these tests turned back on again. I know I turned 'em off in one swell foop, but might consider turning them back on in individual PRs since the "fixes" are quite distinct and, simply, because the fixes can be isolated at the component level, unlike the failing test which had to be turned off in aggregate because failure for any one component dooms the whole suite.

@JohnC-80
Copy link
Contributor Author

We'll see how splitting the changes goes. There were changes in @folio/stripes-testing also that are already merged in - they had an under-the-hood impact, but for lots of these tests, it was a loss of an important 'focus' or 'blur' event for redux-form (another to-do, switch to RFF in the test suite) to grab onto when it applied validation.

@JohnC-80
Copy link
Contributor Author

Closing in favor of multiple PR's with better history management...

@JohnC-80 JohnC-80 closed this Oct 12, 2021
@zburke zburke deleted the stcom-880-focus-related-tests branch June 22, 2022 14:08
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.

2 participants