Skip to content
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

test: update creating msg api app #13028

Merged
merged 3 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions .github/workflows/ui-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,14 @@ jobs:

- name: create pvt file (random platform/node)
if: ${{ github.event.schedule == '0 18 * * *' }} || ${{ github.event.inputs.test-case }} == ''
working-directory: ./packages/tests
working-directory: packages/tests
run: |
pnpm --filter=@microsoft/teamsfx-test install
npx ts-node ./scripts/createRandomPVT.ts

- name: setup matrix
id: setup-matrix
working-directory: ./packages/tests
working-directory: packages/tests
run: |
matrix=""
if [ ! -z "${{ github.event.inputs.test-case }}" ]; then
Expand Down Expand Up @@ -339,7 +339,7 @@ jobs:
uses: actions/download-artifact@v4
with:
name: ttk
path: ./packages/tests
path: packages/tests

- name: Install teamsfx cli
working-directory: packages/tests
Expand All @@ -352,39 +352,39 @@ jobs:
with:
repository: OfficeDev/TeamsFx-Samples
ref: ${{ needs.setup.outputs.sample-ref }}
path: ./packages/tests/resource
path: packages/tests/resource

- name: Download samples from another repo
if: contains(matrix.test-case, 'proactive-message') || contains(matrix.test-case, 'reddit-link')
uses: actions/checkout@v3
with:
repository: OfficeDev/Microsoft-Teams-Samples
ref: main
path: ./packages/tests/resource
path: packages/tests/resource

- name: Download samples chef bot
if: contains(matrix.test-case, 'chef-bot')
uses: actions/checkout@v3
with:
repository: microsoft/teams-ai
ref: main
path: ./packages/tests/resource
path: packages/tests/resource

- name: Download samples food catalog
if: contains(matrix.test-case, 'food-catalog')
uses: actions/checkout@v3
with:
repository: pnp/graph-connectors-samples
ref: main
path: ./packages/tests/resource
path: packages/tests/resource

- name: Download samples outlook signature
if: contains(matrix.test-case, 'outlook-signature')
uses: actions/checkout@v3
with:
repository: OfficeDev/Office-Add-in-samples
ref: main
path: ./packages/tests/resource
path: packages/tests/resource

- name: Get VSCode
working-directory: packages/tests
Expand Down Expand Up @@ -468,23 +468,23 @@ jobs:
if: ${{ github.event_name != 'schedule' || success() || (failure() && github.run_attempt >= 5) }}
with:
name: test-result-${{ matrix.test-case }}-${{ matrix.os }}
path: ./packages/tests/mochawesome-report/mochawesome.json
path: packages/tests/mochawesome-report/mochawesome.json

- name: Upload screenshots
uses: actions/upload-artifact@v4
if: failure()
with:
name: screenshots ${{ matrix.test-case }} ${{ matrix.os }}
path: ./packages/tests/.test-resources/screenshots/
path: packages/tests/.test-resources/screenshots/

- name: Upload source code
uses: actions/upload-artifact@v4
if: failure()
with:
name: source code ${{ matrix.test-case }} ${{ matrix.os }}
path: |
./packages/tests/**/teamsfxuitest*/*
!./packages/tests/**/node_modules/*
packages/tests/**/teamsfxuitest*/*
!packages/tests/**/node_modules/*

- name: Upload telemetry
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -530,7 +530,7 @@ jobs:
- name: Download TestPlan
uses: actions/download-artifact@v4
with:
path: ./packages/tests/mocha-results
path: packages/tests/mocha-results

- name: Sync to Azure DevOps Test Plan
working-directory: packages/tests
Expand Down
1 change: 1 addition & 0 deletions packages/tests/src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,7 @@ export class CreateProjectQuestion {
static readonly ImportExistingSpfxSolution = "Import Existing SPFx Solution";
static readonly BuildNotificationBot = "Build a Notification Bot";
static readonly BuildDeclarativeAgent = "Build a Declarative Agent";
static readonly StartWithNewApi = "Start with a New API";
}

export class ValidationContent {
Expand Down
6 changes: 3 additions & 3 deletions packages/tests/src/utils/vscodeOperation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ export async function createNewProject(
case "msgnewapi": {
await input.selectQuickPick(CreateProjectQuestion.MessageExtension);
await input.selectQuickPick("Custom Search Results");
await input.selectQuickPick("Start with a new API");
await input.selectQuickPick(CreateProjectQuestion.StartWithNewApi);
await input.selectQuickPick("None");
await driver.sleep(Timeout.input);
// Choose programming language
Expand All @@ -973,7 +973,7 @@ export async function createNewProject(
case "msgapikey": {
await input.selectQuickPick(CreateProjectQuestion.MessageExtension);
await input.selectQuickPick("Custom Search Results");
await input.selectQuickPick("Start with a new API");
await input.selectQuickPick(CreateProjectQuestion.StartWithNewApi);
await input.selectQuickPick("API Key");
// Choose programming language
await input.selectQuickPick(lang);
Expand All @@ -982,7 +982,7 @@ export async function createNewProject(
case "msgmicroentra": {
await input.selectQuickPick(CreateProjectQuestion.MessageExtension);
await input.selectQuickPick("Custom Search Results");
await input.selectQuickPick("Start with a new API");
await input.selectQuickPick(CreateProjectQuestion.StartWithNewApi);
await input.selectQuickPick("Microsoft Entra");
// Choose programming language
await input.selectQuickPick(lang);
Expand Down
Loading