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.50.1 #10986

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
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
30 changes: 15 additions & 15 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 @@ -98,7 +98,7 @@
},
"devDependencies": {
"@apidevtools/swagger-parser": "^10.1.1",
"@playwright/test": "^1.41.2",
"@playwright/test": "^1.50.1",
"@rtk-query/codegen-openapi": "^2.0.0",
"@testing-library/dom": "^10.4.0",
"@testing-library/react": "^16.2.0",
Expand Down
1 change: 1 addition & 0 deletions front/tests/assets/constants/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_RS_E2E';
export const dualModeRollingStockName = 'DUAL-MODE_RS_E2E';
export const slowRollingStockName = 'SLOW_RS_E2E';
Expand Down
23 changes: 13 additions & 10 deletions front/tests/utils/api-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import type {
} from 'common/api/osrdEditoastApi';

import {
BASE_URL,
globalProjectName,
globalStudyName,
infrastructureName,
Expand All @@ -39,7 +40,7 @@ import readJsonFile from './file-utils';
*/
export const getApiContext = async (): Promise<APIRequestContext> =>
request.newContext({
baseURL: 'http://localhost:4000',
baseURL: BASE_URL,
});

/**
Expand Down Expand Up @@ -98,16 +99,18 @@ export const postApiRequest = async <T, U>(
* 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