From a128e05a9260988e2333f310d2d2ac8b2bc298ba Mon Sep 17 00:00:00 2001 From: Meriem-BenIsmail Date: Mon, 25 Nov 2024 11:15:08 +0100 Subject: [PATCH] ui test for baseurl issue --- .../jupyter_server_test_config_timeline.py | 6 +--- ui-tests/playwright.timeline.config.js | 30 ++++++------------- 2 files changed, 10 insertions(+), 26 deletions(-) diff --git a/ui-tests/jupyter_server_test_config_timeline.py b/ui-tests/jupyter_server_test_config_timeline.py index 41714c17..4578db61 100644 --- a/ui-tests/jupyter_server_test_config_timeline.py +++ b/ui-tests/jupyter_server_test_config_timeline.py @@ -4,14 +4,10 @@ """Server configuration for integration tests. !! Never use this configuration in production because it -opens the server to the world and provides access to JupyterLab +opens the server to the world and provide access to JupyterLab JavaScript objects through the global window variable. """ -import os -from tempfile import mkdtemp from typing import Any -import logging - from jupyterlab.galata import configure_jupyter_server diff --git a/ui-tests/playwright.timeline.config.js b/ui-tests/playwright.timeline.config.js index a50644ed..1aca6f4a 100644 --- a/ui-tests/playwright.timeline.config.js +++ b/ui-tests/playwright.timeline.config.js @@ -1,17 +1,12 @@ -const fs = require('fs'); -const path = require('path'); -const baseConfig = require('@jupyterlab/galata/lib/playwright-config'); - -// Directory for timeline tests -const timelineTestDir = path.resolve( - process.env.TIMELINE_TEST_DIR || '/tmp/galata-timeline-tests' -); +/* + * Copyright (c) Jupyter Development Team. + * Distributed under the terms of the Modified BSD License. + */ -// Ensure the test directory exists -if (!fs.existsSync(timelineTestDir)) { - fs.mkdirSync(timelineTestDir, { recursive: true }); - console.log(`Created timeline test directory: ${timelineTestDir}`); -} +/** + * Configuration for Playwright using default from @jupyterlab/galata + */ +const baseConfig = require('@jupyterlab/galata/lib/playwright-config'); module.exports = { ...baseConfig, @@ -32,14 +27,7 @@ module.exports = { name: 'timeline-tests', testMatch: 'tests/**/timeline-*.spec.ts', testIgnore: '**/.ipynb_checkpoints/**', - retries: process.env.CI ? 2 : 0, - timeout: 90000, - use: { - launchOptions: { - slowMo: 30, - }, - tmpPath: timelineTestDir, // Set dynamic tmpPath - }, + timeout: 120 * 1000, }, ], };