import { expect, test } from '@playwright/test'; test.describe('Azure Setup Verification', () => { test('should have required environment variables set', async ({ page }) => { // Verify that the global setup has properly configured the environment const requiredEnvVars = [ 'DE_TEST_RESOURCE_GROUP', 'DE_TEST_SUBSCRIPTION_ID', 'DE_TEST_ACCOUNT_PREFIX' ]; for (const envVar of requiredEnvVars) { expect(process.env[envVar], `Environment variable ${envVar} should be set by global setup`).toBeDefined(); expect(process.env[envVar], `Environment variable ${envVar} should not be empty`).not.toBe(''); } console.log('✅ Environment Variables:'); console.log(` DE_TEST_RESOURCE_GROUP: ${process.env.DE_TEST_RESOURCE_GROUP}`); console.log(` DE_TEST_SUBSCRIPTION_ID: ${process.env.DE_TEST_SUBSCRIPTION_ID}`); console.log(` DE_TEST_ACCOUNT_PREFIX: ${process.env.DE_TEST_ACCOUNT_PREFIX}`); if (process.env.NOSQL_CONTAINERCOPY_TESTACCOUNT_TOKEN) { console.log(` NOSQL_CONTAINERCOPY_TESTACCOUNT_TOKEN: [SET]`); } else { console.log(` NOSQL_CONTAINERCOPY_TESTACCOUNT_TOKEN: [NOT SET]`); } }); /* test('should be able to navigate to the application', async ({ page }) => { // This assumes the web server is running on https://127.0.0.1:1234 // as configured in playwright.config.ts try { await page.goto('https://127.0.0.1:1234'); // Wait for the page to load await page.waitForTimeout(2000); // Check if the page loaded successfully const title = await page.title(); console.log(`Page title: ${title}`); // This is a basic check - you might want to check for specific elements // that indicate the Cosmos DB Explorer has loaded correctly expect(title).toBeTruthy(); } catch (error) { console.log('Note: Application server might not be running. Start it with: npm run start'); throw error; } }); */ });