mirror of https://github.com/vector-im/riot-web
Excluding floating-ui portals as part of hiding tooltips in Playwright screenshots (#28287)
* Excluding floating-ui portals as part of hiding tooltips in Playwright screenshots Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update screenshot Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>pull/28313/head
parent
ef605260b5
commit
954ff0adc0
|
@ -196,14 +196,7 @@ export class Helpers {
|
|||
*/
|
||||
async assertEmptyPinnedMessagesList() {
|
||||
const rightPanel = this.getRightPanel();
|
||||
await expect(rightPanel).toMatchScreenshot(`pinned-messages-list-empty.png`, {
|
||||
// hide the tooltip "Room information" to avoid flakiness
|
||||
css: `
|
||||
[data-floating-ui-portal] {
|
||||
display: none !important;
|
||||
}
|
||||
`,
|
||||
});
|
||||
await expect(rightPanel).toMatchScreenshot(`pinned-messages-list-empty.png`);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -42,7 +42,7 @@ export class Helpers {
|
|||
*/
|
||||
async assertReleaseAnnouncementIsVisible(name: string) {
|
||||
await expect(this.getReleaseAnnouncement(name)).toBeVisible();
|
||||
await expect(this.page).toMatchScreenshot(`release-announcement-${name}.png`);
|
||||
await expect(this.page).toMatchScreenshot(`release-announcement-${name}.png`, { showTooltips: true });
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -345,6 +345,7 @@ export const expect = baseExpect.extend({
|
|||
|
||||
if (!options?.showTooltips) {
|
||||
css += `
|
||||
[data-floating-ui-portal],
|
||||
[role="tooltip"] {
|
||||
visibility: hidden !important;
|
||||
}
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 17 KiB |
Loading…
Reference in New Issue