Skip to content

Commit 29e984a

Browse files
committed
Add playwright test
Seems to be an issue with nuxt3 at the moment within docker https://github.com/nuxt/framework/issues/7828#issuecomment-1267694576
1 parent 7cc831d commit 29e984a

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

docker-compose.yml

+3
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ services:
3434
example-nuxt2:
3535
<<: *base
3636
command: yarn workspace example-nuxt2 run serve
37+
example-nuxt:
38+
<<: *base
39+
command: yarn workspace example-nuxt run serve
3740

3841
# Playwright task
3942
#

e2e/tests/userback.spec.ts

+18
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,21 @@ test('Userback Nuxt2 Widget loads and can be opened', async ({ page }) => {
8282
await expect(page.locator('img.userback-controls-logo')).toHaveCount(1);
8383
await expect(page.locator('text="Report a bug"')).toHaveCount(1);
8484
});
85+
86+
/* @FIXME: Issue with nuxt3 within docker ci need to be resolved
87+
test('Userback Nuxt3 Widget loads and can be opened', async ({ page }) => {
88+
// Error Handling
89+
page.on('pageerror', (err) => { console.error(err.message); });
90+
page.on('console', (message) => { console.log(message); });
91+
92+
await page.goto('http://example-nuxt:3000/');
93+
94+
// Open the userback widget
95+
await (await page.waitForSelector(FEEDBACK_BTN)).click();
96+
97+
// Check for pop-up content
98+
await expect(page.locator('img.userback-controls-logo')).toHaveCount(1);
99+
await expect(page.locator('text="Report a bug"')).toHaveCount(1);
100+
});
101+
102+
*/

examples/nuxt/package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
"dev": "nuxt dev",
88
"generate": "nuxt generate",
99
"preview": "nuxt preview",
10-
"postinstall": "nuxt prepare"
10+
"postinstall": "nuxt prepare",
11+
"serve": "yarn dev -H 0.0.0.0",
12+
"serve2": "yarn build && nuxt generate && nuxt preview -H 0.0.0.0"
1113
},
1214
"dependencies": {
1315
"@userback/vue": "workspace:^",

0 commit comments

Comments
 (0)