-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: fix can\'t find sample page element (#11857)
* test: fix can\'t find sample page element --------- Co-authored-by: Ivan_Chen <[email protected]>
- Loading branch information
1 parent
ec004ad
commit a9b9885
Showing
4 changed files
with
153 additions
and
101 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
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 |
---|---|---|
|
@@ -9,20 +9,17 @@ import { Page } from "playwright"; | |
import { TemplateProject } from "../../utils/constants"; | ||
import { validateNpm } from "../../utils/playwrightOperation"; | ||
import { CaseFactory } from "./sampleCaseFactory"; | ||
import { SampledebugContext } from "./sampledebugContext"; | ||
|
||
class NpmSearchTestCase extends CaseFactory { | ||
override async onValidate( | ||
page: Page, | ||
options?: { npmName: string } | ||
options?: { npmName: string; context: SampledebugContext } | ||
): Promise<void> { | ||
return await validateNpm(page, { npmName: options?.npmName }); | ||
} | ||
|
||
override async onCliValidate( | ||
page: Page, | ||
options?: { npmName: string } | ||
): Promise<void> { | ||
return await validateNpm(page, { npmName: options?.npmName }); | ||
return await validateNpm(page, { | ||
npmName: options?.npmName, | ||
appName: options?.context.appName.substring(0, 10) || "", | ||
}); | ||
} | ||
} | ||
|
||
|
@@ -32,5 +29,5 @@ new NpmSearchTestCase( | |
"[email protected]", | ||
"dev", | ||
[], | ||
{ npmName: "axios", debug: "ttk" } | ||
{ npmName: "axios" } | ||
).test(); |
Oops, something went wrong.