From 0d1d13ec6dc1bad344844c3759b016129ec9647a Mon Sep 17 00:00:00 2001 From: Core <64542347+coredev-uk@users.noreply.github.com> Date: Tue, 1 Feb 2022 12:08:52 +0000 Subject: [PATCH 1/7] swapped to playwrights image --- .circleci/config.yml | 4 +++- src/__tests__/base.test.ts | 5 +++-- tsconfig.json | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a8c75a6b..f7469b28 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,9 @@ jobs: build: working_directory: ~/Cider docker: - - image: circleci/node:16 + - image: mcr.microsoft.com/playwright:focal + environment: + NODE_ENV: development steps: - checkout - run: diff --git a/src/__tests__/base.test.ts b/src/__tests__/base.test.ts index 2d0d7027..848f3be1 100644 --- a/src/__tests__/base.test.ts +++ b/src/__tests__/base.test.ts @@ -6,7 +6,8 @@ import * as fs from "fs"; test("Launch electron app", async () => { const paths = { - "main": join(__dirname, "../../build/main"), + "mainBuild": join(__dirname, "../../build/"), + "main": join(__dirname, "../main"), "root": join(__dirname, "../../"), } @@ -14,7 +15,7 @@ test("Launch electron app", async () => { console.log(fs.readdirSync(paths.main)) - const electronApp = await electron.launch({ args: [paths.main], cwd: paths.root }); + const electronApp = await electron.launch({ args: [paths.mainBuild] }); const appPath = await electronApp.evaluate(async ({ app }) => { // This runs in the main Electron process, parameter here is always diff --git a/tsconfig.json b/tsconfig.json index ab9a3a6c..ce990f01 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -18,6 +18,6 @@ ] }, "include": [ - "src/**/*" + "src/main/*" ] -} \ No newline at end of file +} From f8b825344310f1784e69301966d472ea74bedd9e Mon Sep 17 00:00:00 2001 From: Core <64542347+coredev-uk@users.noreply.github.com> Date: Tue, 1 Feb 2022 12:12:16 +0000 Subject: [PATCH 2/7] reverted it and run it manually --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f7469b28..743fdbc2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ jobs: build: working_directory: ~/Cider docker: - - image: mcr.microsoft.com/playwright:focal + - image: circleci/node:16 environment: NODE_ENV: development steps: @@ -32,6 +32,7 @@ jobs: sudo dpkg --add-architecture i386 sudo apt-get update -y sudo apt-get install -y wine32 + yarn playwright install-deps chromium - store_test_results: path: test-results - run: From bf8a326509383d213b5a9ff281cc03ac2ee630f5 Mon Sep 17 00:00:00 2001 From: Core <64542347+coredev-uk@users.noreply.github.com> Date: Tue, 1 Feb 2022 12:21:09 +0000 Subject: [PATCH 3/7] attempt 2e9 --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 743fdbc2..932578c6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,8 +4,6 @@ jobs: working_directory: ~/Cider docker: - image: circleci/node:16 - environment: - NODE_ENV: development steps: - checkout - run: @@ -18,6 +16,9 @@ jobs: - run: name: Install Dependencies command: yarn install --immutable + - run: + name: Install Playwright + command: yarn playwright install --with-deps - save_cache: name: Save Yarn Package Cache key: yarn-packages-{{ checksum "yarn.lock" }} @@ -32,7 +33,6 @@ jobs: sudo dpkg --add-architecture i386 sudo apt-get update -y sudo apt-get install -y wine32 - yarn playwright install-deps chromium - store_test_results: path: test-results - run: From 4bc766feb16d795ab59be6a069cc2319d0f0307b Mon Sep 17 00:00:00 2001 From: Core <64542347+coredev-uk@users.noreply.github.com> Date: Tue, 1 Feb 2022 12:24:09 +0000 Subject: [PATCH 4/7] this wont work --- src/__tests__/base.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/__tests__/base.test.ts b/src/__tests__/base.test.ts index 848f3be1..6ffc476c 100644 --- a/src/__tests__/base.test.ts +++ b/src/__tests__/base.test.ts @@ -15,7 +15,7 @@ test("Launch electron app", async () => { console.log(fs.readdirSync(paths.main)) - const electronApp = await electron.launch({ args: [paths.mainBuild] }); + const electronApp = await electron.launch({ args: ['main.js'] }); const appPath = await electronApp.evaluate(async ({ app }) => { // This runs in the main Electron process, parameter here is always From fdf2b8417876e2f71ca99b2fc9b5e51ed6f7e765 Mon Sep 17 00:00:00 2001 From: Core <64542347+coredev-uk@users.noreply.github.com> Date: Tue, 1 Feb 2022 12:27:16 +0000 Subject: [PATCH 5/7] fuck this --- src/__tests__/base.test.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/__tests__/base.test.ts b/src/__tests__/base.test.ts index 6ffc476c..8629c017 100644 --- a/src/__tests__/base.test.ts +++ b/src/__tests__/base.test.ts @@ -1,21 +1,21 @@ import { _electron as electron } from "playwright"; import { test, expect } from "@playwright/test"; -import { join } from "path"; +import { resolve } from "path"; import * as fs from "fs"; test("Launch electron app", async () => { const paths = { - "mainBuild": join(__dirname, "../../build/"), - "main": join(__dirname, "../main"), - "root": join(__dirname, "../../"), + "mainBuild": resolve(__dirname, "../../build/"), + "main": resolve(__dirname, "../main"), + "root": resolve(__dirname, "../../"), } console.log(paths) console.log(fs.readdirSync(paths.main)) - const electronApp = await electron.launch({ args: ['main.js'] }); + const electronApp = await electron.launch({ args: ['build/index.js'], cwd: paths.root }); const appPath = await electronApp.evaluate(async ({ app }) => { // This runs in the main Electron process, parameter here is always From 566e5f2b5d1266a731a3200422fe351c8c49ae1b Mon Sep 17 00:00:00 2001 From: Core <64542347+coredev-uk@users.noreply.github.com> Date: Tue, 1 Feb 2022 12:35:38 +0000 Subject: [PATCH 6/7] test --- src/__tests__/base.test.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/__tests__/base.test.ts b/src/__tests__/base.test.ts index 8629c017..90725579 100644 --- a/src/__tests__/base.test.ts +++ b/src/__tests__/base.test.ts @@ -9,6 +9,8 @@ test("Launch electron app", async () => { "mainBuild": resolve(__dirname, "../../build/"), "main": resolve(__dirname, "../main"), "root": resolve(__dirname, "../../"), + "cwd": __dirname, + "processcwd": process.cwd() } console.log(paths) From 64bc64000210c8b7d1fdb768da3e4ccab1fc1220 Mon Sep 17 00:00:00 2001 From: Core <64542347+coredev-uk@users.noreply.github.com> Date: Tue, 1 Feb 2022 14:59:16 +0000 Subject: [PATCH 7/7] removed weird log --- src/main/base/app.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/main/base/app.ts b/src/main/base/app.ts index 2a6d13a9..908f93e0 100644 --- a/src/main/base/app.ts +++ b/src/main/base/app.ts @@ -238,9 +238,6 @@ export class AppEvents { } }) - console.log("THISHI ISFJDKIASKJDBKDJSFDLJ { this.setTray(true) })