From 8f527e6ad3c89a64d123d4e8eb5d2b6d1c038ebb Mon Sep 17 00:00:00 2001 From: Ab <219340+abdala@users.noreply.github.com> Date: Tue, 3 Dec 2024 12:21:56 +0000 Subject: [PATCH] Remove projectPath from filePath before loading testCases (#35) --- dtc-playwright-plugin/src/browser.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dtc-playwright-plugin/src/browser.spec.ts b/dtc-playwright-plugin/src/browser.spec.ts index debef70..41d5299 100644 --- a/dtc-playwright-plugin/src/browser.spec.ts +++ b/dtc-playwright-plugin/src/browser.spec.ts @@ -1,11 +1,11 @@ import {executeTestCase, resolveConfig, loadTestCases} from '@cgauge/dtc' import {test} from '@playwright/test' -const path = process.env.DTC_PLAYWRIGHT_PATH +const projectPath = process.cwd() +const path = process.env.DTC_PLAYWRIGHT_PATH?.replace(projectPath, ''); const config = String(process.env.DTC_PLAYWRIGHT_CONFIG) const {loader, plugins, testRegex} = await resolveConfig(config) -const projectPath = process.cwd() const testCaseExecutions = await loadTestCases(projectPath, loader, testRegex, path)