Skip to content

Commit 6b346a6

Browse files
committed
Fix tests for server
1 parent 3b1a783 commit 6b346a6

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

data-browser/src/hooks/useSavedDrives.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ import { useSettings } from '../helpers/AppSettings';
55

66
const rootDrives = [
77
window.location.origin,
8-
...(isDev() ? ['https://atomicdata.dev', 'http://localhost:9883'] : []),
8+
'https://atomicdata.dev',
9+
...(isDev() ? ['http://localhost:9883'] : []),
910
];
1011

1112
const arrayOpts = {

data-browser/src/routes/SettingsServer/WSIndicator.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ function getIndicatorState(
5656
}
5757
}
5858

59+
/** Shows the status of a WebSocket connection for some resource. */
5960
export function WSIndicator({
6061
subject,
6162
className,

data-browser/tests/e2e.spec.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ const publicReadRight =
3232
'[data-test="right-public"] input[type="checkbox"] >> nth=0';
3333
const contextMenu = '[data-test="context-menu"]';
3434
const addressBar = '[data-test="address-bar"]';
35+
const defaultDevServer = 'http://localhost:9883';
3536

3637
test.describe('data-browser', async () => {
3738
test.beforeEach(async ({ page }) => {
@@ -573,7 +574,10 @@ async function openNewSubjectWindow(browser: Browser, url: string) {
573574
const context2 = await browser.newContext();
574575
const page = await context2.newPage();
575576
await page.goto(frontEndUrl);
576-
await changeDrive(serverUrl, page);
577+
// Only when we run on `localhost` we don't need to change drive during tests
578+
if (serverUrl !== defaultDevServer) {
579+
await changeDrive(serverUrl, page);
580+
}
577581
await openSubject(page, url);
578582
await page.setViewportSize({ width: 1000, height: 400 });
579583

0 commit comments

Comments
 (0)