-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use promise all settled to handle non blocking on running process
- Loading branch information
Ando
committed
May 30, 2024
1 parent
9c139a4
commit 7a49e39
Showing
4 changed files
with
92 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,43 @@ | ||
import { driver } from '../mod.ts' | ||
|
||
driver({ browser: 'chrome' }).then(({ service }) => { | ||
service.cases = [ | ||
async ({ builder, assert }) => { | ||
service.case_name = 'Verify Title' | ||
const title = await builder.getTitle() | ||
assert.assertEquals(title, 'Drowser') | ||
}, | ||
] | ||
}).catch((error) => console.log(error)) | ||
driver({ browser: 'chrome' }) | ||
.then(({ service }) => { | ||
service.cases = [ | ||
{ | ||
name: 'Verify Failed Title', | ||
case: async ({ builder, assert }) => { | ||
const title = await builder.getTitle() | ||
assert.assertEquals(title, 'Drowsers') | ||
}, | ||
}, | ||
{ | ||
name: 'Verify Title', | ||
case: async ({ builder, assert }) => { | ||
const title = await builder.getTitle() | ||
assert.assertEquals(title, 'Drowser') | ||
}, | ||
}, | ||
] | ||
}) | ||
.catch((error) => console.log(error)) | ||
|
||
driver({ browser: 'firefox' }).then(({ service }) => { | ||
service.cases = [ | ||
async ({ builder, assert }) => { | ||
service.case_name = 'Verify Title' | ||
const title = await builder.getTitle() | ||
assert.assertEquals(title, 'Drowser') | ||
}, | ||
] | ||
}).catch((error) => console.log(error)) | ||
driver({ browser: 'firefox' }) | ||
.then(({ service }) => { | ||
service.cases = [ | ||
{ | ||
name: 'Verify Failed Title', | ||
case: async ({ builder, assert }) => { | ||
const title = await builder.getTitle() | ||
assert.assertEquals(title, 'Drowsers') | ||
}, | ||
}, | ||
{ | ||
name: 'Verify Title', | ||
case: async ({ builder, assert }) => { | ||
const title = await builder.getTitle() | ||
assert.assertEquals(title, 'Drowser') | ||
}, | ||
}, | ||
] | ||
}) | ||
.catch((error) => console.log(error)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters