-
Notifications
You must be signed in to change notification settings - Fork 67
fix: html-reporter gui playwright test launch (step.startTime.getTime) #646
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -168,6 +168,27 @@ describe('PlaywrightTestResultAdapter', () => { | |
|
|
||
| assert.deepEqual(adapter.history, expectedHistory); | ||
| }); | ||
|
|
||
| it('should work if step.startTime is ISO datetime string', () => { | ||
| const steps = [ | ||
| {title: 'Step1', duration: 100, startTime: new Date(1000).toISOString()}, | ||
| {title: 'Step2', duration: 200, startTime: new Date(2000).toISOString()} | ||
| ]; | ||
| const adapter = new PlaywrightTestResultAdapter(mkTestCase(), mkTestResult({steps} as any), UNKNOWN_ATTEMPT); | ||
| const expectedHistory = [mkTestStepCompressed({ | ||
| [TestStepKey.Name]: 'Step1', | ||
| [TestStepKey.Duration]: 100, | ||
| [TestStepKey.TimeStart]: 1000, | ||
| [TestStepKey.Children]: [] | ||
| }), mkTestStepCompressed({ | ||
| [TestStepKey.Name]: 'Step2', | ||
| [TestStepKey.Duration]: 200, | ||
| [TestStepKey.TimeStart]: 2000, | ||
| [TestStepKey.Children]: [] | ||
| })]; | ||
|
|
||
| assert.deepEqual(adapter.history, expectedHistory); | ||
| }); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the test differs from the previous one only by the field
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. as those are just 2 tests, i think its more readable that way |
||
| }); | ||
|
|
||
| describe('id', () => { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When launched via "npx playwright test", its intance of Date.
When launched via "npx html-reporter --tool playwright", its ISO string