Bug #30336
Fix timeout issue in React content view test
Description
[2020-07-06T21:18:16.731Z] 240 | fireEvent.change(getByLabelText(/text input for search/i), { target: { value: query } });
[2020-07-06T21:18:16.731Z] 241 |
[2020-07-06T21:18:16.731Z] > 242 | await waitFor(() => expect(getByText(/No matching Content Views found/i)).toBeInTheDocument());
[2020-07-06T21:18:16.731Z] | ^
[2020-07-06T21:18:16.731Z] 243 |
[2020-07-06T21:18:16.731Z] 244 | assertNockRequest(autocompleteScope);
[2020-07-06T21:18:16.731Z] 245 | assertNockRequest(initialScope);
[2020-07-06T21:18:16.731Z]
[2020-07-06T21:18:16.731Z] at waitForWrapper (foreman/node_modules/@testing-library/dom/dist/wait-for.js:134:27)
[2020-07-06T21:18:16.731Z] at callee8$ (webpack/scenes/ContentViews/_tests__/contentViewPage.test.js:242:9)
[2020-07-06T21:18:16.731Z] at tryCatch (foreman/node_modules/regenerator-runtime/runtime.js:45:40)
[2020-07-06T21:18:16.731Z] at Generator.invoke [as invoke] (foreman/node_modules/regenerator-runtime/runtime.js:274:22)
[2020-07-06T21:18:16.731Z] at Generator.prototype.<computed> [as next] (foreman/node_modules/regenerator-runtime/runtime.js:97:21)
[2020-07-06T21:18:16.731Z] at asyncGeneratorStep (webpack/scenes/ContentViews/_tests__/contentViewPage.tes
Associated revisions
History
#1
Updated by The Foreman Bot about 2 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/Katello/katello/pull/8813 added
#2
Updated by John Mitsch about 2 years ago
- Description updated (diff)
#3
Updated by The Foreman Bot about 2 years ago
- Fixed in Releases Katello 4.0.0 added
#4
Updated by John Mitsch about 2 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset katello|bab3adfd6b7b599e08512bb34a9a13752cb088b3.
#5
Updated by John Mitsch about 2 years ago
- Triaged changed from No to Yes
- Target version set to Katello 3.16.0
#6
Updated by Ian Ballou about 2 years ago
- Target version changed from Katello 3.16.0 to Katello 4.0.0
#7
Updated by Chris Roberts about 2 years ago
- Target version changed from Katello 4.0.0 to Katello 3.17.0
Fixes #30336 - Fix React test intermittent failure
We are seeing this issue happen with jenkins, it seems to run quite a bit slower than GH actions.
I believe the `waitFor` command is timing out as it waits for the text to appear on the screen. react-testing-library doesn't have a way to increase the default (1000ms) waitFor afaict, so we can set it in the waitFor commands where needed. If it continues to be a problem, we can think about making a wrapper function that calls waitFor with a longer timeout.