Skip to content

Commit

Permalink
test: update ai endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
hellyzh committed Jul 22, 2024
1 parent 66c1032 commit fe17416
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ui-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ jobs:

- name: Upload screenshots
uses: actions/upload-artifact@v3
if: failure()
if: always()
with:
name: screenshots ${{ matrix.test-case }} ${{ matrix.os }}
path: ./packages/tests/.test-resources/screenshots/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ describe("Local Debug Tests", function () {
editDotEnvFile(
envPath,
"AZURE_OPENAI_ENDPOINT",
azureOpenAiModelDeploymentName
azureOpenAiEndpoint
);
editDotEnvFile(
envPath,
"AZURE_OPENAI_MODEL_DEPLOYMENT_NAME",
azureOpenAiEndpoint
azureOpenAiModelDeploymentName
);

await createEnvironmentWithPython();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ describe("Local Debug Tests", function () {
editDotEnvFile(
envPath,
"AZURE_OPENAI_ENDPOINT",
azureOpenAiModelDeploymentName
azureOpenAiEndpoint
);
editDotEnvFile(
envPath,
"AZURE_OPENAI_MODEL_DEPLOYMENT_NAME",
azureOpenAiEndpoint
azureOpenAiModelDeploymentName
);

await startDebugging(DebugItemSelect.DebugInTeamsUsingChrome);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ describe("Local Debug Tests", function () {
editDotEnvFile(
envPath,
"AZURE_OPENAI_ENDPOINT",
azureOpenAiModelDeploymentName
azureOpenAiEndpoint
);
editDotEnvFile(
envPath,
"AZURE_OPENAI_MODEL_DEPLOYMENT_NAME",
azureOpenAiEndpoint
azureOpenAiModelDeploymentName
);

await startDebugging(DebugItemSelect.DebugInTeamsUsingChrome);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,20 +59,20 @@ describe("Local Debug Tests", function () {
const azureOpenAiModelDeploymentName =
OpenAiKey.azureOpenAiModelDeploymentName
? OpenAiKey.azureOpenAiModelDeploymentName
: "https://test.com";
: "fake";
const azureOpenAiEndpoint = OpenAiKey.azureOpenAiEndpoint
? OpenAiKey.azureOpenAiEndpoint
: "fake";
: "https://test.com";
editDotEnvFile(envPath, "SECRET_AZURE_OPENAI_API_KEY", azureOpenAiKey);
editDotEnvFile(
envPath,
"AZURE_OPENAI_ENDPOINT",
azureOpenAiModelDeploymentName
azureOpenAiEndpoint
);
editDotEnvFile(
envPath,
"AZURE_OPENAI_DEPLOYMENT_NAME",
azureOpenAiEndpoint
azureOpenAiModelDeploymentName
);

await startDebugging(DebugItemSelect.DebugInTeamsUsingChrome);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,20 +66,20 @@ describe("Local Debug Tests", function () {
const azureOpenAiModelDeploymentName =
OpenAiKey.azureOpenAiModelDeploymentName
? OpenAiKey.azureOpenAiModelDeploymentName
: "https://test.com";
: "fake";
const azureOpenAiEndpoint = OpenAiKey.azureOpenAiEndpoint
? OpenAiKey.azureOpenAiEndpoint
: "fake";
: "https://test.com";
editDotEnvFile(envPath, "SECRET_AZURE_OPENAI_API_KEY", azureOpenAiKey);
editDotEnvFile(
envPath,
"AZURE_OPENAI_ENDPOINT",
azureOpenAiModelDeploymentName
azureOpenAiEndpoint
);
editDotEnvFile(
envPath,
"AZURE_OPENAI_MODEL_DEPLOYMENT_NAME",
azureOpenAiEndpoint
azureOpenAiModelDeploymentName
);

await createEnvironmentWithPython();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,20 +60,20 @@ describe("Local Debug Tests", function () {
const azureOpenAiModelDeploymentName =
OpenAiKey.azureOpenAiModelDeploymentName
? OpenAiKey.azureOpenAiModelDeploymentName
: "https://test.com";
: "fake";
const azureOpenAiEndpoint = OpenAiKey.azureOpenAiEndpoint
? OpenAiKey.azureOpenAiEndpoint
: "fake";
: "https://test.com";
editDotEnvFile(envPath, "SECRET_AZURE_OPENAI_API_KEY", azureOpenAiKey);
editDotEnvFile(
envPath,
"AZURE_OPENAI_ENDPOINT",
azureOpenAiModelDeploymentName
azureOpenAiEndpoint
);
editDotEnvFile(
envPath,
"AZURE_OPENAI_DEPLOYMENT_NAME",
azureOpenAiEndpoint
azureOpenAiModelDeploymentName
);

await startDebugging(DebugItemSelect.DebugInTeamsUsingChrome);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,20 +81,20 @@ describe("Remote debug Tests", function () {
const azureOpenAiModelDeploymentName =
OpenAiKey.azureOpenAiModelDeploymentName
? OpenAiKey.azureOpenAiModelDeploymentName
: "https://test.com";
: "fake";
const azureOpenAiEndpoint = OpenAiKey.azureOpenAiEndpoint
? OpenAiKey.azureOpenAiEndpoint
: "fake";
: "https://test.com";
editDotEnvFile(envPath, "SECRET_AZURE_OPENAI_API_KEY", azureOpenAiKey);
editDotEnvFile(
envPath,
"AZURE_OPENAI_ENDPOINT",
azureOpenAiModelDeploymentName
azureOpenAiEndpoint
);
editDotEnvFile(
envPath,
"AZURE_OPENAI_DEPLOYMENT_NAME",
azureOpenAiEndpoint
azureOpenAiModelDeploymentName
);
await provisionProject(appName, projectPath);
await deployProject(projectPath, Timeout.botDeploy);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,20 +83,20 @@ describe("Remote debug Tests", function () {
const azureOpenAiModelDeploymentName =
OpenAiKey.azureOpenAiModelDeploymentName
? OpenAiKey.azureOpenAiModelDeploymentName
: "https://test.com";
: "fake";
const azureOpenAiEndpoint = OpenAiKey.azureOpenAiEndpoint
? OpenAiKey.azureOpenAiEndpoint
: "fake";
: "https://test.com";
editDotEnvFile(envPath, "SECRET_AZURE_OPENAI_API_KEY", azureOpenAiKey);
editDotEnvFile(
envPath,
"AZURE_OPENAI_ENDPOINT",
azureOpenAiModelDeploymentName
azureOpenAiEndpoint
);
editDotEnvFile(
envPath,
"AZURE_OPENAI_MODEL_DEPLOYMENT_NAME",
azureOpenAiEndpoint
azureOpenAiModelDeploymentName
);
await provisionProject(appName, projectPath);
await deployProject(projectPath, Timeout.botDeploy);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,20 +82,20 @@ describe("Remote debug Tests", function () {
const azureOpenAiModelDeploymentName =
OpenAiKey.azureOpenAiModelDeploymentName
? OpenAiKey.azureOpenAiModelDeploymentName
: "https://test.com";
: "fake";
const azureOpenAiEndpoint = OpenAiKey.azureOpenAiEndpoint
? OpenAiKey.azureOpenAiEndpoint
: "fake";
: "https://test.com";
editDotEnvFile(envPath, "SECRET_AZURE_OPENAI_API_KEY", azureOpenAiKey);
editDotEnvFile(
envPath,
"AZURE_OPENAI_ENDPOINT",
azureOpenAiModelDeploymentName
azureOpenAiEndpoint
);
editDotEnvFile(
envPath,
"AZURE_OPENAI_DEPLOYMENT_NAME",
azureOpenAiEndpoint
azureOpenAiModelDeploymentName
);
await provisionProject(appName, projectPath);
await deployProject(projectPath, Timeout.botDeploy);
Expand Down
4 changes: 4 additions & 0 deletions packages/tests/src/utils/playwrightOperation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1294,6 +1294,10 @@ export async function validateWelcomeAndReplyBot(
await frame?.waitForSelector(
`p:has-text("${options?.expectedReplyMessage}")`
);
await page.screenshot({
path: getPlaywrightScreenshotPath("success"),
fullPage: true,
});
console.log(
`verify bot successfully with content ${options?.expectedReplyMessage}!!!`
);
Expand Down

0 comments on commit fe17416

Please sign in to comment.