mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-02 13:48:12 +08:00
e2e-add-more-logs (#1598)
This commit is contained in:
@@ -72,7 +72,7 @@ jobs:
|
|||||||
cd client && ./node_modules/codecov/bin/codecov --yml=../.codecov.yml --root=../ --gcov-root=../ -C -F frontend,javascript,unitTest
|
cd client && ./node_modules/codecov/bin/codecov --yml=../.codecov.yml --root=../ --gcov-root=../ -C -F frontend,javascript,unitTest
|
||||||
|
|
||||||
smoke-tests:
|
smoke-tests:
|
||||||
runs-on: ubuntu-latest
|
runs-on: macos-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Set up Python 3.7
|
- name: Set up Python 3.7
|
||||||
|
|||||||
@@ -53,4 +53,6 @@ jest.retryTimes(ENV_DEFAULT.RETRY_ATTEMPTS);
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})();
|
})().catch((error) => {
|
||||||
|
console.error("puppeteer.setup.js error", error);
|
||||||
|
});
|
||||||
|
|||||||
@@ -6,11 +6,21 @@ const takeScreenshot = require("./takeScreenshot");
|
|||||||
|
|
||||||
class ScreenshotEnvironment extends PuppeteerEnvironment {
|
class ScreenshotEnvironment extends PuppeteerEnvironment {
|
||||||
async handleTestEvent(event, state) {
|
async handleTestEvent(event, state) {
|
||||||
|
if (["test_start", "test_done"].includes(event.name)) {
|
||||||
|
console.log("------------------event name:\n", event.name);
|
||||||
|
console.log("~~~~ Current test errors\n", new Date(), event.test.errors);
|
||||||
|
console.log("~~~~ Current test\n", new Date(), event.test);
|
||||||
|
}
|
||||||
|
|
||||||
if (event.name === "error") {
|
if (event.name === "error") {
|
||||||
console.log("error", JSON.stringify(event));
|
console.log("error event:", JSON.stringify(event));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.name === "test_fn_failure" || event.name === "hook_failure") {
|
if (event.name === "test_fn_failure" || event.name === "hook_failure") {
|
||||||
|
console.log("------------------event name:\n", event.name);
|
||||||
|
console.log(">>>> Current state\n", new Date(), state);
|
||||||
|
console.log("===> Failure event\n", new Date(), event);
|
||||||
|
|
||||||
// (thuang): We only want to take screenshot on the last try
|
// (thuang): We only want to take screenshot on the last try
|
||||||
if (
|
if (
|
||||||
state.currentlyRunningTest.invocations <= ENV_DEFAULT.RETRY_ATTEMPTS
|
state.currentlyRunningTest.invocations <= ENV_DEFAULT.RETRY_ATTEMPTS
|
||||||
@@ -18,8 +28,6 @@ class ScreenshotEnvironment extends PuppeteerEnvironment {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("===> Failure event\n", new Date(), event);
|
|
||||||
|
|
||||||
await takeScreenshot(state.currentlyRunningTest.name, this.global.page);
|
await takeScreenshot(state.currentlyRunningTest.name, this.global.page);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user