mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-18 08:21:37 +00:00
Update Playwright, improve E2E test reliability, add scripts to deploy test resources (#1857)
This commit is contained in:
committed by
GitHub
parent
736731474f
commit
417ef899f0
23
test/sql/selfServeExample.spec.ts
Normal file
23
test/sql/selfServeExample.spec.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { expect, test } from "@playwright/test";
|
||||
import { DataExplorer, TestAccount } from "../fx";
|
||||
|
||||
test("Self Serve", async ({ page }) => {
|
||||
const explorer = await DataExplorer.open(page, TestAccount.SQL, "selfServe.html");
|
||||
|
||||
const loggingToggle = explorer.frame.locator("#enableLogging-toggle-input");
|
||||
await expect(loggingToggle).toBeEnabled();
|
||||
|
||||
const regionDropdown = explorer.frame.getByText("Select a region");
|
||||
await regionDropdown.click();
|
||||
await explorer.frame.getByRole("option").first().click();
|
||||
|
||||
const currentRegionLabel = explorer.frame.getByLabel("Current Region");
|
||||
await currentRegionLabel.waitFor();
|
||||
await expect(currentRegionLabel).toHaveText(/current region selected is .*/);
|
||||
await expect(loggingToggle).toBeDisabled();
|
||||
|
||||
await explorer.frame.locator("#enableDbLevelThroughput-toggle-input").click();
|
||||
const slider = explorer.frame.getByLabel("Database Throughput");
|
||||
await slider.waitFor();
|
||||
await expect(slider).toBeAttached();
|
||||
});
|
||||
Reference in New Issue
Block a user