<!-- This is an auto-generated description by cubic. --> ## Summary by cubic Scoped Azure e2e test env setup to prevent leaking variables across tests. Added testWithConfigSkipIfWindows and moved Azure env vars into a per-test preLaunchHook; the Azure test now skips on Windows. <!-- End of auto-generated description by cubic. -->
26 lines
838 B
TypeScript
26 lines
838 B
TypeScript
import { testWithConfigSkipIfWindows } from "./helpers/test_helper";
|
|
|
|
// Set environment variables before the test runs to enable Azure testing
|
|
|
|
const testAzure = testWithConfigSkipIfWindows({
|
|
preLaunchHook: async () => {
|
|
process.env.TEST_AZURE_BASE_URL = "http://localhost:3500/azure";
|
|
process.env.AZURE_API_KEY = "fake-azure-key-for-testing";
|
|
process.env.AZURE_RESOURCE_NAME = "fake-resource-for-testing";
|
|
},
|
|
});
|
|
|
|
testAzure("send message through Azure OpenAI", async ({ po }) => {
|
|
// Set up Azure without test provider
|
|
await po.setUpAzure();
|
|
|
|
// Select Azure model
|
|
await po.selectTestAzureModel();
|
|
|
|
// Send a test prompt that returns a normal conversational response
|
|
await po.sendPrompt("tc=basic");
|
|
|
|
// Verify we get a response (this means Azure integration is working)
|
|
await po.snapshotMessages();
|
|
});
|