mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2025-12-06 02:30:47 -08:00
fix: execution too fast causes 'socket hang up'
This commit is contained in:
parent
e43e4a7f16
commit
d3dfb7ef78
2 changed files with 17 additions and 15 deletions
|
|
@ -7,6 +7,7 @@ import { TiddlyGitWorld } from '../supports/world';
|
|||
setWorldConstructor(TiddlyGitWorld);
|
||||
|
||||
Given('the app is launched', async function (this: TiddlyGitWorld) {
|
||||
await delay(100);
|
||||
await this.start();
|
||||
const windowCount = await this.app?.client?.getWindowCount();
|
||||
expect(windowCount).equal(1);
|
||||
|
|
|
|||
|
|
@ -13,20 +13,21 @@ Before(async function () {
|
|||
|
||||
After(async function (this: TiddlyGitWorld, testCase) {
|
||||
// print logs if test failed
|
||||
if (this.app !== undefined && testCase.result?.status === Status.FAILED) {
|
||||
console.log('main:\n---\n');
|
||||
await this.app.client.getMainProcessLogs().then(function (logs) {
|
||||
logs.forEach(function (log) {
|
||||
console.log(log, '\n');
|
||||
});
|
||||
});
|
||||
console.log('renderer:\n---\n');
|
||||
await this.app.client.getRenderProcessLogs().then(function (logs) {
|
||||
logs.forEach(function (log) {
|
||||
console.log(JSON.stringify(log), '\n');
|
||||
});
|
||||
});
|
||||
console.log('\n');
|
||||
}
|
||||
// if (this.app !== undefined && testCase.result?.status === Status.FAILED) {
|
||||
// console.log('main:\n---\n');
|
||||
// // FIXME: TypeError: this.app.client.getMainProcessLogs is not a function
|
||||
// await this.app.client.getMainProcessLogs().then(function (logs) {
|
||||
// logs.forEach(function (log) {
|
||||
// console.log(log, '\n');
|
||||
// });
|
||||
// });
|
||||
// console.log('renderer:\n---\n');
|
||||
// await this.app.client.getRenderProcessLogs().then(function (logs) {
|
||||
// logs.forEach(function (log) {
|
||||
// console.log(JSON.stringify(log), '\n');
|
||||
// });
|
||||
// });
|
||||
// console.log('\n');
|
||||
// }
|
||||
await this.close();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue