From a2e4fc09c9419da708d8cb5d56edde6a3f6c55b4 Mon Sep 17 00:00:00 2001
From: PatrykKuniczak
Date: Tue, 17 Dec 2024 11:34:17 +0100
Subject: [PATCH] fix: imports for wdio.browser.conf.ts
---
tests/e2e/config/wdio.browser.conf.ts | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/tests/e2e/config/wdio.browser.conf.ts b/tests/e2e/config/wdio.browser.conf.ts
index 09726a1dd..0690a172b 100644
--- a/tests/e2e/config/wdio.browser.conf.ts
+++ b/tests/e2e/config/wdio.browser.conf.ts
@@ -1,19 +1,18 @@
-import { config as baseConfig } from './wdio.conf';
-import { readFile } from 'node:fs/promises';
-import { getChromeExtensionPath, getFirefoxExtensionPath } from '../utils/extension-path';
-import { resolve } from 'node:path';
+import { config as baseConfig } from './wdio.conf.js';
+import { readdir, readFile } from 'node:fs/promises';
+import { getChromeExtensionPath, getFirefoxExtensionPath } from '../utils/extension-path.js';
+import { extname, join } from 'node:path';
const isFirefox = process.env.__FIREFOX__ === 'true';
const isCI = process.env.CI === 'true';
const extName = isFirefox ? '.xpi' : '.zip';
-const __dirname = url.fileURLToPath(new URL('.', import.meta.url));
-const extensions = await fs.readdir(path.join(import.meta.dirname, '../../../dist-zip'));
+const extensions = await readdir(join(import.meta.dirname, '../../../dist-zip'));
const latestExtension = extensions
- .filter(file => path.extname(file) === extName)
+ .filter(file => extname(file) === extName)
.sort()
.reverse()[0];
-const extPath = path.join(import.meta.dirname, `../../../dist-zip/${latestExtension}`);
-const bundledExtension = (await fs.readFile(extPath)).toString('base64');
+const extPath = join(import.meta.dirname, `../../../dist-zip/${latestExtension}`);
+const bundledExtension = (await readFile(extPath)).toString('base64');
const chromeCapabilities = {
browserName: 'chrome',