From ec394df378795b466d85fb89ee602524b5ee2551 Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Mon, 13 May 2024 17:50:08 +0200 Subject: [PATCH] create and delete tmpPath --- ui-tests/test/mobile.spec.ts | 12 +++++++++++- ui-tests/test/settings.spec.ts | 12 +++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/ui-tests/test/mobile.spec.ts b/ui-tests/test/mobile.spec.ts index 6aa0d235a1..079a0b3f6d 100644 --- a/ui-tests/test/mobile.spec.ts +++ b/ui-tests/test/mobile.spec.ts @@ -1,7 +1,7 @@ // Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. -import { expect } from '@jupyterlab/galata'; +import { expect, galata } from '@jupyterlab/galata'; import { test } from './fixtures'; @@ -14,6 +14,16 @@ test.use({ }); test.describe('Mobile', () => { + test.beforeAll(async ({ request, tmpPath }) => { + const contents = galata.newContentsHelper(request); + await contents.createDirectory(tmpPath); + }); + + test.afterAll(async ({ request, tmpPath }) => { + const contents = galata.newContentsHelper(request); + await contents.deleteDirectory(tmpPath); + }); + test('The layout should be more compact on the file browser page', async ({ page, tmpPath, diff --git a/ui-tests/test/settings.spec.ts b/ui-tests/test/settings.spec.ts index 7d76390451..19997b806a 100644 --- a/ui-tests/test/settings.spec.ts +++ b/ui-tests/test/settings.spec.ts @@ -3,11 +3,21 @@ import { test } from './fixtures'; -import { expect } from '@jupyterlab/galata'; +import { expect, galata } from '@jupyterlab/galata'; test.use({ autoGoto: false, tmpPath: 'settings' }); test.describe('Settings', () => { + test.beforeAll(async ({ request, tmpPath }) => { + const contents = galata.newContentsHelper(request); + await contents.createDirectory(tmpPath); + }); + + test.afterAll(async ({ request, tmpPath }) => { + const contents = galata.newContentsHelper(request); + await contents.deleteDirectory(tmpPath); + }); + test('Should be persisted after reloading the page', async ({ page, tmpPath,