mirror of
https://github.com/apache/superset.git
synced 2026-04-26 03:24:53 +00:00
test(playwright): convert and create new dataset list playwright tests (#36196)
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
46
superset-frontend/playwright/utils/constants.ts
Normal file
46
superset-frontend/playwright/utils/constants.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Timeout constants for Playwright tests.
|
||||
* Only define timeouts that differ from Playwright defaults or are semantically important.
|
||||
*
|
||||
* Default Playwright timeouts (from playwright.config.ts):
|
||||
* - Test timeout: 30000ms (30s)
|
||||
* - Expect timeout: 8000ms (8s)
|
||||
*
|
||||
* Use these constants instead of magic numbers for better maintainability.
|
||||
*/
|
||||
|
||||
export const TIMEOUT = {
|
||||
/**
|
||||
* Global setup timeout (matches test timeout for cold CI starts)
|
||||
*/
|
||||
GLOBAL_SETUP: 30000, // 30s for global setup auth
|
||||
|
||||
/**
|
||||
* Page navigation and load timeouts
|
||||
*/
|
||||
PAGE_LOAD: 10000, // 10s for page transitions (login → welcome, dataset → explore)
|
||||
|
||||
/**
|
||||
* Form and UI element load timeouts
|
||||
*/
|
||||
FORM_LOAD: 5000, // 5s for forms to become visible (login form, modals)
|
||||
} as const;
|
||||
@@ -17,7 +17,18 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* URL constants for Playwright navigation
|
||||
*
|
||||
* These are relative paths (no leading '/') that rely on baseURL ending with '/'.
|
||||
* playwright.config.ts normalizes baseURL to always end with '/' to ensure
|
||||
* correct URL resolution with APP_PREFIX (e.g., /app/prefix/).
|
||||
*
|
||||
* Example: baseURL='http://localhost:8088/app/prefix/' + 'tablemodelview/list'
|
||||
* = 'http://localhost:8088/app/prefix/tablemodelview/list'
|
||||
*/
|
||||
export const URL = {
|
||||
DATASET_LIST: 'tablemodelview/list',
|
||||
LOGIN: 'login/',
|
||||
WELCOME: 'superset/welcome/',
|
||||
} as const;
|
||||
|
||||
Reference in New Issue
Block a user