Repository navigation
Tweak tests - #3948
Tweak tests#3948
Conversation
| ? firefoxCI | ||
| : firefox; | ||
|
|
||
| await expect.element(grid).toHaveStyle({ gridTemplateColumns }); |
There was a problem hiding this comment.
🤷♂️
This doesn't work:
await expect.element(grid).toHaveStyle(
expect.toBeOneOf([
{ gridTemplateColumns: chrome },
{ gridTemplateColumns: firefox },
{ gridTemplateColumns: firefoxCI },
])
);This also doesn't work:
await expect.element(grid).toHaveStyle({
gridTemplateColumns: expect.toBeOneOf([chrome, firefox, firefoxCI])
});This DOES work, at runtime, but it seems like there are bugs with vitest's types
await expect
.element(grid)
.toBeOneOf([
expect.toHaveStyle({ gridTemplateColumns: chrome }),
expect.toHaveStyle({ gridTemplateColumns: firefox }),
expect.toHaveStyle({ gridTemplateColumns: firefoxCI })
]);| @@ -1,3 +1,7 @@ | |||
| declare global { | |||
| const __IS_CI__: boolean; | |||
There was a problem hiding this comment.
This type is only available in test files, thanks to compartmentalized tsconfigs.
| viewport | ||
| }, | ||
| launchOptions: { | ||
| channel: 'chromium' |
There was a problem hiding this comment.
Gotta have separate providers so we can set this channel for chrome
| { | ||
| browser: 'chromium', | ||
| provider: playwright({ | ||
| actionTimeout: 1000, |
There was a problem hiding this comment.
Added actionTimeout.
| viewport | ||
| } | ||
| }), | ||
| instances: [{ browser: 'chromium' }, { browser: 'firefox' }], |
There was a problem hiding this comment.
fileParallelism was missing here
| it('should merges cells', async () => { | ||
| await setupColSpan(); | ||
| // header | ||
| expect(getHeaderCells()).toHaveLength(13); |
There was a problem hiding this comment.
At some point we should use getHeaderCellsNew
| expect(topSummarryRow1[7]).toHaveAttribute('aria-colindex', '8'); | ||
| expect(topSummarryRow1[7]).toHaveAttribute('aria-colspan', '2'); | ||
| expect(topSummarryRow1[7]).toHaveStyle({ | ||
| await expect.element(topSummarryRow1[7]).toHaveAttribute('aria-colindex', '8'); |
There was a problem hiding this comment.
It will be nice if we can use nth
| } | ||
| }), | ||
| instances: [{ browser: 'chromium' }, { browser: 'firefox' }], | ||
| instances: getInstances(), |
There was a problem hiding this comment.
https://developer.chrome.com/blog/chrome-headless-shell
Should old headless be used for screenshots?
There was a problem hiding this comment.
I think using the new headless is better for accuracy, as it's closer to the real browser.
And tests are fast enough, so we don't really need the speed benefit of old headless.
await expect.element()expect.poll()left.all()left.elements()