Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

front: bump playwright from 1.43.1 to 1.49.1 #10171

Draft
wants to merge 2 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 15 additions & 19 deletions front/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion front/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
"@apidevtools/swagger-parser": "^10.1.0",
"@import-meta-env/prepare": "^0.2.1",
"@import-meta-env/unplugin": "^0.6.2",
"@playwright/test": "^1.41.2",
"@playwright/test": "^1.49.1",
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.1.0",
Expand Down
1 change: 1 addition & 0 deletions front/tests/assets/project-const.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export const BASE_URL = 'http://localhost:4000';
export const electricRollingStockName = 'electric_rolling_stock_test_e2e';
export const dualModeRollingStockName = 'dual-mode_rolling_stock_test_e2e';
export const slowRollingStockName = 'slow_rolling_stock_test_e2e';
Expand Down
29 changes: 18 additions & 11 deletions front/tests/utils/api-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ import type {
} from 'common/api/osrdEditoastApi';

import electricalProfileSet from '../assets/operationStudies/simulationSettings/electricalProfiles/electricalProfile.json';
import { globalProjectName, globalStudyName, infrastructureName } from '../assets/project-const';
import {
BASE_URL,
globalProjectName,
globalStudyName,
infrastructureName,
} from '../assets/project-const';
import towedRollingStockData from '../assets/stdcm/towedRollingStock/towedRollingStock.json';
import { logger } from '../test-logger';

Expand All @@ -36,7 +41,7 @@ import { logger } from '../test-logger';
*/
export const getApiContext = async (): Promise<APIRequestContext> =>
request.newContext({
baseURL: 'http://localhost:4000',
baseURL: BASE_URL,
});

/**
Expand Down Expand Up @@ -93,16 +98,18 @@ export const postApiRequest = async <T>(
* Send a DELETE request to the specified API endpoint.
*
* @param url - The API endpoint URL.
* @returns {Promise<APIResponse>} - The response from the API.
* @returns {Promise<Response>} - The API response.
*/
export const deleteApiRequest = async (
url: string,
errorMessage?: string
): Promise<APIResponse> => {
const apiContext = await getApiContext();
const response = await apiContext.delete(url);
handleErrorResponse(response, errorMessage);
return response;
export const deleteApiRequest = async (urlExtend: string): Promise<Response> => {
const fullUrl = `${BASE_URL}${urlExtend}`;

return fetch(fullUrl, {
method: 'DELETE',
headers: {
Accept: '*/*',
'Content-Type': 'application/json',
},
});
};

/**
Expand Down
Loading