Skip to content

Commit

Permalink
Merge remote-tracking branch 'teamsfx/dev' into user/haojiangliu/addT…
Browse files Browse the repository at this point in the history
…elemetry
  • Loading branch information
theRealHaojiangLiu committed Jun 26, 2024
2 parents 4d39e0c + 557dab3 commit d1d0637
Show file tree
Hide file tree
Showing 59 changed files with 2,168 additions and 1,977 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
run: |
links=`git grep -hEo "https://aka[a-zA-Z0-9./?=_%:-]*[a-zA-Z0-9]" | sort -nr | uniq`
white_list=""
white_list="https://aka.ms/teamsfx-plugin-api;"
while IFS= read -r link;
do
Expand Down
35 changes: 29 additions & 6 deletions .github/workflows/lint-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,16 +137,39 @@ jobs:
fi
check-sensitive-content:
if: ${{ github.event_name == 'pull_request' || (github.event_name == 'schedule' && (github.ref == 'refs/heads/dev'|| github.ref == 'refs/heads/main'))}}
if: ${{ github.event_name == 'pull_request' || github.event_name == 'schedule' }}
runs-on: ubuntu-latest
steps:
- shell: bash
if: ${{ github.event_name == 'pull_request'}}
run: |
if [ "${{ github.event_name }}" == "push" ]; then
echo "depth=$(($(jq length <<< '${{ toJson(github.event.commits) }}') + 1))" >> $GITHUB_ENV
echo "branch=${{ github.ref_name }}" >> $GITHUB_ENV
fi
if [ "${{ github.event_name }}" == "pull_request" ]; then
echo "depth=$((${{ github.event.pull_request.commits }} + 1))" >> $GITHUB_ENV
echo "branch=${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV
fi
- uses: actions/checkout@v4
if: ${{ github.event_name == 'pull_request'}}
with:
fetch-depth: 0
- uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE}}
ref: ${{env.branch}}
repository: ${{github.event.pull_request.head.repo.full_name}}
fetch-depth: ${{env.depth}}
- uses: trufflesecurity/trufflehog@main
if: ${{ github.event_name == 'pull_request'}}
with:
extra_args: --only-verified

- if: ${{ github.event_name == 'schedule' }}
uses: actions/checkout@v4
- if: ${{ github.event_name == 'schedule' }}
uses: trufflesecurity/trufflehog@main
with:
base: ""
head: ${{ github.ref_name }}
extra_args: --only-verified

