Skip to content

Commit

Permalink
Select dropdown option with playwright api instead of manual click
Browse files Browse the repository at this point in the history
  • Loading branch information
languy committed Jul 8, 2024
1 parent a33dd19 commit c7ab4c7
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions test/sql/selfServeExample.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ test("Self Serve", async ({ page }) => {
const loggingToggle = explorer.frame.locator("#enableLogging-toggle-input");
await expect(loggingToggle).toBeEnabled();

const regionDropdown = explorer.frame.getByText("Select a region");
await regionDropdown.click();
const firstOption = explorer.frame.getByRole("option").first();
await firstOption.waitFor();
await firstOption.click();
explorer.frame.locator("#regions-dropdown-input").selectOption({ index: 0 });

const currentRegionLabel = explorer.frame.getByLabel("Current Region");
await currentRegionLabel.waitFor();
Expand Down

0 comments on commit c7ab4c7

Please sign in to comment.