diff --git a/uui-e2e-tests/scripts/cmd/cmdRunPwDocker.ts b/uui-e2e-tests/scripts/cmd/cmdRunPwDocker.ts index 8b43f350c6..b3a1c8bc2e 100644 --- a/uui-e2e-tests/scripts/cmd/cmdRunPwDocker.ts +++ b/uui-e2e-tests/scripts/cmd/cmdRunPwDocker.ts @@ -8,6 +8,7 @@ import { import { currentMachineIpv4 } from '../ipUtils'; import { getContainerEngineCmd } from '../containerEngineUtils'; import { readUuiSpecificEnvVariables } from '../envParamUtils'; +import path from 'node:path'; const CONTAINER_ENGINE_CMD = getContainerEngineCmd(); const { @@ -82,6 +83,7 @@ function getEnvParamsForDocker(): string[] { } function getVolumesMapArgs() { + const absPathToPreviewIds = forwardSlashes(path.resolve('../app/src/docs/_types/previewIds.ts')); // files/folders to mount volumes return [ './scripts', @@ -94,5 +96,9 @@ function getVolumesMapArgs() { const to = `/e2e/${from.replace('./', '')}`; acc.push('-v', `${from}:${to}`); return acc; - }, []).concat(['-v', '../app/src/docs/_types/previewIds.ts:/app/src/docs/_types/previewIds.ts']); + }, []).concat(['-v', `${absPathToPreviewIds}:/app/src/docs/_types/previewIds.ts`]); +} + +function forwardSlashes(pathStr: string) { + return pathStr.replace(/\\/g, '/'); }