attension-on-version:
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'main' && github.event.action != 'edited' }}
Expand Down
7 changes: 6 additions & 1 deletion packages/tests/src/e2e/frontend/BlazorAppHappyPath.tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,12 @@ describe("Blazor App", function () {
Capability.TabNonSso,
env
);
const programCsPath = path.join(testFolder, appName, "App.razor");
const programCsPath = path.join(
testFolder,
appName,
"Components",
"App.razor"
);
chai.assert.isTrue(await fs.pathExists(programCsPath));
}
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ import { SampledebugContext } from "./sampledebugContext";
class QueryOrgTestCase extends CaseFactory {
override async onValidate(
page: Page,
option?: { displayName: string; options?: { context: SampledebugContext } }
options?: { context: SampledebugContext }
): Promise<void> {
return await validateQueryOrg(page, {
displayName: Env.displayName,
appName: option?.options?.context.appName.substring(0, 10) || "",
appName: options?.context.appName.substring(0, 10) || "",
});
}
}
Expand Down
1 change: 1 addition & 0 deletions packages/tests/src/ui-test/samples/sampleCaseFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ export abstract class CaseFactory {
},
(error) => {
const errorMsg = error.toString();
console.log("[error log]", errorMsg);
if (
// skip warning messages
errorMsg.includes(LocalDebugError.WarningError)
Expand Down
11 changes: 8 additions & 3 deletions packages/tests/src/utils/playwrightOperation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,10 @@ export async function initTeamsPage(
await page?.waitForSelector(`h1:has-text('to a team')`);
try {
try {
const items = await page?.waitForSelector("li.ui-dropdown__item");
// select 2nd li item
const items = await page?.waitForSelector(
"li.ui-dropdown__item:nth-child(2)"
);
await items?.click();
console.log("selected a team.");
} catch (error) {
Expand All @@ -466,7 +469,6 @@ export async function initTeamsPage(
);
await searchBtn?.click();
await page.waitForTimeout(Timeout.shortTimeLoading);

const items = await page?.waitForSelector("li.ui-dropdown__item");
await items?.click();
console.log("[catch] selected a team.");
Expand Down Expand Up @@ -2688,7 +2690,10 @@ export async function validateTodoListSpfx(page: Page) {
console.log("start to verify todo list spfx");
try {
console.log("check result...");
const spfxFrame = await page.waitForSelector("div#app");
const frameElementHandle = await page.waitForSelector(
`iframe[name="embedded-page-container"]`
);
const spfxFrame = await frameElementHandle?.contentFrame();
// title
console.log("check title");
const title = await spfxFrame?.waitForSelector(
Expand Down
19 changes: 0 additions & 19 deletions packages/vscode-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,6 @@
"view": "teamsfx-project-and-check-upgradeV3",
"contents": "%teamstoolkit.viewsWelcome.teamsfx-project-and-check-upgradeV3.content%",
"enablement": "fx-extension.initialized"
},
{
"view": "teamsfx-feedback",
"contents": "%teamstoolkit.viewsWelcome.teamsfx-feedback.content%",
"enablement": "fx-extension.initialized"
}
],
"views": {
Expand Down Expand Up @@ -222,12 +217,6 @@
"when": "false",
"visibility": "collapsed"
},
{
"id": "teamsfx-feedback",
"name": "Feedback",
"when": "false",
"visibility": "visible"
},
{
"id": "teamsfx-empty-project",
"name": "Teams Toolkit",
Expand Down Expand Up @@ -592,10 +581,6 @@
"command": "fx-extension.checkProjectUpgrade",
"when": "fx-extension.canUpgradeV3"
},
{
"command": "fx-extension.openSurvey",
"when": "false"
},
{
"command": "fx-extension.openOfficeDevLifecycleLink",
"when": "false"
Expand Down Expand Up @@ -914,10 +899,6 @@
"title": "%teamstoolkit.commands.signOut.title%",
"icon": "$(sign-out)"
},
{
"command": "fx-extension.openSurvey",
"title": "%teamstoolkit.commandsTreeViewProvider.openSurveyTitle%"
},
{
"command": "fx-extension.addWebpart",
"title": "%teamstoolkit.commmands.addWebpart.title%",
Expand Down
4 changes: 0 additions & 4 deletions packages/vscode-extension/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@
"teamstoolkit.commandsTreeViewProvider.getStartedTitle": "Get Started",
"teamstoolkit.commandsTreeViewProvider.reportIssuesDescription": "Report any issues and let us know your feedback",
"teamstoolkit.commandsTreeViewProvider.reportIssuesTitle": "Report Issues on GitHub",
"teamstoolkit.commandsTreeViewProvider.openSurveyTitle": "We Would Love Your Feedback",
"teamstoolkit.commandsTreeViewProvider.samplesDescription": "Get started with a sample from our sample gallery",
"teamstoolkit.commandsTreeViewProvider.samplesTitle": "View Samples",
"teamstoolkit.commandsTreeViewProvider.teamsDevPortalDescription": "Manage your Teams app registration and access more tools",
Expand Down Expand Up @@ -409,7 +408,6 @@
"teamstoolkit.publishInDevPortal.confirmFile.placeholder": "Confirm zip file is correctly selected",
"teamstoolkit.upgrade.changelog": "Changelog",
"teamstoolkit.webview.samplePageTitle": "Samples",
"teamstoolkit.webview.surveyPageTitle": "Teams Toolkit Survey",
"teamstoolkit.webview.accountHelp": "Account Help",
"teamstoolkit.taskDefinitions.command.prerequisites.description": "Validate prerequisites.\n See https://aka.ms/teamsfx-tasks/check-prerequisites for details and how to customize the arguments.",
"teamstoolkit.taskDefinitions.command.startLocalTunnel.description": "Start the local tunneling service.\n See https://aka.ms/teamsfx-tasks/local-tunnel for details and how to customize the arguments.",
Expand Down Expand Up @@ -450,8 +448,6 @@
"teamstoolkit.viewsWelcome.teamsfx-empty-project-with-chat-with-api-copilot-plugin.content": "Jumpstart right into Teams Toolkit and [get an overview of the fundamentals](command:fx-extension.openWelcome?%5B%22SideBar%22%5D) or start [building an intelligent app for Microsoft 365](command:fx-extension.buildIntelligentAppsWalkthrough?%5B%22SideBar%22%5D) today.\nWalk through the steps to build a real-world Teams app.\n[Documentation](command:fx-extension.openDocument?%5B%22SideBar%22%5D)\n[How-to Guides](command:fx-extension.selectTutorials?%5B%22SideBar%22%5D)\nCreate a project or explore our samples.\n[Create a New App](command:fx-extension.create?%5B%22SideBar%22%5D)\n[View Samples](command:fx-extension.openSamples?%5B%22SideBar%22%5D)\nCreate your new app effortlessly with Github Copilot.\n[Create App with Github Copilot](command:fx-extension.invokeChat?%5B%22SideBar%22%5D)",
"teamstoolkit.viewsWelcome.teamsfx-empty-project-new-user-with-chat.content": "Jumpstart right into Teams Toolkit and [get an overview of the fundamentals](command:fx-extension.openWelcome?%5B%22SideBar%22%5D) today.\nCreate a project or explore our samples.\n[Create a New App](command:fx-extension.create?%5B%22SideBar%22%5D)\n[View Samples](command:fx-extension.openSamples?%5B%22SideBar%22%5D)\nWalk through the steps to build a real-world Teams app.\n[Documentation](command:fx-extension.openDocument?%5B%22SideBar%22%5D)\n[How-to Guides](command:fx-extension.selectTutorials?%5B%22SideBar%22%5D)\nCreate your new app effortlessly with Github Copilot.\n[Create App with Github Copilot](command:fx-extension.invokeChat?%5B%22SideBar%22%5D)",
"teamstoolkit.viewsWelcome.teamsfx-empty-project-new-user-with-chat-with-api-copilot-plugin.content": "Jumpstart right into Teams Toolkit and [get an overview of the fundamentals](command:fx-extension.openWelcome?%5B%22SideBar%22%5D) or start [building an intelligent app for Microsoft 365](command:fx-extension.buildIntelligentAppsWalkthrough?%5B%22SideBar%22%5D) today.\nCreate a project or explore our samples.\n[Create a New App](command:fx-extension.create?%5B%22SideBar%22%5D)\n[View Samples](command:fx-extension.openSamples?%5B%22SideBar%22%5D)\nWalk through the steps to build a real-world Teams app.\n[Documentation](command:fx-extension.openDocument?%5B%22SideBar%22%5D)\n[How-to Guides](command:fx-extension.selectTutorials?%5B%22SideBar%22%5D)\nCreate your new app effortlessly with Github Copilot.\n[Create App with Github Copilot](command:fx-extension.invokeChat?%5B%22SideBar%22%5D)",

"teamstoolkit.viewsWelcome.teamsfx-feedback.content": "Take 2 minutes to help us improve, your feedback matters!\n[We Would Love Your Feedback](command:fx-extension.openSurvey)",
"teamstoolkit.walkthroughs.description": "Jumpstart your Teams app development experience",
"teamstoolkit.walkthroughs.withChat.description": "Jumpstart your Teams app development experience or use @teams in Github Copilot Extension",
"_teamstoolkit.walkthroughs.withChat.description.comment": "@teams is a command which should not be translated.",
Expand Down
5 changes: 5 additions & 0 deletions packages/vscode-extension/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ export enum PrereleaseState {
Version = "teamsToolkit:prerelease:version",
}

export enum ResourceInfo {
Subscription = "Subscription",
ResourceGroup = "Resource Group",
}

export enum GlobalKey {
OpenWalkThrough = "fx-extension.openWalkThrough",
OpenReadMe = "fx-extension.openReadMe",
Expand Down
1 change: 0 additions & 1 deletion packages/vscode-extension/src/controls/PanelType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

export enum PanelType {
SampleGallery = "sample-gallery",
Survey = "survey",
RespondToCardActions = "respond-to-card-actions",
AccountHelp = "account-help",
FunctionBasedNotificationBotReadme = "function-based-notification-bot-readme",
Expand Down
116 changes: 0 additions & 116 deletions packages/vscode-extension/src/controls/Survey.scss

This file was deleted.

Loading

0 comments on commit d1d0637

Please sign in to comment.