mirror of
https://github.com/inventree/InvenTree.git
synced 2025-11-14 11:56:44 +00:00
[bug] Playwright fixes (#9933)
* Fixes for playwright testing - Ensure cookies are completely cleaned between sessions - Fix base URL based on vite command - Fix samesite cookie mode - Prevent /static/ files being served by web server on :8000 * Remove gunicorn option * Readjust base URL * Simplify doCachedLogin * Fix logic func * Revert webserver cmd * Set base URL in playwrightconfig file * Fix URL checks * Fix URL definitions * adjust playwright base URL * Tweak for URL helper * Further login tweaks * Tweak test * wait for API before starting tests * Handle error * Adjust login functions * Don't use gunicorn - But still use the webserver to serve static files in CI * Enhanced login functions * Tweak login tests * Fix broken test * Flipped the flippies
This commit is contained in:
@@ -14,7 +14,7 @@ export const setSettingState = async ({
|
||||
setting: string;
|
||||
value: any;
|
||||
}) => {
|
||||
const url = `${apiUrl}/settings/global/${setting}/`;
|
||||
const url = new URL(`settings/global/${setting}/`, apiUrl).toString();
|
||||
|
||||
const response = await request.patch(url, {
|
||||
data: {
|
||||
@@ -38,7 +38,7 @@ export const setPluginState = async ({
|
||||
plugin: string;
|
||||
state: boolean;
|
||||
}) => {
|
||||
const url = `${apiUrl}/plugins/${plugin}/activate/`;
|
||||
const url = new URL(`plugins/${plugin}/activate/`, apiUrl).toString();
|
||||
|
||||
const response = await request.patch(url, {
|
||||
data: {
|
||||
|
||||
Reference in New Issue
Block a user