-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
feat(test runner): allow to pass arbitrary location to test.step #32504
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
95ab5f3
feat :: allow to pass arbitrary location to test.step
osohyun0224 50aeb59
remove :: rollback to unnecessary test code
osohyun0224 1d21af8
remove :: remove to unnecessary import codes
osohyun0224 2d9a489
fix :: fix build error
osohyun0224 8eb9a21
fix :: strange intervals
osohyun0224 6d59f7b
fix :: Revert unrelated changes
osohyun0224 97d8297
fix :: fix build error
osohyun0224 25eb816
feat(test) :: Added test code for the feature and updated class-test.md
osohyun0224 f891b86
fix :: to fix build error with test.d.ts
osohyun0224 1473584
fix :: stepIndentReporter test running error
osohyun0224 d48ddee
fix :: try to error log with try-catch
osohyun0224 905e5ff
fix :: change to expected result 1
osohyun0224 eaaf52b
fix :: fix test code be foucsed on location
osohyun0224 082154d
add :: add to stepIndentReporter
osohyun0224 0745b36
fix :: fix to expect stripAnsi
osohyun0224 199e29a
rename :: rename to testcode with test-step
osohyun0224 4c3dbac
fix :: Test.step.location class-test.md for Clarity and Conciseness
osohyun0224 80047bf
update :: Update docs/src/test-api/class-test.md (@dgozman)
osohyun0224 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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 |
---|---|---|
|
@@ -128,7 +128,7 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue | |
afterAll(inner: (args: TestArgs & WorkerArgs, testInfo: TestInfo) => Promise<any> | any): void; | ||
afterAll(title: string, inner: (args: TestArgs & WorkerArgs, testInfo: TestInfo) => Promise<any> | any): void; | ||
use(fixtures: Fixtures<{}, {}, TestArgs, WorkerArgs>): void; | ||
step<T>(title: string, body: () => T | Promise<T>, options?: { box?: boolean }): Promise<T>; | ||
step<T>(title: string, body: () => T | Promise<T>, options?: { box?: boolean, location?: Location }): Promise<T>; | ||
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. In addition to this, you have to update documentation at |
||
expect: Expect<{}>; | ||
extend<T extends KeyValue, W extends KeyValue = {}>(fixtures: Fixtures<T, W, TestArgs, WorkerArgs>): TestType<TestArgs & T, WorkerArgs & W>; | ||
info(): TestInfo; | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Please note that
Location
here corresponds to the globallib-dom
Location
, as opposed to the Playwright'sLocation
interface.I'd suggest moving the definition of Playwright's
Location
fromtestReporter.d.ts
toplaywright/types/test.d.ts
since it's now part of the public API.@dgozman - what's your view?
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.
Looking at it along with the issues you mentioned, I think it's right to change like you said.
The maintainers fixed the bug according to your issue. Thank you for the review. 👍🏻👍🏻