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

DEBUG failing e2e test on macos #2758

Draft
wants to merge 12 commits into
base: feat/import-scancode
Choose a base branch
from
Draft
4 changes: 2 additions & 2 deletions .github/workflows/build-and-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-13, windows-latest]
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: ubuntu-latest
# https://github.com/microsoft/playwright/issues/11932
E2E: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- yarn test:e2e:ci
- os: macos-13
- os: macos-latest
E2E: yarn test:e2e:ci
- os: windows-latest
E2E: yarn test:e2e:ci
Expand Down
30 changes: 16 additions & 14 deletions src/ElectronBackend/errorHandling/errorHandling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,23 @@ async function reportListenerError(
error: unknown,
): Promise<void> {
if (error instanceof Error) {
logger.info(`Failed executing callback function: ${error.message}`);
await getMessageBoxForErrors(
error.message,
error.stack ?? '',
mainWindow,
true,
);
logger.error(`Failed executing callback function: ${error.message}`);
console.log(mainWindow.title);
await Promise.resolve();
// await getMessageBoxForErrors(
// error.message,
// error.stack ?? '',
// mainWindow,
// true,
// );
} else {
logger.info('Failed executing callback function.');
await getMessageBoxForErrors(
'Unexpected internal error',
'',
mainWindow,
true,
);
logger.error('Failed executing callback function.');
// await getMessageBoxForErrors(
// 'Unexpected internal error',
// '',
// mainWindow,
// true,
// );
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/Frontend/Components/ImportDialog/ImportDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ export const ImportDialog: React.FC<ImportDialogProps> = ({
opossumFilePath,
);

await Promise.resolve();

if (success) {
closeDialog();
}
Expand Down
2 changes: 2 additions & 0 deletions src/e2e-tests/__tests__/import-dialog.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ test('imports scancode file', async ({

await importDialog.inputFileSelection.click();
await importDialog.opossumFileSelection.click();
await importDialog.cancelButton.hover();
await importDialog.importButton.hover();
await importDialog.importButton.click();

await importDialog.assert.titleIsHidden();
Expand Down
Loading