-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: UI loading duplicate panels in embed iframe (#1043)
Fixes #1039 and adds some e2e tests
- Loading branch information
1 parent
a8ca9de
commit 6be7a8b
Showing
13 changed files
with
66 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { expect, test } from '@playwright/test'; | ||
import { gotoPage, SELECTORS, waitForLoad } from './utils'; | ||
|
||
test('UI single panel loads in embed widget', async ({ page }) => { | ||
await gotoPage(page, '/iframe/widget/?name=ui_component'); | ||
await expect(page.locator(SELECTORS.REACT_PANEL_VISIBLE)).toBeVisible(); | ||
await waitForLoad(page); | ||
await expect(page).toHaveScreenshot(); | ||
}); | ||
|
||
test('UI multi panel loads in embed widget', async ({ page }) => { | ||
await gotoPage(page, '/iframe/widget/?name=ui_multi_panel'); | ||
await expect(page.locator(SELECTORS.REACT_PANEL)).toHaveCount(2); | ||
// Wait for the titles because embed-widget has a slight delay in showing the headers | ||
await expect(page.getByText('foo')).toBeVisible(); | ||
await expect(page.getByText('bar')).toBeVisible(); | ||
await waitForLoad(page); | ||
await expect(page).toHaveScreenshot(); | ||
}); | ||
|
||
test('UI dashboard loads in embed widget', async ({ page }) => { | ||
await gotoPage(page, '/iframe/widget/?name=ui_dashboard'); | ||
await expect(page.locator(SELECTORS.REACT_PANEL)).toHaveCount(4); | ||
await waitForLoad(page); | ||
await expect(page).toHaveScreenshot(); | ||
}); |
Binary file added
BIN
+14 KB
...idget.spec.ts-snapshots/UI-dashboard-loads-in-embed-widget-1-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+32.3 KB
...widget.spec.ts-snapshots/UI-dashboard-loads-in-embed-widget-1-firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+14.2 KB
..._widget.spec.ts-snapshots/UI-dashboard-loads-in-embed-widget-1-webkit-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.03 KB
...get.spec.ts-snapshots/UI-multi-panel-loads-in-embed-widget-1-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+20.6 KB
...dget.spec.ts-snapshots/UI-multi-panel-loads-in-embed-widget-1-firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.06 KB
...idget.spec.ts-snapshots/UI-multi-panel-loads-in-embed-widget-1-webkit-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+8.86 KB
...et.spec.ts-snapshots/UI-single-panel-loads-in-embed-widget-1-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+25.2 KB
...get.spec.ts-snapshots/UI-single-panel-loads-in-embed-widget-1-firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.04 KB
...dget.spec.ts-snapshots/UI-single-panel-loads-in-embed-widget-1-webkit-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters