test(textarea): refine testing suite - #8130
Conversation
49d9dee to
f4fefbf
Compare
paulrobinson88
left a comment
There was a problem hiding this comment.
Hi Darius, we've cleared up alot of snapshots and pw tests here, just some queries from me around some which have been removed. Thanks
| }); | ||
| }); | ||
|
|
||
| test("should render with required prop", async ({ mount, page }) => { |
There was a problem hiding this comment.
comment: I think we could probably remove this by just adding a required prop to one of the snapshots currently taken like validation
| await expect(characterCount(page)).not.toBeInViewport(); | ||
| }); | ||
|
|
||
| test("visually hidden character count of 5 should be rendered", async ({ |
There was a problem hiding this comment.
Question: Do we have this covered elsewhere? Specifically the hidden character count.
There was a problem hiding this comment.
I think it's covered by
it("renders a visually hidden hint with id generated via guid") in jest
| }); | ||
| }); | ||
|
|
||
| test(`should verify expandable Textarea shrinks back to original height when lines are removed`, async ({ |
There was a problem hiding this comment.
Question: Do we have this covered elsewhere?
| expect(callbackCount).toEqual(1); | ||
| }); | ||
|
|
||
| test("should call onBlur callback when a blur event is triggered", async ({ |
There was a problem hiding this comment.
Question: Do we have this covered elsewhere?
| expect(callbackCount).toEqual(1); | ||
| }); | ||
|
|
||
| test("should call onClick callback when a click event is triggered", async ({ |
There was a problem hiding this comment.
Comment: I can't see this covered in Jest and we don't appear to have an interaction story, we may want to add this back in.
| expect(callbackCount).toEqual(1); | ||
| }); | ||
|
|
||
| test("should call onMouseDown callback when a mousedown event is triggered", async ({ |
There was a problem hiding this comment.
Comment: I can't see this covered in Jest and we don't appear to have an interaction story, we may want to add this back in.
| const keysToTrigger = ["Enter", "Space"]; | ||
|
|
||
| keysToTrigger.forEach((key) => { | ||
| test(`should call onKeyDown callback when ${key} key is triggered`, async ({ |
There was a problem hiding this comment.
Comment: I can't see this covered in Jest and we don't appear to have an interaction story, we may want to add this back in.
| }); | ||
|
|
||
| testData.forEach((placeholder) => { | ||
| test(`should render with placeholder prop set to ${placeholder}`, async ({ |
There was a problem hiding this comment.
comment: It looks like Jest covers the placeholder being disabled and not rendering but not when it's passed, either we can add it to Jest or maybe add as a prop to one of the stories captured by Chromatic.
test(textarea): fixed lint test(textarea): addressed comments
f4fefbf to
fee3387
Compare
Proposed behaviour
Removes a number of Playwright tests that duplicate either Jest or Chromatic ones for the Simple Color Picker component
Current behaviour
There are a number of tests that exist in different forms in all the testing suites we do(Jest, Playwright, Chromatic) which cause a prolonged time of execution for no additional value.
Checklist
d.tsfile added or updated if requiredQA
Additional context
This should decrease the time of execution without compromising testing and coverage
Testing instructions
Make sure the Playwright tests pass