-
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: add tab docker sample (#11520)
* test: add tab docker sample * test: update sample test app name --------- Co-authored-by: Ivan_Chen <[email protected]>
- Loading branch information
1 parent
45ce3e3
commit e1b11d5
Showing
8 changed files
with
127 additions
and
4 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
56 changes: 56 additions & 0 deletions
56
packages/tests/src/ui-test/samples/sample-localdebug-hello-world-tab-docker.test.ts
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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT license. | ||
|
||
/** | ||
* @author Ivan Chen <[email protected]> | ||
*/ | ||
|
||
import { Page } from "playwright"; | ||
import { TemplateProject, LocalDebugTaskLabel } from "../../utils/constants"; | ||
import { validateTab, reopenPage } from "../../utils/playwrightOperation"; | ||
import { CaseFactory } from "./sampleCaseFactory"; | ||
import { Env } from "../../utils/env"; | ||
import { SampledebugContext } from "./sampledebugContext"; | ||
|
||
class HelloWorldTabDockerTestCase extends CaseFactory { | ||
override async onValidate( | ||
page: Page, | ||
options?: { includeFunction: boolean } | ||
): Promise<void> { | ||
return await validateTab(page, { | ||
displayName: Env.displayName, | ||
includeFunction: options?.includeFunction, | ||
}); | ||
} | ||
override async onCliValidate( | ||
page: Page, | ||
options?: { includeFunction: boolean } | ||
): Promise<void> { | ||
return await validateTab(page, { | ||
displayName: Env.displayName, | ||
includeFunction: options?.includeFunction, | ||
}); | ||
} | ||
public override async onReopenPage( | ||
sampledebugContext: SampledebugContext, | ||
teamsAppId: string | ||
): Promise<Page> { | ||
return await reopenPage( | ||
sampledebugContext.context!, | ||
teamsAppId, | ||
Env.username, | ||
Env.password, | ||
undefined, | ||
true, | ||
true | ||
); | ||
} | ||
} | ||
|
||
new HelloWorldTabDockerTestCase( | ||
TemplateProject.HelloWorldTabDocker, | ||
27085868, | ||
"[email protected]", | ||
"local", | ||
[LocalDebugTaskLabel.DockerTask] | ||
).test(); |
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
33 changes: 33 additions & 0 deletions
33
packages/tests/src/ui-test/samples/sample-remotedebug-hello-world-tab-docker.test.ts
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT license. | ||
|
||
/** | ||
* @author Ivan Chen <[email protected]> | ||
*/ | ||
|
||
import { Page } from "playwright"; | ||
import { TemplateProject } from "../../utils/constants"; | ||
import { validateTab } from "../../utils/playwrightOperation"; | ||
import { CaseFactory } from "./sampleCaseFactory"; | ||
import { Env } from "../../utils/env"; | ||
|
||
class HelloWorldTabDockerTestCase extends CaseFactory { | ||
override async onValidate( | ||
page: Page, | ||
options?: { includeFunction: boolean } | ||
): Promise<void> { | ||
return await validateTab(page, { | ||
displayName: Env.displayName, | ||
includeFunction: options?.includeFunction, | ||
}); | ||
} | ||
} | ||
|
||
new HelloWorldTabDockerTestCase( | ||
TemplateProject.HelloWorldTabDocker, | ||
27852473, | ||
"[email protected]", | ||
"dev", | ||
undefined, | ||
{ container: true } | ||
).test(); |
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