Squashed commit of the following:

commit 8c67026760
Author: Bikram Choudhury <bchoudhury@microsoft.com>
Date:   Tue Dec 30 18:26:10 2025 +0530

    Refactor dropdown utilities and fix test helper functions

commit fda6b59bc1
Author: Bikram Choudhury <bchoudhury@microsoft.com>
Date:   Sun Dec 28 14:32:11 2025 +0530

    Make DataExplorerRoot as an optional check

commit 2ce91f1ef8
Author: Bikram Choudhury <bchoudhury@microsoft.com>
Date:   Sat Dec 13 18:16:53 2025 +0530

    Add test infrastructure and data-test attributes for Container Copy e2e testing
This commit is contained in:
Bikram Choudhury
2025-12-31 15:24:39 +05:30
parent e03eb61117
commit 0ea8dffbf3
33 changed files with 1051 additions and 40 deletions

View File

@@ -1,5 +1,5 @@
import { expect, Page, test } from "@playwright/test";
import { DataExplorer, TestAccount } from "../../fx";
import { DataExplorer, getDropdownItemByNameOrPosition, TestAccount } from "../../fx";
import { createTestSQLContainer, TestContainerContext } from "../../testData";
test.describe("Change Partition Key", () => {
@@ -81,7 +81,11 @@ test.describe("Change Partition Key", () => {
await changePkPanel.getByLabel("Use existing container").check();
await changePkPanel.getByText("Choose an existing container").click();
const containerDropdownItem = await explorer.getDropdownItemByName(newContainerId, "Existing Containers");
const containerDropdownItem = await getDropdownItemByNameOrPosition(
explorer.frame,
{ name: newContainerId },
{ ariaLabel: "Existing Containers" },
);
await containerDropdownItem.click();
await changePkPanel.getByTestId("Panel/OkButton").click();