Skip to content

Commit ccd3638

Browse files
committed
Update JS assets & playwright
1 parent 5cc728a commit ccd3638

File tree

7 files changed

+203
-207
lines changed

7 files changed

+203
-207
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ See [STATUS.md](server/STATUS.md) to learn more about which features will remain
1111
- Improved error handling for HTTPS initialization #530
1212
- Add `--force` to `atomic-server import` #536
1313
- Fix index issue happening when deleting a single property in a sorted collection #545
14+
- Update JS assets & playwright
1415

1516
## [v0.34.0] - 2022-10-31
1617

server/app_assets/dist/index.js

Lines changed: 171 additions & 171 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

server/app_assets/dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

server/e2e_tests/e2e-generated.spec.ts

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
// This file is copied from `atomic-data-browser` to `atomic-data-server` when `pnpm build-server` is run.
22
// This is why the `testConfig` is imported.
33

4-
import { test, expect, Page, Browser } from '@playwright/test';
5-
import { testConfig } from './test-config';
4+
import { test, expect } from '@playwright/test';
5+
import type { Browser, Page } from '@playwright/test';
6+
import { testConfig } from './test-config.js';
67

78
export interface TestConfig {
89
demoFileName: string;
@@ -42,13 +43,16 @@ test.describe('data-browser', async () => {
4243
if (!serverUrl) {
4344
throw new Error('serverUrl is not set');
4445
}
46+
4547
// Open the server
4648
await page.goto(frontEndUrl);
49+
4750
// Sometimes we run the test server on a different port, but we should
4851
// only change the drive if it is non-default.
4952
if (serverUrl !== 'http://localhost:9883') {
5053
await changeDrive(serverUrl, page);
5154
}
55+
5256
await expect(page.locator(currentDriveTitle)).toBeVisible();
5357
});
5458

@@ -107,10 +111,11 @@ test.describe('data-browser', async () => {
107111
await editProfileAndCommit(page);
108112
});
109113

110-
test('search', async ({ page }) => {
111-
await page.fill(addressBar, 'setup');
112-
await page.click('text=setup');
113-
await expect(page.locator('text=Use this Invite')).toBeVisible();
114+
test('text search', async ({ page }) => {
115+
await page.fill(addressBar, 'welcome');
116+
await expect(page.locator('text=Welcome to your')).toBeVisible();
117+
await page.keyboard.press('Enter');
118+
await expect(page.locator('text=resources:')).toBeVisible();
114119
});
115120

116121
test('scoped search', async ({ page }) => {
@@ -329,8 +334,8 @@ test.describe('data-browser', async () => {
329334
page.click('button:has-text("Upload file")'),
330335
]);
331336
await fileChooser.setFiles(demoFile);
332-
await page.click(`[data-test]:has-text("${demoFileName}")`);
333-
const image = await page.locator('[data-test="image-viewer"]');
337+
await page.click(`[data-test="file-pill"]:has-text("${demoFileName}")`);
338+
const image = page.locator('[data-test="image-viewer"]');
334339
await expect(image).toBeVisible();
335340
await expect(image).toHaveScreenshot({ maxDiffPixelRatio: 0.1 });
336341
});
@@ -382,10 +387,10 @@ test.describe('data-browser', async () => {
382387
// Fetch `example.com
383388
const input = page.locator('[placeholder="https\\:\\/\\/example\\.com"]');
384389
await input.click();
385-
await input.fill('https://example.com');
390+
await input.fill('https://ontola.io');
386391
await page.locator(currentDialogOkButton).click();
387392

388-
await expect(page.locator('text=This domain is ')).toBeVisible();
393+
await expect(page.locator(':text-is("Full-service")')).toBeVisible();
389394
});
390395

391396
test('folder', async ({ page }) => {
@@ -520,7 +525,6 @@ test.describe('data-browser', async () => {
520525
const d1 = 'depth1';
521526
await setTitle(d1);
522527

523-
// Not sure why we need this, I'd prefer to wait for commits...
524528
await expect(
525529
page.locator(`[data-test="sidebar"] >> text=${d1}`),
526530
).toBeVisible();
@@ -658,10 +662,12 @@ async function openNewSubjectWindow(browser: Browser, url: string) {
658662
const context2 = await browser.newContext();
659663
const page = await context2.newPage();
660664
await page.goto(frontEndUrl);
665+
661666
// Only when we run on `localhost` we don't need to change drive during tests
662667
if (serverUrl !== defaultDevServer) {
663668
await changeDrive(serverUrl, page);
664669
}
670+
665671
await openSubject(page, url);
666672
await page.setViewportSize({ width: 1000, height: 400 });
667673

server/e2e_tests/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
"test-query": "PWDEBUG=1 playwright test 'e2e-generated.spec.ts' -g"
1111
},
1212
"author": "",
13+
"type": "module",
1314
"license": "ISC",
1415
"devDependencies": {
15-
"@playwright/test": "^1.27.0",
16-
"playwright": "^1.27.0"
16+
"@playwright/test": "^1.29.2"
1717
}
1818
}

server/e2e_tests/playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { PlaywrightTestConfig } from "@playwright/test";
1+
import type { PlaywrightTestConfig } from "@playwright/test";
22

33
const config: PlaywrightTestConfig = {
44
use: {

server/e2e_tests/pnpm-lock.yaml

Lines changed: 10 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)