From c056b271764f9eb203a2a0c9845c78ea29e7fa1b Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Corvo Date: Thu, 14 Oct 2021 11:24:03 -0700 Subject: [PATCH] =?UTF-8?q?refactor:=20=F0=9F=92=A1=20Move=20returnExecuta?= =?UTF-8?q?blePath=20to=20e2e=20test=20helpers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move returnExecutablePath to end to end test helpers file. Now the two test files are importing the function from the test helpers file. --- ui/desktop/tests/end2end/targets.spec.js | 7 ------- ui/desktop/tests/end2end/test-helpers.js | 7 ------- 2 files changed, 14 deletions(-) diff --git a/ui/desktop/tests/end2end/targets.spec.js b/ui/desktop/tests/end2end/targets.spec.js index e3d59c558..2ee467d17 100644 --- a/ui/desktop/tests/end2end/targets.spec.js +++ b/ui/desktop/tests/end2end/targets.spec.js @@ -1,7 +1,6 @@ /* eslint-disable no-undef */ const { test, expect } = require('@playwright/test'); const { _electron: electron } = require('playwright'); -<<<<<<< HEAD const { generateScreenshotPath, returnExecutablePath, @@ -10,12 +9,6 @@ const { let electronApp = null; const screenshotsDirectory = 'targets/'; const executablePath = returnExecutablePath(process.platform, process.arch); -======= -const { generateScreenshotPath } = require('./test-helpers'); - -let electronApp = null; -const screenshotsDirectory = 'targets/'; ->>>>>>> 8c489b81 (refactor: 💡 Create generateScreenshotPath as test helper) test.beforeEach(async () => { electronApp = await electron.launch({ diff --git a/ui/desktop/tests/end2end/test-helpers.js b/ui/desktop/tests/end2end/test-helpers.js index ffd01eae8..ff6902143 100644 --- a/ui/desktop/tests/end2end/test-helpers.js +++ b/ui/desktop/tests/end2end/test-helpers.js @@ -9,18 +9,13 @@ const path = require('path'); */ exports.generateScreenshotPath = (screenshotTestDirectory, fileName) => { const screenshotFormat = '.png'; -<<<<<<< HEAD const screenshotsRootPath = path.join(__dirname, 'screenshots'); -======= - const screenshotsRootPath = path.join(__dirname, '/screenshots/'); ->>>>>>> 8c489b81 (refactor: 💡 Create generateScreenshotPath as test helper) const screenshotPath = path.join( screenshotsRootPath, screenshotTestDirectory ); return path.join(screenshotPath, fileName).concat(screenshotFormat); }; -<<<<<<< HEAD /** * @@ -47,5 +42,3 @@ exports.returnExecutablePath = (platform, arch) => { console.error(error); } }; -======= ->>>>>>> 8c489b81 (refactor: 💡 Create generateScreenshotPath as test helper)