Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Angular's Ivy compiler #2451

Merged
merged 2 commits into from
Feb 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions test/e2e/test-app-start.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,18 @@ test.describe("Bundled application is starting correctly", () => {
await app.close();
});

test("Show the splash screen, auth window, then login", async () => {
const windows = await waitForWindows(app, 4);
expect(windows.length).toEqual(4);
test("Check that windows are loaded", async () => {
await waitForWindows(app, 4);
expect(await getWindow(app, WindowType.splash)).toBeTruthy();
expect(await getWindow(app, WindowType.main)).toBeTruthy();
expect(await getWindow(app, WindowType.auth)).toBeTruthy();
expect(await getWindow(app, WindowType.devTools)).toBeTruthy();
});

test("Log in", async () => {
const authWindow = await getWindow(app, WindowType.auth);
const mainWindow = await getWindow(app, WindowType.main);

expect(await authWindow.title()).toEqual("Sign in to your account");
await signIn(app, authWindow);

expect(await mainWindow.title()).toEqual("Batch Explorer");
});

test("Select an account", async () => {
Expand Down
20 changes: 14 additions & 6 deletions test/e2e/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,23 @@ export enum WindowType {
}

export async function getWindow(app: ElectronApplication, type: WindowType): Promise<Page> {
const windows = await app.windows();
const matcher = windowMatcher(type);
for (let i = 0; i < windows.length; i++) {
const url = windows[i].url();
if (url && matcher(url)) {
return windows[i];
while (true) {
const win: Page | null = await new Promise(resolve => setTimeout(() => {
const windows = app.windows();
for (let i = 0; i < windows.length; i++) {
const url = windows[i].url();
if (url && matcher(url)) {
resolve(windows[i]);
}
}
resolve(null);
}, 50));

if (win) {
return win;
}
}
throw new Error(`Could not find window ${type}`);
}

function windowMatcher(type: WindowType): (url: string) => boolean {
Expand Down
10 changes: 1 addition & 9 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,5 @@
],
"exclude": [
"**/testing/**/*",
],
"awesomeTypescriptLoaderOptions": {
"forkChecker": true,
"useCache": true,
"useWebpackText": true
},
"angularCompilerOptions": {
"enableIvy": false
},
]
}