Skip to content

Commit

Permalink
more vite confi
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-polinsky committed Dec 12, 2024
1 parent 21f5ea9 commit 00efca2
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
4 changes: 3 additions & 1 deletion packages/electron/src/integration-test/integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ test("sign in successful", async ({ browser }) => {
const page = await browser.newPage();
await testHelper.checkStatus(electronPage, false);
await testHelper.clickSignIn(electronPage);
await testHelper.signIn(page, await getUrl(electronApp));
const url = await getUrl(electronApp);
console.log(url);
await testHelper.signIn(page, url);
await page.waitForLoadState("networkidle");
await testHelper.checkStatus(electronPage, true);
await page.close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ if (!process.env.IMJS_TEST_ELECTRON_CLIENT_ID)
throw new Error("Please provide a clientId in env");

const auth = new ElectronRendererAuthorization({
clientId: process.env.IMJS_TEST_ELECTRON_CLIENT_ID,
clientId: process.env.IMJS_TEST_ELECTRON_CLIENT_ID
});

const signOutButton = document.getElementById("signOut");
Expand Down
6 changes: 3 additions & 3 deletions packages/electron/src/integration-test/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"module": "node16",
"moduleResolution": "node16",
"module": "NodeNext",
"moduleResolution": "nodenext",
"lib": ["DOM"],
"target": "ES5",
"skipLibCheck": true,
Expand All @@ -10,4 +10,4 @@
},
"include": ["./test-app/index.ts", "../renderer/ElectronPreload.ts"],
"exclude": ["node_modules"]
}
}
9 changes: 7 additions & 2 deletions packages/electron/vite.config.mts
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@

import { defineConfig } from 'vite';
import { defineConfig, loadEnv } from 'vite';
const env = loadEnv("", process.cwd(), '');

export default defineConfig({
root: './src/integration-test/test-app',
build: {
outDir: './dist/integration-test/test-app',
outDir: '../../../dist/integration-test/test-app',
emptyOutDir: true,
},
base: "./",
define: {
'process.env': env,
},
});

0 comments on commit 00efca2

Please sign in to comment.