mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2024-11-27 16:07:01 +00:00
Select dropdown option with playwright api instead of manual click
This commit is contained in:
parent
a33dd19438
commit
c7ab4c7ecf
@ -7,11 +7,7 @@ test("Self Serve", async ({ page }) => {
|
|||||||
const loggingToggle = explorer.frame.locator("#enableLogging-toggle-input");
|
const loggingToggle = explorer.frame.locator("#enableLogging-toggle-input");
|
||||||
await expect(loggingToggle).toBeEnabled();
|
await expect(loggingToggle).toBeEnabled();
|
||||||
|
|
||||||
const regionDropdown = explorer.frame.getByText("Select a region");
|
explorer.frame.locator("#regions-dropdown-input").selectOption({ index: 0 });
|
||||||
await regionDropdown.click();
|
|
||||||
const firstOption = explorer.frame.getByRole("option").first();
|
|
||||||
await firstOption.waitFor();
|
|
||||||
await firstOption.click();
|
|
||||||
|
|
||||||
const currentRegionLabel = explorer.frame.getByLabel("Current Region");
|
const currentRegionLabel = explorer.frame.getByLabel("Current Region");
|
||||||
await currentRegionLabel.waitFor();
|
await currentRegionLabel.waitFor();
|
||||||
|
Loading…
Reference in New Issue
Block a user