build: update e2e command for new sync tests

This commit is contained in:
Johannes Millan 2025-07-25 17:05:13 +02:00
parent 1cd487a8e7
commit 7a4b43a0fe
3 changed files with 1117 additions and 3591 deletions

View file

@ -1,17 +1,34 @@
import { NightwatchBrowser } from 'nightwatch';
module.exports = {
async command(this: NightwatchBrowser, noteName: string) {
return this.perform(() =>
browser.getLog('browser', (logEntries) => {
const errors = logEntries.filter((entry) => entry.level.name === 'SEVERE');
async command(this: NightwatchBrowser) {
return this.perform(function () {
// @ts-ignore
// eslint-disable-next-line @typescript-eslint/no-this-alias
const browser = this;
browser.getLog('browser', (logEntries: any[]) => {
// Filter out expected/acceptable errors
const errors = logEntries.filter((entry) => {
if (entry.level.name !== 'SEVERE') return false;
const message = entry.message || '';
// Ignore common benign errors
if (message.includes('Persistence not allowed')) return false;
if (message.includes('favicon.ico')) return false;
if (message.includes('ResizeObserver loop')) return false;
if (message.includes('Non-Error promise rejection')) return false;
return true;
});
if (errors.length > 0) {
console.log('\nBROWSER CONSOLE ERRORS:');
console.error(errors);
console.log('\n');
}
browser.assert.equal(errors.length, 0, 'No console errors found');
}),
);
browser.assert.equal(errors.length, 0, 'No critical console errors found');
});
});
},
};

4675
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -53,7 +53,7 @@
"dist:win:only": "electron-builder --win",
"dist:win:store": "git pull && npm run && copy electron-builder.win-store.yaml electron-builder.yaml && npm run dist:win && git checkout electron-builder.yaml || git checkout electron-builder.yaml",
"droid": "npm run buildFrontend:stageWeb:unminified && npx cap sync",
"e2e": "cross-env TZ='Europe/Berlin' DETECT_CHROMEDRIVER_VERSION=true SKIP_POST_INSTALL=true npm i -D chromedriver --legacy-peer-deps && tsc --project e2e/tsconfig.e2e.json && start-server-and-test 'ng serve --no-live-reload' http://localhost:4200 'nightwatch -c ./e2e/nightwatch.conf.js --suiteRetries 1 --retries 1'",
"e2e": "cross-env WEBDAV_DATA_DIR=./e2e-webdav-data docker compose up -d webdav && TZ='Europe/Berlin' DETECT_CHROMEDRIVER_VERSION=true SKIP_POST_INSTALL=true npm i -D chromedriver --legacy-peer-deps && tsc --project e2e/tsconfig.e2e.json && start-server-and-test 'ng serve --no-live-reload' http://localhost:4200 'nightwatch -c ./e2e/nightwatch.conf.js --suiteRetries 1 --retries 1'",
"e2e:tag": "killall chromedriver; rm -R ./.tmp/out-tsc; tsc --project e2e/tsconfig.e2e.json && nightwatch -c ./e2e/nightwatch.conf.js --suiteRetries 0 --retries 0 --tag ",
"e2e:webdav": "WEBDAV_DATA_DIR=./e2e-webdav-data docker compose up -d webdav && sleep 5 && npm run e2e:tag webdav; docker compose down",
"electron": "NODE_ENV=PROD electron .",