Skip to content

Commit 7e0c71d

Browse files
authored
test: search app to load it in Teams (#14213)
* test: search app to load it in Teams * test: resolve copilot suggestions
1 parent 2310dd4 commit 7e0c71d

File tree

39 files changed

+355
-188
lines changed

39 files changed

+355
-188
lines changed

packages/tests/src/ui-test/localdebug/localdebug-dashboard-tab-ts.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,12 @@ describe("Local Debug Tests", function () {
6666
teamsAppId,
6767
Env.username,
6868
Env.password,
69-
{ projectPath: projectPath, env: "local" }
69+
{
70+
projectPath: projectPath,
71+
env: "local",
72+
teamsAppName: localDebugTestContext.appName,
73+
searchApp: true,
74+
}
7075
);
7176
await validateBasicDashboardTab(page);
7277
}

packages/tests/src/ui-test/localdebug/localdebug-dashboard-tab.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,12 @@ describe("Local Debug Tests", function () {
6464
teamsAppId,
6565
Env.username,
6666
Env.password,
67-
{ projectPath: projectPath, env: "local" }
67+
{
68+
projectPath: projectPath,
69+
teamsAppName: localDebugTestContext.appName,
70+
env: "local",
71+
searchApp: true,
72+
}
6873
);
6974
await validateBasicDashboardTab(page);
7075
}

packages/tests/src/ui-test/localdebug/localdebug-msg-newapi-apikey-ts.test.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@
77
import * as path from "path";
88
import * as fs from "fs-extra";
99
import { startDebugging, waitForTerminal } from "../../utils/vscodeOperation";
10-
import {
11-
initNoAddappPage,
12-
initPage,
13-
validateApiMeResult,
14-
} from "../../utils/playwrightOperation";
10+
import { initPage, validateApiMeResult } from "../../utils/playwrightOperation";
1511
import { LocalDebugTestContext } from "./localdebugContext";
1612
import { Timeout, LocalDebugTaskLabel, Lang } from "../../utils/constants";
1713
import { Env } from "../../utils/env";
@@ -65,7 +61,7 @@ describe("Local Debug Tests", function () {
6561
teamsAppId,
6662
Env.username,
6763
Env.password,
68-
{ projectPath: projectPath, env: "local" }
64+
{ projectPath: projectPath, env: "local", noAddApp: true }
6965
);
7066
await validateApiMeResult(page, localDebugTestContext.appName);
7167
}

packages/tests/src/ui-test/localdebug/localdebug-msg-newapi-apikey.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ describe("Local Debug Tests", function () {
5959
teamsAppId,
6060
Env.username,
6161
Env.password,
62-
{ projectPath: projectPath, env: "local" }
62+
{ projectPath: projectPath, env: "local", noAddApp: true }
6363
);
6464
await validateApiMeResult(page, localDebugTestContext.appName);
6565
}

packages/tests/src/ui-test/localdebug/localdebug-msg-newapi-microsoftentra-ts.test.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@
66
*/
77
import * as path from "path";
88
import { startDebugging, waitForTerminal } from "../../utils/vscodeOperation";
9-
import {
10-
initNoAddappPage,
11-
validateApiMeResult,
12-
} from "../../utils/playwrightOperation";
9+
import { initPage, validateApiMeResult } from "../../utils/playwrightOperation";
1310
import { LocalDebugTestContext } from "./localdebugContext";
1411
import { Timeout, LocalDebugTaskLabel, Lang } from "../../utils/constants";
1512
import { Env } from "../../utils/env";
@@ -53,11 +50,12 @@ describe("Local Debug Tests", function () {
5350
"Worker process started and initialized"
5451
);
5552
const teamsAppId = await localDebugTestContext.getTeamsAppId();
56-
const page = await initNoAddappPage(
53+
const page = await initPage(
5754
localDebugTestContext.context!,
5855
teamsAppId,
5956
Env.username,
60-
Env.password
57+
Env.password,
58+
{ projectPath: projectPath, env: "local", noAddApp: true }
6159
);
6260
await validateApiMeResult(page, localDebugTestContext.appName);
6361
}

packages/tests/src/ui-test/localdebug/localdebug-msg-newapi-microsoftentra.test.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@
77
import * as path from "path";
88
import * as fs from "fs-extra";
99
import { startDebugging, waitForTerminal } from "../../utils/vscodeOperation";
10-
import {
11-
initNoAddappPage,
12-
validateApiMeResult,
13-
} from "../../utils/playwrightOperation";
10+
import { initPage, validateApiMeResult } from "../../utils/playwrightOperation";
1411
import { LocalDebugTestContext } from "./localdebugContext";
1512
import { Timeout, LocalDebugTaskLabel } from "../../utils/constants";
1613
import { Env } from "../../utils/env";
@@ -52,11 +49,12 @@ describe("Local Debug Tests", function () {
5249
"Worker process started and initialized"
5350
);
5451
const teamsAppId = await localDebugTestContext.getTeamsAppId();
55-
const page = await initNoAddappPage(
52+
const page = await initPage(
5653
localDebugTestContext.context!,
5754
teamsAppId,
5855
Env.username,
59-
Env.password
56+
Env.password,
57+
{ projectPath: projectPath, env: "local", noAddApp: true }
6058
);
6159
await validateApiMeResult(page, localDebugTestContext.appName);
6260
}

packages/tests/src/ui-test/localdebug/localdebug-msg-newapi-ts.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ describe("Local Debug Tests", function () {
5555
teamsAppId,
5656
Env.username,
5757
Env.password,
58-
{ projectPath: projectPath, env: "local" }
58+
{ projectPath: projectPath, env: "local", noAddApp: true }
5959
);
6060
await validateApiMeResult(page, localDebugTestContext.appName);
6161
}

packages/tests/src/ui-test/localdebug/localdebug-msg-newapi.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ describe("Local Debug Tests", function () {
5353
teamsAppId,
5454
Env.username,
5555
Env.password,
56-
{ projectPath: projectPath, env: "local" }
56+
{ projectPath: projectPath, env: "local", noAddApp: true }
5757
);
5858
await validateApiMeResult(page, localDebugTestContext.appName);
5959
}

packages/tests/src/ui-test/localdebug/localdebug-spfx-import-multiple.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,12 @@ describe("SPFx local debug", function () {
7171
teamsAppId,
7272
Env.username,
7373
Env.password,
74-
{ projectPath: projectPath, env: "local" }
74+
{
75+
projectPath: projectPath,
76+
env: "local",
77+
teamsAppName: localDebugTestContext.appName,
78+
searchApp: true,
79+
}
7580
);
7681
await validateTeamsWorkbench(page, "helloworld1");
7782
await switchToTab(page, "helloworld2");

packages/tests/src/ui-test/localdebug/localdebug-spfx.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,12 @@ describe("SPFx local debug", function () {
5656
teamsAppId,
5757
Env.username,
5858
Env.password,
59-
{ projectPath: projectPath, env: "local" }
59+
{
60+
projectPath: projectPath,
61+
env: "local",
62+
teamsAppName: localDebugTestContext.appName,
63+
searchApp: true,
64+
}
6065
);
6166
await validateTeamsWorkbench(page, localDebugTestContext.appName);
6267
}

0 commit comments

Comments
 (0)