after removing enzyme from all tests, bugfiler has a few tests which are not ported over
Categories
(Tree Management :: Treeherder, enhancement)
Tracking
(Not tracked)
People
(Reporter: jmaher, Unassigned)
Details
patch that rewrote the tests:
https://github.com/mozilla/treeherder/commit/0f2cd18e7ae4b7b70e7c404e09f1b160781cd0ec
suggested products:
https://github.com/mozilla/treeherder/blob/2ecfa091977853016bc452feed5aeeba5e277aea/tests/ui/job-view/bugfiler_test.jsx#L116
keyword related tests:
https://github.com/mozilla/treeherder/blob/2ecfa091977853016bc452feed5aeeba5e277aea/tests/ui/job-view/bugfiler_test.jsx#L358
https://github.com/mozilla/treeherder/blob/2ecfa091977853016bc452feed5aeeba5e277aea/tests/ui/job-view/bugfiler_test.jsx#L366
https://github.com/mozilla/treeherder/blob/2ecfa091977853016bc452feed5aeeba5e277aea/tests/ui/job-view/bugfiler_test.jsx#L374
https://github.com/mozilla/treeherder/blob/2ecfa091977853016bc452feed5aeeba5e277aea/tests/ui/job-view/bugfiler_test.jsx#L382
https://github.com/mozilla/treeherder/blob/2ecfa091977853016bc452feed5aeeba5e277aea/tests/ui/job-view/bugfiler_test.jsx#L390
I would like to get these tests working to some degree- it would help to know if there are other tests we should consider or usage which might be important.
| Reporter | ||
Updated•4 years ago
|
Comment 1•4 years ago
|
||
expect(displayed).toBeInTheDocument(expected);
The documentation doesn't mention an argument for toBeInTheDocument and passing in anything doesn't let the test fail. toHaveValue (because it is an input element) and to a full match on the summary should fix it.
const securityIssue = await screen.getByText(
'Report this as a security issue',
);
expect(securityIssue).toBeTruthy();
always passed because the text element is always truthy. That one checks the checkbox state:
const securityIssue = await screen.getByLabelText(
'Report this as a security issue',
);
expect(securityIssue).toBeChecked();
should parse finding the filename when the TEST-FOO is not omitted and should strip omitted leads from thisFailure would be covered by the changes to the summary checks above.
Missing test coverage
- crash signature set
- bug description on submission (e.g. links to logs)
- all failure lines in textarea which gets shown if down arrow clicked
- character count for bug summary works, submitting bug with more than 255 characters in summary blocked
- no cached values in bugfiler form when it gets launched
Description
•