-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add apimsg with multiple parameters case (#12034)
- Loading branch information
Showing
6 changed files
with
162 additions
and
26 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
92 changes: 92 additions & 0 deletions
92
packages/tests/src/ui-test/remotedebug/remotedebug-msg-multiple-params-win-only.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,92 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT license. | ||
|
||
/** | ||
* @author Anne Fu <[email protected]> | ||
*/ | ||
import * as path from "path"; | ||
import { VSBrowser } from "vscode-extension-tester"; | ||
import { | ||
CommandPaletteCommands, | ||
Timeout, | ||
Notification, | ||
} from "../../utils/constants"; | ||
import { RemoteDebugTestContext } from "./remotedebugContext"; | ||
import { | ||
execCommandIfExist, | ||
getNotification, | ||
createNewProject, | ||
clearNotifications, | ||
} from "../../utils/vscodeOperation"; | ||
import { cleanUpLocalProject, cleanTeamsApp } from "../../utils/cleanHelper"; | ||
import { it } from "../../utils/it"; | ||
import { | ||
initPage, | ||
validateMultiParamsApiMeResult, | ||
} from "../../utils/playwrightOperation"; | ||
import { Env } from "../../utils/env"; | ||
|
||
describe("Remote debug Tests", function () { | ||
this.timeout(Timeout.testAzureCase); | ||
let remoteDebugTestContext: RemoteDebugTestContext; | ||
let testRootFolder: string; | ||
let appName: string; | ||
const appNameCopySuffix = "copy"; | ||
let newAppFolderName: string; | ||
let projectPath: string; | ||
|
||
beforeEach(async function () { | ||
// ensure workbench is ready | ||
this.timeout(Timeout.prepareTestCase); | ||
remoteDebugTestContext = new RemoteDebugTestContext("msgmulparams"); | ||
testRootFolder = remoteDebugTestContext.testRootFolder; | ||
appName = remoteDebugTestContext.appName; | ||
newAppFolderName = appName + appNameCopySuffix; | ||
projectPath = path.resolve(testRootFolder, newAppFolderName); | ||
await remoteDebugTestContext.before(); | ||
}); | ||
|
||
afterEach(async function () { | ||
this.timeout(Timeout.finishAzureTestCase); | ||
await remoteDebugTestContext.after(); | ||
//Close the folder and cleanup local sample project | ||
await execCommandIfExist("Workspaces: Close Workspace", Timeout.webView); | ||
console.log(`[Successfully] start to clean up for ${projectPath}`); | ||
// uninstall Teams app | ||
cleanTeamsApp(appName), cleanUpLocalProject(projectPath); | ||
}); | ||
|
||
it( | ||
"[auto] Remote debug for new API message extension with multiple parameters", | ||
{ | ||
testPlanCaseId: 25860087, | ||
author: "[email protected]", | ||
}, | ||
async function () { | ||
const driver = VSBrowser.instance.driver; | ||
await createNewProject("msgmulparams", appName); | ||
await clearNotifications(); | ||
await execCommandIfExist(CommandPaletteCommands.ProvisionCommand); | ||
await driver.sleep(Timeout.openAPIProvision); | ||
await getNotification( | ||
Notification.ProvisionSucceeded, | ||
Timeout.shortTimeWait | ||
); | ||
await clearNotifications(); | ||
const teamsAppId = await remoteDebugTestContext.getTeamsAppId( | ||
projectPath | ||
); | ||
|
||
const page = await initPage( | ||
remoteDebugTestContext.context!, | ||
teamsAppId, | ||
Env.username, | ||
Env.password | ||
); | ||
await validateMultiParamsApiMeResult( | ||
page, | ||
remoteDebugTestContext.appName | ||
); | ||
} | ||
); | ||
}); |
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