Remove all of the test.skip() calls.

This commit is contained in:
Jade Welton
2026-07-10 14:14:19 -07:00
parent fec40b7dff
commit d3d6bbe572
22 changed files with 621 additions and 681 deletions
-1
View File
@@ -3,7 +3,6 @@ import { expect, test } from "@playwright/test";
import { DataExplorer, TEST_AUTOSCALE_THROUGHPUT_RU, TestAccount, generateUniqueName } from "../fx"; import { DataExplorer, TEST_AUTOSCALE_THROUGHPUT_RU, TestAccount, generateUniqueName } from "../fx";
test("Gremlin graph CRUD", async ({ page }) => { test("Gremlin graph CRUD", async ({ page }) => {
test.skip();
const databaseId = generateUniqueName("db"); const databaseId = generateUniqueName("db");
const graphId = "testgraph"; // A unique graph name isn't needed because the database is unique const graphId = "testgraph"; // A unique graph name isn't needed because the database is unique
-1
View File
@@ -9,7 +9,6 @@ import { DataExplorer, TEST_AUTOSCALE_THROUGHPUT_RU, TestAccount, generateUnique
] as [string, TestAccount][] ] as [string, TestAccount][]
).forEach(([apiVersionDescription, accountType]) => { ).forEach(([apiVersionDescription, accountType]) => {
test(`Mongo CRUD using ${apiVersionDescription}`, async ({ page }) => { test(`Mongo CRUD using ${apiVersionDescription}`, async ({ page }) => {
test.skip();
const databaseId = generateUniqueName("db"); const databaseId = generateUniqueName("db");
const collectionId = "testcollection"; // A unique collection name isn't needed because the database is unique const collectionId = "testcollection"; // A unique collection name isn't needed because the database is unique
-2
View File
@@ -35,7 +35,6 @@ for (const { name, databaseId, containerId, documents } of documentTestCases) {
const { documentId: docId, partitionKeys } = document; const { documentId: docId, partitionKeys } = document;
test.describe(`Document ID: ${docId}`, () => { test.describe(`Document ID: ${docId}`, () => {
test(`should load and view document ${docId}`, async () => { test(`should load and view document ${docId}`, async () => {
test.skip();
const span = documentsTab.documentsListPane.getByText(docId, { exact: true }).nth(0); const span = documentsTab.documentsListPane.getByText(docId, { exact: true }).nth(0);
await span.waitFor(); await span.waitFor();
await expect(span).toBeVisible(); await expect(span).toBeVisible();
@@ -50,7 +49,6 @@ for (const { name, databaseId, containerId, documents } of documentTestCases) {
expect(resultData?._id).toEqual(docId); expect(resultData?._id).toEqual(docId);
}); });
test(`should be able to create and delete new document from ${docId}`, async ({ page }) => { test(`should be able to create and delete new document from ${docId}`, async ({ page }) => {
test.skip();
const span = documentsTab.documentsListPane.getByText(docId, { exact: true }).nth(0); const span = documentsTab.documentsListPane.getByText(docId, { exact: true }).nth(0);
await span.waitFor(); await span.waitFor();
await expect(span).toBeVisible(); await expect(span).toBeVisible();
-1
View File
@@ -33,7 +33,6 @@ test.describe("Test Mongo Pagination", () => {
}); });
test("should execute a query and load more results", async ({ page }) => { test("should execute a query and load more results", async ({ page }) => {
test.skip();
const query = "{}"; const query = "{}";
await queryEditor.locator.click(); await queryEditor.locator.click();
+214 -215
View File
@@ -1,265 +1,264 @@
// /* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/no-explicit-any */
// import { expect, Frame, Locator, Page, test } from "@playwright/test"; import { expect, Frame, Locator, Page, test } from "@playwright/test";
// import { truncateName } from "../../../src/Explorer/ContainerCopy/CopyJobUtils"; import { truncateName } from "../../../src/Explorer/ContainerCopy/CopyJobUtils";
// import { import {
// ContainerCopy, ContainerCopy,
// getAccountName, getAccountName,
// getDropdownItemByNameOrPosition, getDropdownItemByNameOrPosition,
// interceptAndInspectApiRequest, interceptAndInspectApiRequest,
// TestAccount, TestAccount,
// waitForApiResponse, waitForApiResponse,
// } from "../../fx"; } from "../../fx";
// import { createMultipleTestContainers, TestContainerContext } from "../../testData"; import { createMultipleTestContainers, TestContainerContext } from "../../testData";
// test.describe("Container Copy - Offline Migration", () => { test.describe("Container Copy - Offline Migration", () => {
// let contexts: TestContainerContext[]; let contexts: TestContainerContext[];
// let page: Page; let page: Page;
// let wrapper: Locator; let wrapper: Locator;
// let panel: Locator; let panel: Locator;
// let frame: Frame; let frame: Frame;
// let expectedJobName: string; let expectedJobName: string;
// let sourceAccountName: string; let sourceAccountName: string;
// let expectedSubscriptionName: string; let expectedSubscriptionName: string;
// let expectedCopyJobNameInitial: string; let expectedCopyJobNameInitial: string;
// test.beforeEach("Setup for offline migration test", async ({ browser }) => { test.beforeEach("Setup for offline migration test", async ({ browser }) => {
// contexts = await createMultipleTestContainers({ accountType: TestAccount.SQLContainerCopyOnly, containerCount: 2 }); contexts = await createMultipleTestContainers({ accountType: TestAccount.SQLContainerCopyOnly, containerCount: 2 });
// page = await browser.newPage(); page = await browser.newPage();
// ({ wrapper, frame } = await ContainerCopy.open(page, TestAccount.SQLContainerCopyOnly)); ({ wrapper, frame } = await ContainerCopy.open(page, TestAccount.SQLContainerCopyOnly));
// expectedJobName = `offline_test_job_${Date.now()}`; expectedJobName = `offline_test_job_${Date.now()}`;
// sourceAccountName = getAccountName(TestAccount.SQLContainerCopyOnly); sourceAccountName = getAccountName(TestAccount.SQLContainerCopyOnly);
// }); });
// test.afterEach("Cleanup after offline migration test", async () => { test.afterEach("Cleanup after offline migration test", async () => {
// await page.unroute(/.*/, (route) => route.continue()); await page.unroute(/.*/, (route) => route.continue());
// await page.close(); await page.close();
// await Promise.all(contexts.map((context) => context?.dispose())); await Promise.all(contexts.map((context) => context?.dispose()));
// }); });
// test("Successfully create and manage offline migration copy job", async () => { test("Successfully create and manage offline migration copy job", async () => {
// test.skip(); expect(wrapper).not.toBeNull();
// expect(wrapper).not.toBeNull(); await wrapper.locator(".commandBarContainer").waitFor({ state: "visible" });
// await wrapper.locator(".commandBarContainer").waitFor({ state: "visible" });
// // Open Create Copy Job panel // Open Create Copy Job panel
// const createCopyJobButton = wrapper.getByTestId("CommandBar/Button:Create Copy Job"); const createCopyJobButton = wrapper.getByTestId("CommandBar/Button:Create Copy Job");
// await expect(createCopyJobButton).toBeVisible(); await expect(createCopyJobButton).toBeVisible();
// await createCopyJobButton.click(); await createCopyJobButton.click();
// panel = frame.getByTestId("Panel:Create copy job"); panel = frame.getByTestId("Panel:Create copy job");
// await expect(panel).toBeVisible(); await expect(panel).toBeVisible();
// // Reduced wait time for better performance // Reduced wait time for better performance
// await page.waitForTimeout(2000); await page.waitForTimeout(2000);
// // Setup subscription and account // Setup subscription and account
// const subscriptionDropdown = panel.getByTestId("subscription-dropdown"); const subscriptionDropdown = panel.getByTestId("subscription-dropdown");
// const expectedAccountName = sourceAccountName; const expectedAccountName = sourceAccountName;
// expectedSubscriptionName = await subscriptionDropdown.locator("span.ms-Dropdown-title").innerText(); expectedSubscriptionName = await subscriptionDropdown.locator("span.ms-Dropdown-title").innerText();
// await subscriptionDropdown.click(); await subscriptionDropdown.click();
// const subscriptionItem = await getDropdownItemByNameOrPosition( const subscriptionItem = await getDropdownItemByNameOrPosition(
// frame, frame,
// { name: expectedSubscriptionName }, { name: expectedSubscriptionName },
// { ariaLabel: "Subscription" }, { ariaLabel: "Subscription" },
// ); );
// await subscriptionItem.click(); await subscriptionItem.click();
// // Select account // Select account
// const accountDropdown = panel.getByTestId("account-dropdown"); const accountDropdown = panel.getByTestId("account-dropdown");
// await expect(accountDropdown).toHaveText(new RegExp(expectedAccountName)); await expect(accountDropdown).toHaveText(new RegExp(expectedAccountName));
// await accountDropdown.click(); await accountDropdown.click();
// const accountItem = await getDropdownItemByNameOrPosition( const accountItem = await getDropdownItemByNameOrPosition(
// frame, frame,
// { name: expectedAccountName }, { name: expectedAccountName },
// { ariaLabel: "Account" }, { ariaLabel: "Account" },
// ); );
// await accountItem.click(); await accountItem.click();
// // Test offline migration mode toggle functionality // Test offline migration mode toggle functionality
// const migrationTypeContainer = panel.getByTestId("migration-type"); const migrationTypeContainer = panel.getByTestId("migration-type");
// // First test online mode (should show permissions screen) // First test online mode (should show permissions screen)
// const onlineCopyRadioButton = migrationTypeContainer.getByRole("radio", { name: /Online mode/i }); const onlineCopyRadioButton = migrationTypeContainer.getByRole("radio", { name: /Online mode/i });
// await onlineCopyRadioButton.click({ force: true }); await onlineCopyRadioButton.click({ force: true });
// await expect(migrationTypeContainer.getByTestId("migration-type-description-online")).toBeVisible(); await expect(migrationTypeContainer.getByTestId("migration-type-description-online")).toBeVisible();
// await panel.getByRole("button", { name: "Next" }).click(); await panel.getByRole("button", { name: "Next" }).click();
// await expect(panel.getByTestId("Panel:AssignPermissionsContainer")).toBeVisible(); await expect(panel.getByTestId("Panel:AssignPermissionsContainer")).toBeVisible();
// await expect(panel.getByText("Online container copy", { exact: true })).toBeVisible(); await expect(panel.getByText("Online container copy", { exact: true })).toBeVisible();
// // Go back and switch to offline mode // Go back and switch to offline mode
// await panel.getByRole("button", { name: "Previous" }).click(); await panel.getByRole("button", { name: "Previous" }).click();
// const offlineCopyRadioButton = migrationTypeContainer.getByRole("radio", { name: /Offline mode/i }); const offlineCopyRadioButton = migrationTypeContainer.getByRole("radio", { name: /Offline mode/i });
// await offlineCopyRadioButton.click({ force: true }); await offlineCopyRadioButton.click({ force: true });
// await expect(migrationTypeContainer.getByTestId("migration-type-description-offline")).toBeVisible(); await expect(migrationTypeContainer.getByTestId("migration-type-description-offline")).toBeVisible();
// await panel.getByRole("button", { name: "Next" }).click(); await panel.getByRole("button", { name: "Next" }).click();
// // Verify we skip permissions screen in offline mode // Verify we skip permissions screen in offline mode
// await expect(panel.getByTestId("Panel:SelectSourceAndTargetContainers")).toBeVisible(); await expect(panel.getByTestId("Panel:SelectSourceAndTargetContainers")).toBeVisible();
// await expect(panel.getByTestId("Panel:AssignPermissionsContainer")).not.toBeVisible(); await expect(panel.getByTestId("Panel:AssignPermissionsContainer")).not.toBeVisible();
// // Test source and target container selection with validation // Test source and target container selection with validation
// const sourceContainerDropdown = panel.getByTestId("source-containerDropdown"); const sourceContainerDropdown = panel.getByTestId("source-containerDropdown");
// expect(sourceContainerDropdown).toBeVisible(); expect(sourceContainerDropdown).toBeVisible();
// await expect(sourceContainerDropdown).toHaveClass(/(^|\s)is-disabled(\s|$)/); await expect(sourceContainerDropdown).toHaveClass(/(^|\s)is-disabled(\s|$)/);
// // Select source database first (containers are disabled until database is selected) // Select source database first (containers are disabled until database is selected)
// const sourceDatabaseDropdown = panel.getByTestId("source-databaseDropdown"); const sourceDatabaseDropdown = panel.getByTestId("source-databaseDropdown");
// await sourceDatabaseDropdown.click(); await sourceDatabaseDropdown.click();
// const sourceDbDropdownItem = await getDropdownItemByNameOrPosition( const sourceDbDropdownItem = await getDropdownItemByNameOrPosition(
// frame, frame,
// { position: 0 }, { position: 0 },
// { ariaLabel: "Database" }, { ariaLabel: "Database" },
// ); );
// await sourceDbDropdownItem.click(); await sourceDbDropdownItem.click();
// // Now container dropdown should be enabled // Now container dropdown should be enabled
// await expect(sourceContainerDropdown).not.toHaveClass(/(^|\s)is-disabled(\s|$)/); await expect(sourceContainerDropdown).not.toHaveClass(/(^|\s)is-disabled(\s|$)/);
// await sourceContainerDropdown.click(); await sourceContainerDropdown.click();
// const sourceContainerDropdownItem = await getDropdownItemByNameOrPosition( const sourceContainerDropdownItem = await getDropdownItemByNameOrPosition(
// frame, frame,
// { position: 0 }, { position: 0 },
// { ariaLabel: "Container" }, { ariaLabel: "Container" },
// ); );
// await sourceContainerDropdownItem.click(); await sourceContainerDropdownItem.click();
// // Test target container selection // Test target container selection
// const targetContainerDropdown = panel.getByTestId("target-containerDropdown"); const targetContainerDropdown = panel.getByTestId("target-containerDropdown");
// expect(targetContainerDropdown).toBeVisible(); expect(targetContainerDropdown).toBeVisible();
// await expect(targetContainerDropdown).toHaveClass(/(^|\s)is-disabled(\s|$)/); await expect(targetContainerDropdown).toHaveClass(/(^|\s)is-disabled(\s|$)/);
// const targetDatabaseDropdown = panel.getByTestId("target-databaseDropdown"); const targetDatabaseDropdown = panel.getByTestId("target-databaseDropdown");
// await targetDatabaseDropdown.click(); await targetDatabaseDropdown.click();
// const targetDbDropdownItem = await getDropdownItemByNameOrPosition( const targetDbDropdownItem = await getDropdownItemByNameOrPosition(
// frame, frame,
// { position: 0 }, { position: 0 },
// { ariaLabel: "Database" }, { ariaLabel: "Database" },
// ); );
// await targetDbDropdownItem.click(); await targetDbDropdownItem.click();
// await expect(targetContainerDropdown).not.toHaveClass(/(^|\s)is-disabled(\s|$)/); await expect(targetContainerDropdown).not.toHaveClass(/(^|\s)is-disabled(\s|$)/);
// await targetContainerDropdown.click(); await targetContainerDropdown.click();
// // First try selecting the same container (should show error) // First try selecting the same container (should show error)
// const targetContainerDropdownItem1 = await getDropdownItemByNameOrPosition( const targetContainerDropdownItem1 = await getDropdownItemByNameOrPosition(
// frame, frame,
// { position: 0 }, { position: 0 },
// { ariaLabel: "Container" }, { ariaLabel: "Container" },
// ); );
// await targetContainerDropdownItem1.click(); await targetContainerDropdownItem1.click();
// await panel.getByRole("button", { name: "Next" }).click(); await panel.getByRole("button", { name: "Next" }).click();
// // Verify validation error for same source and target containers // Verify validation error for same source and target containers
// const errorContainer = panel.getByTestId("Panel:ErrorContainer"); const errorContainer = panel.getByTestId("Panel:ErrorContainer");
// await expect(errorContainer).toBeVisible(); await expect(errorContainer).toBeVisible();
// await expect(errorContainer).toHaveText(/Source and destination containers cannot be the same/i); await expect(errorContainer).toHaveText(/Source and destination containers cannot be the same/i);
// // Select different target container // Select different target container
// await targetContainerDropdown.click(); await targetContainerDropdown.click();
// const targetContainerDropdownItem2 = await getDropdownItemByNameOrPosition( const targetContainerDropdownItem2 = await getDropdownItemByNameOrPosition(
// frame, frame,
// { position: 1 }, { position: 1 },
// { ariaLabel: "Container" }, { ariaLabel: "Container" },
// ); );
// await targetContainerDropdownItem2.click(); await targetContainerDropdownItem2.click();
// // Generate expected job name based on selections // Generate expected job name based on selections
// const selectedSourceDatabase = await sourceDatabaseDropdown.innerText(); const selectedSourceDatabase = await sourceDatabaseDropdown.innerText();
// const selectedSourceContainer = await sourceContainerDropdown.innerText(); const selectedSourceContainer = await sourceContainerDropdown.innerText();
// const selectedTargetDatabase = await targetDatabaseDropdown.innerText(); const selectedTargetDatabase = await targetDatabaseDropdown.innerText();
// const selectedTargetContainer = await targetContainerDropdown.innerText(); const selectedTargetContainer = await targetContainerDropdown.innerText();
// expectedCopyJobNameInitial = `${truncateName(selectedSourceDatabase)}.${truncateName( expectedCopyJobNameInitial = `${truncateName(selectedSourceDatabase)}.${truncateName(
// selectedSourceContainer, selectedSourceContainer,
// )}_${truncateName(selectedTargetDatabase)}.${truncateName(selectedTargetContainer)}`; )}_${truncateName(selectedTargetDatabase)}.${truncateName(selectedTargetContainer)}`;
// await panel.getByRole("button", { name: "Next" }).click(); await panel.getByRole("button", { name: "Next" }).click();
// // Error should disappear and preview should be visible // Error should disappear and preview should be visible
// await expect(errorContainer).not.toBeVisible(); await expect(errorContainer).not.toBeVisible();
// await expect(panel.getByTestId("Panel:PreviewCopyJob")).toBeVisible(); await expect(panel.getByTestId("Panel:PreviewCopyJob")).toBeVisible();
// // Verify job preview details // Verify job preview details
// const previewContainer = panel.getByTestId("Panel:PreviewCopyJob"); const previewContainer = panel.getByTestId("Panel:PreviewCopyJob");
// await expect(previewContainer).toBeVisible(); await expect(previewContainer).toBeVisible();
// await expect(previewContainer.getByTestId("destination-subscription-name")).toHaveText(expectedSubscriptionName); await expect(previewContainer.getByTestId("destination-subscription-name")).toHaveText(expectedSubscriptionName);
// await expect(previewContainer.getByTestId("destination-account-name")).toHaveText(expectedAccountName); await expect(previewContainer.getByTestId("destination-account-name")).toHaveText(expectedAccountName);
// const jobNameInput = previewContainer.getByTestId("job-name-textfield"); const jobNameInput = previewContainer.getByTestId("job-name-textfield");
// await expect(jobNameInput).toHaveValue(new RegExp(expectedCopyJobNameInitial)); await expect(jobNameInput).toHaveValue(new RegExp(expectedCopyJobNameInitial));
// const primaryBtn = panel.getByRole("button", { name: "Copy", exact: true }); const primaryBtn = panel.getByRole("button", { name: "Copy", exact: true });
// await expect(primaryBtn).not.toHaveClass(/(^|\s)is-disabled(\s|$)/); await expect(primaryBtn).not.toHaveClass(/(^|\s)is-disabled(\s|$)/);
// // Test invalid job name validation (spaces not allowed) // Test invalid job name validation (spaces not allowed)
// await jobNameInput.fill("test job name"); await jobNameInput.fill("test job name");
// await expect(primaryBtn).toHaveClass(/(^|\s)is-disabled(\s|$)/); await expect(primaryBtn).toHaveClass(/(^|\s)is-disabled(\s|$)/);
// // Test duplicate job name error handling // Test duplicate job name error handling
// const duplicateJobName = "test-job-name-1"; const duplicateJobName = "test-job-name-1";
// await jobNameInput.fill(duplicateJobName); await jobNameInput.fill(duplicateJobName);
// const copyButton = panel.getByRole("button", { name: "Copy", exact: true }); const copyButton = panel.getByRole("button", { name: "Copy", exact: true });
// const expectedErrorMessage = `Duplicate job name '${duplicateJobName}'`; const expectedErrorMessage = `Duplicate job name '${duplicateJobName}'`;
// await interceptAndInspectApiRequest( await interceptAndInspectApiRequest(
// page, page,
// `${expectedAccountName}/dataTransferJobs/${duplicateJobName}`, `${expectedAccountName}/dataTransferJobs/${duplicateJobName}`,
// "PUT", "PUT",
// new Error(expectedErrorMessage), new Error(expectedErrorMessage),
// (url?: string) => url?.includes(duplicateJobName) ?? false, (url?: string) => url?.includes(duplicateJobName) ?? false,
// ); );
// let errorThrown = false; let errorThrown = false;
// try { try {
// await copyButton.click(); await copyButton.click();
// await page.waitForTimeout(2000); await page.waitForTimeout(2000);
// } catch (error: any) { } catch (error: any) {
// errorThrown = true; errorThrown = true;
// expect(error.message).toContain("not allowed"); expect(error.message).toContain("not allowed");
// } }
// if (!errorThrown) { if (!errorThrown) {
// const errorContainer = panel.getByTestId("Panel:ErrorContainer"); const errorContainer = panel.getByTestId("Panel:ErrorContainer");
// await expect(errorContainer).toBeVisible(); await expect(errorContainer).toBeVisible();
// await expect(errorContainer).toHaveText(new RegExp(expectedErrorMessage, "i")); await expect(errorContainer).toHaveText(new RegExp(expectedErrorMessage, "i"));
// } }
// await expect(panel).toBeVisible(); await expect(panel).toBeVisible();
// // Test successful job creation with valid job name // Test successful job creation with valid job name
// const validJobName = expectedJobName; const validJobName = expectedJobName;
// const copyJobCreationPromise = waitForApiResponse( const copyJobCreationPromise = waitForApiResponse(
// page, page,
// `${expectedAccountName}/dataTransferJobs/${validJobName}`, `${expectedAccountName}/dataTransferJobs/${validJobName}`,
// "PUT", "PUT",
// ); );
// await jobNameInput.fill(validJobName); await jobNameInput.fill(validJobName);
// await expect(copyButton).not.toHaveClass(/(^|\s)is-disabled(\s|$)/); await expect(copyButton).not.toHaveClass(/(^|\s)is-disabled(\s|$)/);
// await copyButton.click(); await copyButton.click();
// const response = await copyJobCreationPromise; const response = await copyJobCreationPromise;
// expect(response.ok()).toBe(true); expect(response.ok()).toBe(true);
// // Verify panel closes and job appears in the list // Verify panel closes and job appears in the list
// await expect(panel).not.toBeVisible(); await expect(panel).not.toBeVisible();
// const filterTextField = wrapper.getByTestId("CopyJobsList/FilterTextField"); const filterTextField = wrapper.getByTestId("CopyJobsList/FilterTextField");
// await filterTextField.waitFor({ state: "visible" }); await filterTextField.waitFor({ state: "visible" });
// await filterTextField.fill(validJobName); await filterTextField.fill(validJobName);
// const jobsListContainer = wrapper.locator(".CopyJobListContainer .ms-DetailsList-contentWrapper .ms-List-page"); const jobsListContainer = wrapper.locator(".CopyJobListContainer .ms-DetailsList-contentWrapper .ms-List-page");
// await jobsListContainer.waitFor({ state: "visible" }); await jobsListContainer.waitFor({ state: "visible" });
// const jobItem = jobsListContainer.getByText(validJobName); const jobItem = jobsListContainer.getByText(validJobName);
// await jobItem.waitFor({ state: "visible" }); await jobItem.waitFor({ state: "visible" });
// await expect(jobItem).toBeVisible(); await expect(jobItem).toBeVisible();
// }); });
// }); });
+154 -155
View File
@@ -1,192 +1,191 @@
// /* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/no-explicit-any */
// import { expect, Frame, Locator, Page, test } from "@playwright/test"; import { expect, Frame, Locator, Page, test } from "@playwright/test";
// import { import {
// ContainerCopy, ContainerCopy,
// getAccountName, getAccountName,
// getDropdownItemByNameOrPosition, getDropdownItemByNameOrPosition,
// TestAccount, TestAccount,
// waitForApiResponse, waitForApiResponse,
// } from "../../fx"; } from "../../fx";
// import { createMultipleTestContainers, TestContainerContext } from "../../testData"; import { createMultipleTestContainers, TestContainerContext } from "../../testData";
// test.describe("Container Copy - Online Migration", () => { test.describe("Container Copy - Online Migration", () => {
// let contexts: TestContainerContext[]; let contexts: TestContainerContext[];
// let page: Page; let page: Page;
// let wrapper: Locator; let wrapper: Locator;
// let panel: Locator; let panel: Locator;
// let frame: Frame; let frame: Frame;
// let sourceAccountName: string; let sourceAccountName: string;
// test.beforeEach("Setup for online migration test", async ({ browser }) => { test.beforeEach("Setup for online migration test", async ({ browser }) => {
// contexts = await createMultipleTestContainers({ accountType: TestAccount.SQLContainerCopyOnly, containerCount: 2 }); contexts = await createMultipleTestContainers({ accountType: TestAccount.SQLContainerCopyOnly, containerCount: 2 });
// page = await browser.newPage(); page = await browser.newPage();
// ({ wrapper, frame } = await ContainerCopy.open(page, TestAccount.SQLContainerCopyOnly)); ({ wrapper, frame } = await ContainerCopy.open(page, TestAccount.SQLContainerCopyOnly));
// sourceAccountName = getAccountName(TestAccount.SQLContainerCopyOnly); sourceAccountName = getAccountName(TestAccount.SQLContainerCopyOnly);
// }); });
// test.afterEach("Cleanup after online migration test", async () => { test.afterEach("Cleanup after online migration test", async () => {
// await page.unroute(/.*/, (route) => route.continue()); await page.unroute(/.*/, (route) => route.continue());
// await page.close(); await page.close();
// await Promise.all(contexts.map((context) => context?.dispose())); await Promise.all(contexts.map((context) => context?.dispose()));
// }); });
// test("Successfully create and manage online migration copy job", async () => { test("Successfully create and manage online migration copy job", async () => {
// test.skip(); expect(wrapper).not.toBeNull();
// expect(wrapper).not.toBeNull(); await wrapper.locator(".commandBarContainer").waitFor({ state: "visible" });
// await wrapper.locator(".commandBarContainer").waitFor({ state: "visible" });
// // Open Create Copy Job panel // Open Create Copy Job panel
// const createCopyJobButton = wrapper.getByTestId("CommandBar/Button:Create Copy Job"); const createCopyJobButton = wrapper.getByTestId("CommandBar/Button:Create Copy Job");
// await expect(createCopyJobButton).toBeVisible(); await expect(createCopyJobButton).toBeVisible();
// await createCopyJobButton.click(); await createCopyJobButton.click();
// panel = frame.getByTestId("Panel:Create copy job"); panel = frame.getByTestId("Panel:Create copy job");
// await expect(panel).toBeVisible(); await expect(panel).toBeVisible();
// // Reduced wait time for better performance // Reduced wait time for better performance
// await page.waitForTimeout(1000); await page.waitForTimeout(1000);
// // Enable online migration mode // Enable online migration mode
// const migrationTypeContainer = panel.getByTestId("migration-type"); const migrationTypeContainer = panel.getByTestId("migration-type");
// const onlineCopyRadioButton = migrationTypeContainer.getByRole("radio", { name: /Online mode/i }); const onlineCopyRadioButton = migrationTypeContainer.getByRole("radio", { name: /Online mode/i });
// await onlineCopyRadioButton.click({ force: true }); await onlineCopyRadioButton.click({ force: true });
// await expect(migrationTypeContainer.getByTestId("migration-type-description-online")).toBeVisible(); await expect(migrationTypeContainer.getByTestId("migration-type-description-online")).toBeVisible();
// await panel.getByRole("button", { name: "Next" }).click(); await panel.getByRole("button", { name: "Next" }).click();
// // Verify permissions screen is shown for online migration // Verify permissions screen is shown for online migration
// const permissionScreen = panel.getByTestId("Panel:AssignPermissionsContainer"); const permissionScreen = panel.getByTestId("Panel:AssignPermissionsContainer");
// await expect(permissionScreen).toBeVisible(); await expect(permissionScreen).toBeVisible();
// await expect(permissionScreen.getByText("Online container copy", { exact: true })).toBeVisible(); await expect(permissionScreen.getByText("Online container copy", { exact: true })).toBeVisible();
// // Skip permissions setup and proceed to container selection // Skip permissions setup and proceed to container selection
// await panel.getByRole("button", { name: "Next" }).click(); await panel.getByRole("button", { name: "Next" }).click();
// // Configure source and target containers for online migration // Configure source and target containers for online migration
// const sourceDatabaseDropdown = panel.getByTestId("source-databaseDropdown"); const sourceDatabaseDropdown = panel.getByTestId("source-databaseDropdown");
// await sourceDatabaseDropdown.click(); await sourceDatabaseDropdown.click();
// const sourceDbDropdownItem = await getDropdownItemByNameOrPosition( const sourceDbDropdownItem = await getDropdownItemByNameOrPosition(
// frame, frame,
// { position: 0 }, { position: 0 },
// { ariaLabel: "Database" }, { ariaLabel: "Database" },
// ); );
// await sourceDbDropdownItem.click(); await sourceDbDropdownItem.click();
// const sourceContainerDropdown = panel.getByTestId("source-containerDropdown"); const sourceContainerDropdown = panel.getByTestId("source-containerDropdown");
// await sourceContainerDropdown.click(); await sourceContainerDropdown.click();
// const sourceContainerDropdownItem = await getDropdownItemByNameOrPosition( const sourceContainerDropdownItem = await getDropdownItemByNameOrPosition(
// frame, frame,
// { position: 0 }, { position: 0 },
// { ariaLabel: "Container" }, { ariaLabel: "Container" },
// ); );
// await sourceContainerDropdownItem.click(); await sourceContainerDropdownItem.click();
// const targetDatabaseDropdown = panel.getByTestId("target-databaseDropdown"); const targetDatabaseDropdown = panel.getByTestId("target-databaseDropdown");
// await targetDatabaseDropdown.click(); await targetDatabaseDropdown.click();
// const targetDbDropdownItem = await getDropdownItemByNameOrPosition( const targetDbDropdownItem = await getDropdownItemByNameOrPosition(
// frame, frame,
// { position: 0 }, { position: 0 },
// { ariaLabel: "Database" }, { ariaLabel: "Database" },
// ); );
// await targetDbDropdownItem.click(); await targetDbDropdownItem.click();
// const targetContainerDropdown = panel.getByTestId("target-containerDropdown"); const targetContainerDropdown = panel.getByTestId("target-containerDropdown");
// await targetContainerDropdown.click(); await targetContainerDropdown.click();
// const targetContainerDropdownItem = await getDropdownItemByNameOrPosition( const targetContainerDropdownItem = await getDropdownItemByNameOrPosition(
// frame, frame,
// { position: 1 }, { position: 1 },
// { ariaLabel: "Container" }, { ariaLabel: "Container" },
// ); );
// await targetContainerDropdownItem.click(); await targetContainerDropdownItem.click();
// await panel.getByRole("button", { name: "Next" }).click(); await panel.getByRole("button", { name: "Next" }).click();
// // Verify job preview and create the online migration job // Verify job preview and create the online migration job
// const previewContainer = panel.getByTestId("Panel:PreviewCopyJob"); const previewContainer = panel.getByTestId("Panel:PreviewCopyJob");
// await expect(previewContainer.getByTestId("destination-account-name")).toHaveText(sourceAccountName); await expect(previewContainer.getByTestId("destination-account-name")).toHaveText(sourceAccountName);
// const jobNameInput = previewContainer.getByTestId("job-name-textfield"); const jobNameInput = previewContainer.getByTestId("job-name-textfield");
// const onlineMigrationJobName = await jobNameInput.inputValue(); const onlineMigrationJobName = await jobNameInput.inputValue();
// const copyButton = panel.getByRole("button", { name: "Copy", exact: true }); const copyButton = panel.getByRole("button", { name: "Copy", exact: true });
// const copyJobCreationPromise = waitForApiResponse( const copyJobCreationPromise = waitForApiResponse(
// page, page,
// `${sourceAccountName}/dataTransferJobs/${onlineMigrationJobName}`, `${sourceAccountName}/dataTransferJobs/${onlineMigrationJobName}`,
// "PUT", "PUT",
// ); );
// await copyButton.click(); await copyButton.click();
// await page.waitForTimeout(1000); // Reduced wait time await page.waitForTimeout(1000); // Reduced wait time
// const response = await copyJobCreationPromise; const response = await copyJobCreationPromise;
// expect(response.ok()).toBe(true); expect(response.ok()).toBe(true);
// // Verify panel closes and job appears in the list // Verify panel closes and job appears in the list
// await expect(panel).not.toBeVisible(); await expect(panel).not.toBeVisible();
// const filterTextField = wrapper.getByTestId("CopyJobsList/FilterTextField"); const filterTextField = wrapper.getByTestId("CopyJobsList/FilterTextField");
// await filterTextField.waitFor({ state: "visible" }); await filterTextField.waitFor({ state: "visible" });
// await filterTextField.fill(onlineMigrationJobName); await filterTextField.fill(onlineMigrationJobName);
// const jobsListContainer = wrapper.locator(".CopyJobListContainer .ms-DetailsList-contentWrapper .ms-List-page"); const jobsListContainer = wrapper.locator(".CopyJobListContainer .ms-DetailsList-contentWrapper .ms-List-page");
// await jobsListContainer.waitFor({ state: "visible" }); await jobsListContainer.waitFor({ state: "visible" });
// let jobRow, statusCell, actionMenuButton; let jobRow, statusCell, actionMenuButton;
// jobRow = jobsListContainer.locator(".ms-DetailsRow", { hasText: onlineMigrationJobName }); jobRow = jobsListContainer.locator(".ms-DetailsRow", { hasText: onlineMigrationJobName });
// statusCell = jobRow.locator("[data-automationid='DetailsRowCell'][data-automation-key='CopyJobStatus']"); statusCell = jobRow.locator("[data-automationid='DetailsRowCell'][data-automation-key='CopyJobStatus']");
// await jobRow.waitFor({ state: "visible" }); await jobRow.waitFor({ state: "visible" });
// // Verify job status changes to queued state // Verify job status changes to queued state
// await expect(statusCell).toContainText(/running|queued|pending/i); await expect(statusCell).toContainText(/running|queued|pending/i);
// // Test job lifecycle management through action menu // Test job lifecycle management through action menu
// actionMenuButton = wrapper.getByTestId(`CopyJobActionMenu/Button:${onlineMigrationJobName}`); actionMenuButton = wrapper.getByTestId(`CopyJobActionMenu/Button:${onlineMigrationJobName}`);
// await actionMenuButton.click(); await actionMenuButton.click();
// // Test pause functionality // Test pause functionality
// const pauseAction = frame.locator(".ms-ContextualMenu-list button:has-text('Pause')"); const pauseAction = frame.locator(".ms-ContextualMenu-list button:has-text('Pause')");
// await pauseAction.click(); await pauseAction.click();
// const pauseResponse = await waitForApiResponse( const pauseResponse = await waitForApiResponse(
// page, page,
// `${sourceAccountName}/dataTransferJobs/${onlineMigrationJobName}/pause`, `${sourceAccountName}/dataTransferJobs/${onlineMigrationJobName}/pause`,
// "POST", "POST",
// ); );
// expect(pauseResponse.ok()).toBe(true); expect(pauseResponse.ok()).toBe(true);
// // Verify job status changes to paused // Verify job status changes to paused
// jobRow = jobsListContainer.locator(".ms-DetailsRow", { hasText: onlineMigrationJobName }); jobRow = jobsListContainer.locator(".ms-DetailsRow", { hasText: onlineMigrationJobName });
// await jobRow.waitFor({ state: "visible", timeout: 5000 }); await jobRow.waitFor({ state: "visible", timeout: 5000 });
// statusCell = jobRow.locator("[data-automationid='DetailsRowCell'][data-automation-key='CopyJobStatus']"); statusCell = jobRow.locator("[data-automationid='DetailsRowCell'][data-automation-key='CopyJobStatus']");
// await expect(statusCell).toContainText(/paused/i, { timeout: 5000 }); await expect(statusCell).toContainText(/paused/i, { timeout: 5000 });
// await page.waitForTimeout(1000); await page.waitForTimeout(1000);
// // Test cancel job functionality // Test cancel job functionality
// actionMenuButton = wrapper.getByTestId(`CopyJobActionMenu/Button:${onlineMigrationJobName}`); actionMenuButton = wrapper.getByTestId(`CopyJobActionMenu/Button:${onlineMigrationJobName}`);
// await actionMenuButton.click(); await actionMenuButton.click();
// await frame.locator(".ms-ContextualMenu-list button:has-text('Cancel')").click(); await frame.locator(".ms-ContextualMenu-list button:has-text('Cancel')").click();
// // Verify cancellation confirmation dialog // Verify cancellation confirmation dialog
// await expect(frame.locator(".ms-Dialog-main")).toBeVisible({ timeout: 2000 }); await expect(frame.locator(".ms-Dialog-main")).toBeVisible({ timeout: 2000 });
// await expect(frame.locator(".ms-Dialog-main")).toContainText(onlineMigrationJobName); await expect(frame.locator(".ms-Dialog-main")).toContainText(onlineMigrationJobName);
// const cancelDialogButton = frame.locator(".ms-Dialog-main").getByTestId("DialogButton:Cancel"); const cancelDialogButton = frame.locator(".ms-Dialog-main").getByTestId("DialogButton:Cancel");
// await expect(cancelDialogButton).toBeVisible(); await expect(cancelDialogButton).toBeVisible();
// await cancelDialogButton.click(); await cancelDialogButton.click();
// await expect(frame.locator(".ms-Dialog-main")).not.toBeVisible(); await expect(frame.locator(".ms-Dialog-main")).not.toBeVisible();
// actionMenuButton = wrapper.getByTestId(`CopyJobActionMenu/Button:${onlineMigrationJobName}`); actionMenuButton = wrapper.getByTestId(`CopyJobActionMenu/Button:${onlineMigrationJobName}`);
// await actionMenuButton.click(); await actionMenuButton.click();
// await frame.locator(".ms-ContextualMenu-list button:has-text('Cancel')").click(); await frame.locator(".ms-ContextualMenu-list button:has-text('Cancel')").click();
// const confirmDialogButton = frame.locator(".ms-Dialog-main").getByTestId("DialogButton:Confirm"); const confirmDialogButton = frame.locator(".ms-Dialog-main").getByTestId("DialogButton:Confirm");
// await expect(confirmDialogButton).toBeVisible(); await expect(confirmDialogButton).toBeVisible();
// await confirmDialogButton.click(); await confirmDialogButton.click();
// // Verify final job status is cancelled // Verify final job status is cancelled
// jobRow = jobsListContainer.locator(".ms-DetailsRow", { hasText: onlineMigrationJobName }); jobRow = jobsListContainer.locator(".ms-DetailsRow", { hasText: onlineMigrationJobName });
// statusCell = jobRow.locator("[data-automationid='DetailsRowCell'][data-automation-key='CopyJobStatus']"); statusCell = jobRow.locator("[data-automationid='DetailsRowCell'][data-automation-key='CopyJobStatus']");
// await expect(statusCell).toContainText(/cancelled/i, { timeout: 5000 }); await expect(statusCell).toContainText(/cancelled/i, { timeout: 5000 });
// }); });
// }); });
+253 -254
View File
@@ -1,297 +1,296 @@
// /* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/no-explicit-any */
// import { expect, Frame, Locator, Page, test } from "@playwright/test"; import { expect, Frame, Locator, Page, test } from "@playwright/test";
// import { set } from "lodash"; import { set } from "lodash";
// import { ContainerCopy, getAccountName, TestAccount } from "../../fx"; import { ContainerCopy, getAccountName, TestAccount } from "../../fx";
// const VISIBLE_TIMEOUT_MS = 30 * 1000; const VISIBLE_TIMEOUT_MS = 30 * 1000;
// test.describe("Container Copy - Permission Screen Verification", () => { test.describe("Container Copy - Permission Screen Verification", () => {
// let page: Page; let page: Page;
// let wrapper: Locator; let wrapper: Locator;
// let panel: Locator; let panel: Locator;
// let frame: Frame; let frame: Frame;
// let sourceAccountName: string; let sourceAccountName: string;
// let targetAccountName: string; let targetAccountName: string;
// test.beforeEach("Setup for each test", async ({ browser }) => { test.beforeEach("Setup for each test", async ({ browser }) => {
// page = await browser.newPage(); page = await browser.newPage();
// ({ wrapper, frame } = await ContainerCopy.open(page, TestAccount.SQL)); ({ wrapper, frame } = await ContainerCopy.open(page, TestAccount.SQL));
// targetAccountName = getAccountName(TestAccount.SQLContainerCopyOnly); targetAccountName = getAccountName(TestAccount.SQLContainerCopyOnly);
// sourceAccountName = getAccountName(TestAccount.SQL); sourceAccountName = getAccountName(TestAccount.SQL);
// }); });
// test.afterEach("Cleanup after each test", async () => { test.afterEach("Cleanup after each test", async () => {
// await page.unrouteAll({ behavior: "ignoreErrors" }); await page.unrouteAll({ behavior: "ignoreErrors" });
// await page.close(); await page.close();
// }); });
// test("Verify online container copy permissions panel functionality", async () => { test("Verify online container copy permissions panel functionality", async () => {
// test.skip(); expect(wrapper).not.toBeNull();
// expect(wrapper).not.toBeNull();
// // Verify all command bar buttons are visible // Verify all command bar buttons are visible
// await wrapper.locator(".commandBarContainer").waitFor({ state: "visible", timeout: VISIBLE_TIMEOUT_MS }); await wrapper.locator(".commandBarContainer").waitFor({ state: "visible", timeout: VISIBLE_TIMEOUT_MS });
// const createCopyJobButton = wrapper.getByTestId("CommandBar/Button:Create Copy Job"); const createCopyJobButton = wrapper.getByTestId("CommandBar/Button:Create Copy Job");
// await expect(createCopyJobButton).toBeVisible(); await expect(createCopyJobButton).toBeVisible();
// await expect(wrapper.getByTestId("CommandBar/Button:Refresh")).toBeVisible(); await expect(wrapper.getByTestId("CommandBar/Button:Refresh")).toBeVisible();
// await expect(wrapper.getByTestId("CommandBar/Button:Feedback")).toBeVisible(); await expect(wrapper.getByTestId("CommandBar/Button:Feedback")).toBeVisible();
// // Mock Resource Graph API — fires on auto-subscription selection to populate account dropdown // Mock Resource Graph API — fires on auto-subscription selection to populate account dropdown
// await page.route( await page.route(
// "https://management.azure.com/providers/Microsoft.ResourceGraph/resources?api-version=2021-03-01", "https://management.azure.com/providers/Microsoft.ResourceGraph/resources?api-version=2021-03-01",
// async (route) => { async (route) => {
// const request = route.request(); const request = route.request();
// if ( if (
// request.method() === "POST" && request.method() === "POST" &&
// (request.postDataJSON()?.query as string) === (request.postDataJSON()?.query as string) ===
// "resources | where type =~ 'microsoft.documentdb/databaseaccounts'" "resources | where type =~ 'microsoft.documentdb/databaseaccounts'"
// ) { ) {
// const response = await route.fetch(); const response = await route.fetch();
// const responseData = await response.json(); const responseData = await response.json();
// if (responseData.data && Array.isArray(responseData.data)) { if (responseData.data && Array.isArray(responseData.data)) {
// responseData.data = responseData.data.map((d: any) => { responseData.data = responseData.data.map((d: any) => {
// d.properties.backupPolicy.type = "Periodic"; d.properties.backupPolicy.type = "Periodic";
// return d; return d;
// }); });
// } }
// await route.fulfill({ await route.fulfill({
// status: 200, status: 200,
// contentType: "application/json", contentType: "application/json",
// body: JSON.stringify(responseData), body: JSON.stringify(responseData),
// }); });
// } else { } else {
// await route.continue(); await route.continue();
// } }
// }, },
// { times: 2 }, { times: 2 },
// ); );
// // Open the Create Copy Job panel // Open the Create Copy Job panel
// await createCopyJobButton.click(); await createCopyJobButton.click();
// panel = frame.getByTestId("Panel:Create copy job"); panel = frame.getByTestId("Panel:Create copy job");
// await expect(panel).toBeVisible(); await expect(panel).toBeVisible();
// await expect(panel.getByRole("heading", { name: "Create copy job" })).toBeVisible(); await expect(panel.getByRole("heading", { name: "Create copy job" })).toBeVisible();
// // Select a different account for cross-account testing // Select a different account for cross-account testing
// const accountDropdown = panel.getByTestId("account-dropdown"); const accountDropdown = panel.getByTestId("account-dropdown");
// await accountDropdown.click(); await accountDropdown.click();
// const dropdownItemsWrapper = frame.locator("div.ms-Dropdown-items"); const dropdownItemsWrapper = frame.locator("div.ms-Dropdown-items");
// expect(await dropdownItemsWrapper.getAttribute("aria-label")).toEqual("Account"); expect(await dropdownItemsWrapper.getAttribute("aria-label")).toEqual("Account");
// const allDropdownItems = await dropdownItemsWrapper.locator(`button.ms-Dropdown-item[role='option']`).all(); const allDropdownItems = await dropdownItemsWrapper.locator(`button.ms-Dropdown-item[role='option']`).all();
// for (const item of allDropdownItems) { for (const item of allDropdownItems) {
// const testContent = (await item.textContent()) ?? ""; const testContent = (await item.textContent()) ?? "";
// if (testContent.trim() === targetAccountName.trim()) { if (testContent.trim() === targetAccountName.trim()) {
// await item.click(); await item.click();
// break; break;
// } }
// } }
// // Enable online migration mode // Enable online migration mode
// const migrationTypeContainer = panel.getByTestId("migration-type"); const migrationTypeContainer = panel.getByTestId("migration-type");
// const onlineCopyRadioButton = migrationTypeContainer.getByRole("radio", { name: /Online mode/i }); const onlineCopyRadioButton = migrationTypeContainer.getByRole("radio", { name: /Online mode/i });
// await onlineCopyRadioButton.click({ force: true }); await onlineCopyRadioButton.click({ force: true });
// await expect(migrationTypeContainer.getByTestId("migration-type-description-online")).toBeVisible(); await expect(migrationTypeContainer.getByTestId("migration-type-description-online")).toBeVisible();
// await panel.getByRole("button", { name: "Next" }).click(); await panel.getByRole("button", { name: "Next" }).click();
// // Verify Assign Permissions panel for online copy // Verify Assign Permissions panel for online copy
// const permissionScreen = panel.getByTestId("Panel:AssignPermissionsContainer"); const permissionScreen = panel.getByTestId("Panel:AssignPermissionsContainer");
// await expect(permissionScreen).toBeVisible(); await expect(permissionScreen).toBeVisible();
// await expect(permissionScreen.getByText("Online container copy", { exact: true })).toBeVisible(); await expect(permissionScreen.getByText("Online container copy", { exact: true })).toBeVisible();
// await expect(permissionScreen.getByText("Cross-account container copy", { exact: true })).toBeVisible(); await expect(permissionScreen.getByText("Cross-account container copy", { exact: true })).toBeVisible();
// // Setup API mocking for the source account // Setup API mocking for the source account
// await page.route(`**/Microsoft.DocumentDB/databaseAccounts/${sourceAccountName}**`, async (route) => { await page.route(`**/Microsoft.DocumentDB/databaseAccounts/${sourceAccountName}**`, async (route) => {
// const mockData = { const mockData = {
// identity: { identity: {
// type: "SystemAssigned", type: "SystemAssigned",
// principalId: "00-11-22-33", principalId: "00-11-22-33",
// }, },
// properties: { properties: {
// defaultIdentity: "SystemAssignedIdentity", defaultIdentity: "SystemAssignedIdentity",
// backupPolicy: { backupPolicy: {
// type: "Continuous", type: "Continuous",
// }, },
// capabilities: [{ name: "EnableOnlineContainerCopy" }], capabilities: [{ name: "EnableOnlineContainerCopy" }],
// }, },
// }; };
// if (route.request().method() === "GET") { if (route.request().method() === "GET") {
// const response = await route.fetch(); const response = await route.fetch();
// const actualData = await response.json(); const actualData = await response.json();
// const mergedData = { ...actualData }; const mergedData = { ...actualData };
// set(mergedData, "identity", mockData.identity); set(mergedData, "identity", mockData.identity);
// set(mergedData, "properties.defaultIdentity", mockData.properties.defaultIdentity); set(mergedData, "properties.defaultIdentity", mockData.properties.defaultIdentity);
// set(mergedData, "properties.backupPolicy", mockData.properties.backupPolicy); set(mergedData, "properties.backupPolicy", mockData.properties.backupPolicy);
// set(mergedData, "properties.capabilities", mockData.properties.capabilities); set(mergedData, "properties.capabilities", mockData.properties.capabilities);
// await route.fulfill({ await route.fulfill({
// status: 200, status: 200,
// contentType: "application/json", contentType: "application/json",
// body: JSON.stringify(mergedData), body: JSON.stringify(mergedData),
// }); });
// } else { } else {
// await route.continue(); await route.continue();
// } }
// }); });
// // Verify Point-in-Time Restore functionality // Verify Point-in-Time Restore functionality
// const expandedOnlineAccordionHeader = permissionScreen const expandedOnlineAccordionHeader = permissionScreen
// .getByTestId("permission-group-container-onlineConfigs") .getByTestId("permission-group-container-onlineConfigs")
// .locator("button[aria-expanded='true']"); .locator("button[aria-expanded='true']");
// await expect(expandedOnlineAccordionHeader).toBeVisible(); await expect(expandedOnlineAccordionHeader).toBeVisible();
// const accordionItem = expandedOnlineAccordionHeader const accordionItem = expandedOnlineAccordionHeader
// .locator("xpath=ancestor::*[contains(@class, 'fui-AccordionItem') or contains(@data-test, 'accordion-item')]") .locator("xpath=ancestor::*[contains(@class, 'fui-AccordionItem') or contains(@data-test, 'accordion-item')]")
// .first(); .first();
// const accordionPanel = accordionItem const accordionPanel = accordionItem
// .locator("[role='tabpanel'], .fui-AccordionPanel, [data-test*='panel']") .locator("[role='tabpanel'], .fui-AccordionPanel, [data-test*='panel']")
// .first(); .first();
// // Install clock mock and test PITR functionality // Install clock mock and test PITR functionality
// await page.clock.install({ time: new Date("2024-01-01T10:00:00Z") }); await page.clock.install({ time: new Date("2024-01-01T10:00:00Z") });
// const pitrBtn = accordionPanel.getByTestId("pointInTimeRestore:PrimaryBtn"); const pitrBtn = accordionPanel.getByTestId("pointInTimeRestore:PrimaryBtn");
// await expect(pitrBtn).toBeVisible(); await expect(pitrBtn).toBeVisible();
// await pitrBtn.click({ force: true }); await pitrBtn.click({ force: true });
// // Verify new page opens with correct URL pattern // Verify new page opens with correct URL pattern
// page.context().on("page", async (newPage) => { page.context().on("page", async (newPage) => {
// const expectedUrlEndPattern = new RegExp( const expectedUrlEndPattern = new RegExp(
// `/providers/Microsoft.(DocumentDB|DocumentDb)/databaseAccounts/${sourceAccountName}/backupRestore`, `/providers/Microsoft.(DocumentDB|DocumentDb)/databaseAccounts/${sourceAccountName}/backupRestore`,
// ); );
// expect(newPage.url()).toMatch(expectedUrlEndPattern); expect(newPage.url()).toMatch(expectedUrlEndPattern);
// await newPage.close(); await newPage.close();
// }); });
// const loadingOverlay = frame.locator("[data-test='loading-overlay']"); const loadingOverlay = frame.locator("[data-test='loading-overlay']");
// await expect(loadingOverlay).toBeVisible(); await expect(loadingOverlay).toBeVisible();
// const refreshBtn = accordionPanel.getByTestId("pointInTimeRestore:RefreshBtn"); const refreshBtn = accordionPanel.getByTestId("pointInTimeRestore:RefreshBtn");
// await expect(refreshBtn).not.toBeVisible(); await expect(refreshBtn).not.toBeVisible();
// // Fast forward time by 11 minutes // Fast forward time by 11 minutes
// await page.clock.fastForward(11 * 60 * 1000); await page.clock.fastForward(11 * 60 * 1000);
// await expect(refreshBtn).toBeVisible({ timeout: 5000 }); await expect(refreshBtn).toBeVisible({ timeout: 5000 });
// await expect(pitrBtn).not.toBeVisible(); await expect(pitrBtn).not.toBeVisible();
// // Setup additional API mocks for role assignments and permissions // Setup additional API mocks for role assignments and permissions
// // In the redesigned flow, role assignments are checked on the SOURCE account (current account = sourceAccountName). // In the redesigned flow, role assignments are checked on the SOURCE account (current account = sourceAccountName).
// // The destination account (selectedAccountName) manages identity; source account holds the role assignments. // The destination account (selectedAccountName) manages identity; source account holds the role assignments.
// await page.route( await page.route(
// `**/Microsoft.DocumentDB/databaseAccounts/${sourceAccountName}/sqlRoleAssignments*`, `**/Microsoft.DocumentDB/databaseAccounts/${sourceAccountName}/sqlRoleAssignments*`,
// async (route) => { async (route) => {
// await route.fulfill({ await route.fulfill({
// status: 200, status: 200,
// contentType: "application/json", contentType: "application/json",
// body: JSON.stringify({ body: JSON.stringify({
// value: [ value: [
// { {
// principalId: "00-11-22-33", principalId: "00-11-22-33",
// roleDefinitionId: `Microsoft.DocumentDB/databaseAccounts/${sourceAccountName}/77-88-99`, roleDefinitionId: `Microsoft.DocumentDB/databaseAccounts/${sourceAccountName}/77-88-99`,
// }, },
// ], ],
// }), }),
// }); });
// }, },
// ); );
// await page.route("**/Microsoft.DocumentDB/databaseAccounts/*/77-88-99**", async (route) => { await page.route("**/Microsoft.DocumentDB/databaseAccounts/*/77-88-99**", async (route) => {
// await route.fulfill({ await route.fulfill({
// status: 200, status: 200,
// contentType: "application/json", contentType: "application/json",
// body: JSON.stringify({ body: JSON.stringify({
// value: [ value: [
// { {
// // Built-in Cosmos DB Data Contributor role (read-write), required by checkTargetHasReadWriteRoleOnSource // Built-in Cosmos DB Data Contributor role (read-write), required by checkTargetHasReadWriteRoleOnSource
// name: "00000000-0000-0000-0000-000000000002", name: "00000000-0000-0000-0000-000000000002",
// }, },
// ], ],
// }), }),
// }); });
// }); });
// await page.route(`**/Microsoft.DocumentDB/databaseAccounts/${sourceAccountName}**`, async (route) => { await page.route(`**/Microsoft.DocumentDB/databaseAccounts/${sourceAccountName}**`, async (route) => {
// const mockData = { const mockData = {
// identity: { identity: {
// type: "SystemAssigned", type: "SystemAssigned",
// principalId: "00-11-22-33", principalId: "00-11-22-33",
// }, },
// properties: { properties: {
// defaultIdentity: "SystemAssignedIdentity", defaultIdentity: "SystemAssignedIdentity",
// backupPolicy: { backupPolicy: {
// type: "Continuous", type: "Continuous",
// }, },
// capabilities: [{ name: "EnableOnlineContainerCopy" }], capabilities: [{ name: "EnableOnlineContainerCopy" }],
// }, },
// }; };
// if (route.request().method() === "PATCH") { if (route.request().method() === "PATCH") {
// await route.fulfill({ await route.fulfill({
// status: 200, status: 200,
// contentType: "application/json", contentType: "application/json",
// body: JSON.stringify({ status: "Succeeded" }), body: JSON.stringify({ status: "Succeeded" }),
// }); });
// } else if (route.request().method() === "GET") { } else if (route.request().method() === "GET") {
// const response = await route.fetch(); const response = await route.fetch();
// const actualData = await response.json(); const actualData = await response.json();
// const mergedData = { ...actualData }; const mergedData = { ...actualData };
// set(mergedData, "identity", mockData.identity); set(mergedData, "identity", mockData.identity);
// set(mergedData, "properties.defaultIdentity", mockData.properties.defaultIdentity); set(mergedData, "properties.defaultIdentity", mockData.properties.defaultIdentity);
// set(mergedData, "properties.backupPolicy", mockData.properties.backupPolicy); set(mergedData, "properties.backupPolicy", mockData.properties.backupPolicy);
// set(mergedData, "properties.capabilities", mockData.properties.capabilities); set(mergedData, "properties.capabilities", mockData.properties.capabilities);
// await route.fulfill({ await route.fulfill({
// status: 200, status: 200,
// contentType: "application/json", contentType: "application/json",
// body: JSON.stringify(mergedData), body: JSON.stringify(mergedData),
// }); });
// } else { } else {
// await route.continue(); await route.continue();
// } }
// }); });
// // Verify cross-account permissions functionality // Verify cross-account permissions functionality
// const expandedCrossAccordionHeader = permissionScreen const expandedCrossAccordionHeader = permissionScreen
// .getByTestId("permission-group-container-crossAccountConfigs") .getByTestId("permission-group-container-crossAccountConfigs")
// .locator("button[aria-expanded='true']"); .locator("button[aria-expanded='true']");
// await expect(expandedCrossAccordionHeader).toBeVisible(); await expect(expandedCrossAccordionHeader).toBeVisible();
// const crossAccordionItem = expandedCrossAccordionHeader const crossAccordionItem = expandedCrossAccordionHeader
// .locator("xpath=ancestor::*[contains(@class, 'fui-AccordionItem') or contains(@data-test, 'accordion-item')]") .locator("xpath=ancestor::*[contains(@class, 'fui-AccordionItem') or contains(@data-test, 'accordion-item')]")
// .first(); .first();
// const crossAccordionPanel = crossAccordionItem const crossAccordionPanel = crossAccordionItem
// .locator("[role='tabpanel'], .fui-AccordionPanel, [data-test*='panel']") .locator("[role='tabpanel'], .fui-AccordionPanel, [data-test*='panel']")
// .first(); .first();
// const toggleButton = crossAccordionPanel.getByTestId("btn-toggle"); const toggleButton = crossAccordionPanel.getByTestId("btn-toggle");
// await expect(toggleButton).toBeVisible(); await expect(toggleButton).toBeVisible();
// await toggleButton.click({ force: true }); await toggleButton.click({ force: true });
// // Verify popover functionality // Verify popover functionality
// const popover = frame.locator("[data-test='popover-container']"); const popover = frame.locator("[data-test='popover-container']");
// await expect(popover).toBeVisible(); await expect(popover).toBeVisible();
// const yesButton = popover.getByRole("button", { name: /Yes/i }); const yesButton = popover.getByRole("button", { name: /Yes/i });
// const noButton = popover.getByRole("button", { name: /No/i }); const noButton = popover.getByRole("button", { name: /No/i });
// await expect(yesButton).toBeVisible(); await expect(yesButton).toBeVisible();
// await expect(noButton).toBeVisible(); await expect(noButton).toBeVisible();
// await yesButton.click({ force: true }); await yesButton.click({ force: true });
// // Verify loading states // Verify loading states
// await expect(loadingOverlay).toBeVisible(); await expect(loadingOverlay).toBeVisible();
// await expect(loadingOverlay).toBeHidden({ timeout: 10 * 1000 }); await expect(loadingOverlay).toBeHidden({ timeout: 10 * 1000 });
// await expect(popover).toBeHidden({ timeout: 10 * 1000 }); await expect(popover).toBeHidden({ timeout: 10 * 1000 });
// // Cancel the panel to clean up // Cancel the panel to clean up
// await panel.getByRole("button", { name: "Cancel" }).click({ force: true }); await panel.getByRole("button", { name: "Cancel" }).click({ force: true });
// }); });
// }); });
-4
View File
@@ -41,7 +41,6 @@ for (const { name, databaseId, containerId, documents } of documentTestCases) {
const { documentId: docId, partitionKeys, skipCreateDelete } = document; const { documentId: docId, partitionKeys, skipCreateDelete } = document;
test.describe(`Document ID: ${docId}`, () => { test.describe(`Document ID: ${docId}`, () => {
test(`should load and view document ${docId}`, async () => { test(`should load and view document ${docId}`, async () => {
test.skip();
const span = documentsTab.documentsListPane.getByText(docId, { exact: true }).nth(0); const span = documentsTab.documentsListPane.getByText(docId, { exact: true }).nth(0);
await span.waitFor(); await span.waitFor();
await expect(span).toBeVisible(); await expect(span).toBeVisible();
@@ -57,7 +56,6 @@ for (const { name, databaseId, containerId, documents } of documentTestCases) {
const testOrSkip = skipCreateDelete ? test.skip : test; const testOrSkip = skipCreateDelete ? test.skip : test;
testOrSkip(`should be able to create and delete new document from ${docId}`, async ({ page }) => { testOrSkip(`should be able to create and delete new document from ${docId}`, async ({ page }) => {
test.skip();
const span = documentsTab.documentsListPane.getByText(docId, { exact: true }).nth(0); const span = documentsTab.documentsListPane.getByText(docId, { exact: true }).nth(0);
await span.waitFor(); await span.waitFor();
await expect(span).toBeVisible(); await expect(span).toBeVisible();
@@ -149,7 +147,6 @@ test.describe.serial("Upload Item", () => {
}); });
test("upload document", async () => { test("upload document", async () => {
test.skip();
// Create file to upload // Create file to upload
const TestDataJsonString: string = JSON.stringify(TestData, null, 2); const TestDataJsonString: string = JSON.stringify(TestData, null, 2);
writeFileSync(uploadDocumentFilePath, TestDataJsonString); writeFileSync(uploadDocumentFilePath, TestDataJsonString);
@@ -186,7 +183,6 @@ test.describe.serial("Upload Item", () => {
}); });
test("upload invalid json", async () => { test("upload invalid json", async () => {
test.skip();
// Create file to upload // Create file to upload
let TestDataJsonString: string = JSON.stringify(TestData, null, 2); let TestDataJsonString: string = JSON.stringify(TestData, null, 2);
// Remove the first '[' so that it becomes invalid json // Remove the first '[' so that it becomes invalid json
-4
View File
@@ -19,7 +19,6 @@ test.beforeEach("Open Data Explorer", async ({ page }) => {
}); });
test("Duplicate Items tab opens a second Items tab", async () => { test("Duplicate Items tab opens a second Items tab", async () => {
test.skip();
// Open Items tab // Open Items tab
const containerNode = await explorer.waitForContainerNode(context.database.id, context.container.id); const containerNode = await explorer.waitForContainerNode(context.database.id, context.container.id);
await containerNode.expand(); await containerNode.expand();
@@ -47,7 +46,6 @@ test("Duplicate Items tab opens a second Items tab", async () => {
}); });
test("Duplicate Query tab preserves query text in new tab", async () => { test("Duplicate Query tab preserves query text in new tab", async () => {
test.skip();
// Open a new SQL query tab via container context menu // Open a new SQL query tab via container context menu
const containerNode = await explorer.waitForContainerNode(context.database.id, context.container.id); const containerNode = await explorer.waitForContainerNode(context.database.id, context.container.id);
await containerNode.openContextMenu(); await containerNode.openContextMenu();
@@ -80,7 +78,6 @@ test("Duplicate Query tab preserves query text in new tab", async () => {
}); });
test("Right-click context menu does not appear for the Home tab", async () => { test("Right-click context menu does not appear for the Home tab", async () => {
test.skip();
// The Home tab (ReactTabKind) is never duplicable — no context menu should appear // The Home tab (ReactTabKind) is never duplicable — no context menu should appear
await explorer.tabNavHeader("Home").click({ button: "right" }); await explorer.tabNavHeader("Home").click({ button: "right" });
@@ -90,7 +87,6 @@ test("Right-click context menu does not appear for the Home tab", async () => {
}); });
test("Close tab from right-click menu closes the tab", async () => { test("Close tab from right-click menu closes the tab", async () => {
test.skip();
// Open Items tab // Open Items tab
const containerNode = await explorer.waitForContainerNode(context.database.id, context.container.id); const containerNode = await explorer.waitForContainerNode(context.database.id, context.container.id);
await containerNode.expand(); await containerNode.expand();
-4
View File
@@ -56,13 +56,11 @@ async function setupIndexAdvisorTab(page: Page, customQuery?: string) {
} }
test("Index Advisor tab loads without errors", async ({ page }) => { test("Index Advisor tab loads without errors", async ({ page }) => {
test.skip();
const { indexAdvisorTab } = await setupIndexAdvisorTab(page); const { indexAdvisorTab } = await setupIndexAdvisorTab(page);
await expect(indexAdvisorTab).toHaveAttribute("aria-selected", "true"); await expect(indexAdvisorTab).toHaveAttribute("aria-selected", "true");
}); });
test("Verify UI sections are collapsible", async ({ page }) => { test("Verify UI sections are collapsible", async ({ page }) => {
test.skip();
const { explorer } = await setupIndexAdvisorTab(page); const { explorer } = await setupIndexAdvisorTab(page);
// Verify both section headers exist // Verify both section headers exist
@@ -86,7 +84,6 @@ test("Verify UI sections are collapsible", async ({ page }) => {
}); });
test("Verify SDK response structure - Case 1: Empty response", async ({ page }) => { test("Verify SDK response structure - Case 1: Empty response", async ({ page }) => {
test.skip();
const { explorer } = await setupIndexAdvisorTab(page); const { explorer } = await setupIndexAdvisorTab(page);
// Verify both section headers still exist even with no data // Verify both section headers still exist even with no data
@@ -104,7 +101,6 @@ test("Verify SDK response structure - Case 1: Empty response", async ({ page })
}); });
test("Verify index suggestions and apply potential index", async ({ page }) => { test("Verify index suggestions and apply potential index", async ({ page }) => {
test.skip();
const customQuery = 'SELECT * FROM c WHERE c.partitionKey = "partition_1" ORDER BY c.randomData'; const customQuery = 'SELECT * FROM c WHERE c.partitionKey = "partition_1" ORDER BY c.randomData';
const { explorer } = await setupIndexAdvisorTab(page, customQuery); const { explorer } = await setupIndexAdvisorTab(page, customQuery);
-3
View File
@@ -35,7 +35,6 @@ test.afterAll("Delete Test Database", async () => {
}); });
test("Query results", async () => { test("Query results", async () => {
test.skip();
// Run the query and verify the results // Run the query and verify the results
await queryEditor.locator.click(); await queryEditor.locator.click();
const executeQueryButton = explorer.commandBarButton(CommandBarButton.ExecuteQuery); const executeQueryButton = explorer.commandBarButton(CommandBarButton.ExecuteQuery);
@@ -58,7 +57,6 @@ test("Query results", async () => {
}); });
test("Query stats", async () => { test("Query stats", async () => {
test.skip();
// Run the query and verify the results // Run the query and verify the results
await queryEditor.locator.click(); await queryEditor.locator.click();
const executeQueryButton = explorer.commandBarButton(CommandBarButton.ExecuteQuery); const executeQueryButton = explorer.commandBarButton(CommandBarButton.ExecuteQuery);
@@ -115,7 +113,6 @@ test("View button toggles between vertical and horizontal layout", async () => {
}); });
test("View dropdown allows selecting vertical or horizontal layout", async () => { test("View dropdown allows selecting vertical or horizontal layout", async () => {
test.skip();
// The default layout is Horizontal (split-view-vertical) // The default layout is Horizontal (split-view-vertical)
const allotment = queryTab.locator.locator(".split-view-vertical, .split-view-horizontal"); const allotment = queryTab.locator.locator(".split-view-vertical, .split-view-horizontal");
await expect(allotment).toHaveClass(/split-view-vertical/); await expect(allotment).toHaveClass(/split-view-vertical/);
-1
View File
@@ -14,7 +14,6 @@ import {
import { getNoSqlRbacToken } from "../NoSqlTestSetup"; import { getNoSqlRbacToken } from "../NoSqlTestSetup";
test("SQL account using Resource token", async ({ page }) => { test("SQL account using Resource token", async ({ page }) => {
test.skip();
const nosqlAccountRbacToken = getNoSqlRbacToken() ?? ""; const nosqlAccountRbacToken = getNoSqlRbacToken() ?? "";
test.skip(nosqlAccountRbacToken.length > 0, "Resource tokens not supported when using data plane RBAC."); test.skip(nosqlAccountRbacToken.length > 0, "Resource tokens not supported when using data plane RBAC.");
@@ -28,7 +28,6 @@ test.describe("Change Partition Key", () => {
}); });
test("Change partition key path", async ({ page }) => { test("Change partition key path", async ({ page }) => {
test.skip();
await expect(explorer.frame.getByText("/partitionKey")).toBeVisible(); await expect(explorer.frame.getByText("/partitionKey")).toBeVisible();
await expect(explorer.frame.getByText("Change partition key")).toBeVisible(); await expect(explorer.frame.getByText("Change partition key")).toBeVisible();
await expect(explorer.frame.getByText(/To safeguard the integrity of/)).toBeVisible(); await expect(explorer.frame.getByText(/To safeguard the integrity of/)).toBeVisible();
@@ -29,7 +29,6 @@ test.describe("Computed Properties", () => {
}); });
test("Add valid computed property", async ({ page }) => { test("Add valid computed property", async ({ page }) => {
test.skip();
await clearComputedPropertiesTextBoxContent({ page }); await clearComputedPropertiesTextBoxContent({ page });
// Create computed property // Create computed property
@@ -55,7 +54,6 @@ test.describe("Computed Properties", () => {
}); });
test("Add computed property with invalid query", async ({ page }) => { test("Add computed property with invalid query", async ({ page }) => {
test.skip();
await clearComputedPropertiesTextBoxContent({ page }); await clearComputedPropertiesTextBoxContent({ page });
// Create computed property with no VALUE keyword in query // Create computed property with no VALUE keyword in query
@@ -81,7 +79,6 @@ test.describe("Computed Properties", () => {
}); });
test("Add computed property with invalid json", async ({ page }) => { test("Add computed property with invalid json", async ({ page }) => {
test.skip();
await clearComputedPropertiesTextBoxContent({ page }); await clearComputedPropertiesTextBoxContent({ page });
// Create computed property with no VALUE keyword in query // Create computed property with no VALUE keyword in query
@@ -73,7 +73,6 @@ test.describe("Vector Policy under Scale & Settings", () => {
}; };
test("Add new vector embedding policy", async () => { test("Add new vector embedding policy", async () => {
test.skip();
const existingCount = await getPolicyCount(); const existingCount = await getPolicyCount();
// Click Add vector embedding button // Click Add vector embedding button
@@ -103,7 +102,6 @@ test.describe("Vector Policy under Scale & Settings", () => {
}); });
test("Existing vector embedding policy fields are disabled", async () => { test("Existing vector embedding policy fields are disabled", async () => {
test.skip();
// Ensure there is at least one saved policy // Ensure there is at least one saved policy
await ensureExistingPolicy(); await ensureExistingPolicy();
@@ -117,7 +115,6 @@ test.describe("Vector Policy under Scale & Settings", () => {
}); });
test("New vector embedding policy fields are enabled while existing are disabled", async () => { test("New vector embedding policy fields are enabled while existing are disabled", async () => {
test.skip();
// Ensure there is at least one saved policy // Ensure there is at least one saved policy
const existingCount = await ensureExistingPolicy(); const existingCount = await ensureExistingPolicy();
@@ -141,7 +138,6 @@ test.describe("Vector Policy under Scale & Settings", () => {
}); });
test("Delete existing vector embedding policy", async () => { test("Delete existing vector embedding policy", async () => {
test.skip();
// Ensure there is at least one saved policy to delete // Ensure there is at least one saved policy to delete
const existingCount = await ensureExistingPolicy(); const existingCount = await ensureExistingPolicy();
@@ -175,7 +171,6 @@ test.describe("Vector Policy under Scale & Settings", () => {
}); });
test("Validation error for empty path", async () => { test("Validation error for empty path", async () => {
test.skip();
const existingCount = await getPolicyCount(); const existingCount = await getPolicyCount();
const addButton = explorer.frame.locator("#add-vector-policy"); const addButton = explorer.frame.locator("#add-vector-policy");
@@ -88,7 +88,6 @@ test.describe("Data Masking under Scale & Settings", () => {
}); });
test("Data Masking editor should contain default policy structure", async ({ page }) => { test("Data Masking editor should contain default policy structure", async ({ page }) => {
test.skip();
const explorer = await DataExplorer.open(page, TestAccount.SQL); const explorer = await DataExplorer.open(page, TestAccount.SQL);
const isTabAvailable = await navigateToDataMaskingTab(page, explorer); const isTabAvailable = await navigateToDataMaskingTab(page, explorer);
@@ -109,7 +108,6 @@ test.describe("Data Masking under Scale & Settings", () => {
}); });
test("Data Masking editor should have correct default policy values", async ({ page }) => { test("Data Masking editor should have correct default policy values", async ({ page }) => {
test.skip();
const explorer = await DataExplorer.open(page, TestAccount.SQL); const explorer = await DataExplorer.open(page, TestAccount.SQL);
const isTabAvailable = await navigateToDataMaskingTab(page, explorer); const isTabAvailable = await navigateToDataMaskingTab(page, explorer);
-5
View File
@@ -37,7 +37,6 @@ test.describe("Autoscale throughput", () => {
}); });
test("Update autoscale max throughput", async () => { test("Update autoscale max throughput", async () => {
test.skip();
await getThroughputInput(setup.explorer, "autopilot").fill(TEST_AUTOSCALE_MAX_THROUGHPUT_RU_2K.toString()); await getThroughputInput(setup.explorer, "autopilot").fill(TEST_AUTOSCALE_MAX_THROUGHPUT_RU_2K.toString());
await setup.explorer.commandBarButton(CommandBarButton.Save).click(); await setup.explorer.commandBarButton(CommandBarButton.Save).click();
@@ -48,7 +47,6 @@ test.describe("Autoscale throughput", () => {
}); });
test("Update autoscale max throughput passed allowed limit", async () => { test("Update autoscale max throughput passed allowed limit", async () => {
test.skip();
const softAllowedMaxThroughputString = await setup.explorer.frame const softAllowedMaxThroughputString = await setup.explorer.frame
.getByTestId("soft-allowed-maximum-throughput") .getByTestId("soft-allowed-maximum-throughput")
.innerText(); .innerText();
@@ -60,7 +58,6 @@ test.describe("Autoscale throughput", () => {
}); });
test("Update autoscale max throughput with invalid increment", async () => { test("Update autoscale max throughput with invalid increment", async () => {
test.skip();
await getThroughputInput(setup.explorer, "autopilot").fill("1100"); await getThroughputInput(setup.explorer, "autopilot").fill("1100");
await expect(setup.explorer.commandBarButton(CommandBarButton.Save)).toBeDisabled(); await expect(setup.explorer.commandBarButton(CommandBarButton.Save)).toBeDisabled();
await expect(getThroughputInputErrorMessage(setup.explorer, "autopilot")).toContainText( await expect(getThroughputInputErrorMessage(setup.explorer, "autopilot")).toContainText(
@@ -81,7 +78,6 @@ test.describe("Manual throughput", () => {
}); });
test("Update manual throughput", async () => { test("Update manual throughput", async () => {
test.skip();
await getThroughputInput(setup.explorer, "manual").fill(TEST_MANUAL_THROUGHPUT_RU_2K.toString()); await getThroughputInput(setup.explorer, "manual").fill(TEST_MANUAL_THROUGHPUT_RU_2K.toString());
await setup.explorer.commandBarButton(CommandBarButton.Save).click(); await setup.explorer.commandBarButton(CommandBarButton.Save).click();
await expect(setup.explorer.getConsoleHeaderStatus()).toContainText( await expect(setup.explorer.getConsoleHeaderStatus()).toContainText(
@@ -91,7 +87,6 @@ test.describe("Manual throughput", () => {
}); });
test("Update manual throughput passed allowed limit", async () => { test("Update manual throughput passed allowed limit", async () => {
test.skip();
const softAllowedMaxThroughputString = await setup.explorer.frame const softAllowedMaxThroughputString = await setup.explorer.frame
.getByTestId("soft-allowed-maximum-throughput") .getByTestId("soft-allowed-maximum-throughput")
.innerText(); .innerText();
@@ -22,7 +22,6 @@ test.describe("Settings under Scale & Settings", () => {
}); });
test("Update TTL to On (no default)", async () => { test("Update TTL to On (no default)", async () => {
test.skip();
const ttlOnNoDefaultRadioButton = explorer.frame.getByRole("radio", { name: "ttl-on-no-default-option" }); const ttlOnNoDefaultRadioButton = explorer.frame.getByRole("radio", { name: "ttl-on-no-default-option" });
await ttlOnNoDefaultRadioButton.click(); await ttlOnNoDefaultRadioButton.click();
@@ -36,7 +35,6 @@ test.describe("Settings under Scale & Settings", () => {
}); });
test("Update TTL to On (with user entry)", async () => { test("Update TTL to On (with user entry)", async () => {
test.skip();
const ttlOnRadioButton = explorer.frame.getByRole("radio", { name: "ttl-on-option" }); const ttlOnRadioButton = explorer.frame.getByRole("radio", { name: "ttl-on-option" });
await ttlOnRadioButton.click(); await ttlOnRadioButton.click();
@@ -54,7 +52,6 @@ test.describe("Settings under Scale & Settings", () => {
}); });
test("Set Geospatial Config to Geometry then Geography", async () => { test("Set Geospatial Config to Geometry then Geography", async () => {
test.skip();
const geometryRadioButton = explorer.frame.getByRole("radio", { name: "geometry-option" }); const geometryRadioButton = explorer.frame.getByRole("radio", { name: "geometry-option" });
await geometryRadioButton.click(); await geometryRadioButton.click();
@@ -17,7 +17,6 @@ test.describe("Shared Throughput Option Removed from Creation Dialogs", () => {
}); });
test("New Database panel should not show shared throughput checkbox", async () => { test("New Database panel should not show shared throughput checkbox", async () => {
test.skip();
// Open the "New Database" panel via the global command menu // Open the "New Database" panel via the global command menu
const newDatabaseButton = await explorer.globalCommandButton("New Database"); const newDatabaseButton = await explorer.globalCommandButton("New Database");
await newDatabaseButton.click(); await newDatabaseButton.click();
@@ -38,7 +37,6 @@ test.describe("Shared Throughput Option Removed from Creation Dialogs", () => {
}); });
test("New Container panel should not show shared throughput checkbox when creating new database", async () => { test("New Container panel should not show shared throughput checkbox when creating new database", async () => {
test.skip();
// Open the "New Container" panel // Open the "New Container" panel
const newContainerButton = await explorer.globalCommandButton("New Container"); const newContainerButton = await explorer.globalCommandButton("New Container");
await newContainerButton.click(); await newContainerButton.click();
@@ -63,7 +61,6 @@ test.describe("Shared Throughput Option Removed from Creation Dialogs", () => {
}); });
test("Dedicated throughput checkbox still appears for existing shared database", async () => { test("Dedicated throughput checkbox still appears for existing shared database", async () => {
test.skip();
// Create a database with shared throughput via SDK // Create a database with shared throughput via SDK
const dbContext = await createTestDB({ throughput: 400 }); const dbContext = await createTestDB({ throughput: 400 });
@@ -103,7 +100,6 @@ test.describe("Shared Throughput Option Removed from Creation Dialogs", () => {
}); });
test.describe("Database with Shared Throughput", () => { test.describe("Database with Shared Throughput", () => {
test.skip();
let dbContext: TestDatabaseContext = null!; let dbContext: TestDatabaseContext = null!;
let explorer: DataExplorer = null!; let explorer: DataExplorer = null!;
const containerId = "sharedcontainer"; const containerId = "sharedcontainer";
@@ -123,7 +119,6 @@ test.describe("Database with Shared Throughput", () => {
}); });
test("Create database with shared manual throughput and verify Scale node in UI", async () => { test("Create database with shared manual throughput and verify Scale node in UI", async () => {
test.skip();
test.setTimeout(120000); // 2 minutes timeout test.setTimeout(120000); // 2 minutes timeout
// Create database with shared manual throughput (400 RU/s) // Create database with shared manual throughput (400 RU/s)
dbContext = await createTestDB({ throughput: 400 }); dbContext = await createTestDB({ throughput: 400 });
@@ -142,7 +137,6 @@ test.describe("Database with Shared Throughput", () => {
}); });
test("Add container to shared database without dedicated throughput", async () => { test("Add container to shared database without dedicated throughput", async () => {
test.skip();
// Create database with shared manual throughput // Create database with shared manual throughput
dbContext = await createTestDB({ throughput: 400 }); dbContext = await createTestDB({ throughput: 400 });
@@ -196,7 +190,6 @@ test.describe("Database with Shared Throughput", () => {
}); });
test("Scale shared database manual throughput", async () => { test("Scale shared database manual throughput", async () => {
test.skip();
// Create database with shared manual throughput (400 RU/s) // Create database with shared manual throughput (400 RU/s)
dbContext = await createTestDB({ throughput: 400 }); dbContext = await createTestDB({ throughput: 400 });
@@ -222,7 +215,6 @@ test.describe("Database with Shared Throughput", () => {
}); });
test("Scale shared database from manual to autoscale", async () => { test("Scale shared database from manual to autoscale", async () => {
test.skip();
// Create database with shared manual throughput (400 RU/s) // Create database with shared manual throughput (400 RU/s)
dbContext = await createTestDB({ throughput: 400 }); dbContext = await createTestDB({ throughput: 400 });
@@ -257,7 +249,6 @@ test.describe("Database with Shared Throughput", () => {
}); });
test("Create database with shared autoscale throughput and verify Scale node in UI", async () => { test("Create database with shared autoscale throughput and verify Scale node in UI", async () => {
test.skip();
test.setTimeout(120000); // 2 minutes timeout test.setTimeout(120000); // 2 minutes timeout
// Create database with shared autoscale throughput (max 1000 RU/s) // Create database with shared autoscale throughput (max 1000 RU/s)
@@ -277,7 +268,6 @@ test.describe("Database with Shared Throughput", () => {
}); });
test("Scale shared database autoscale throughput", async () => { test("Scale shared database autoscale throughput", async () => {
test.skip();
// Create database with shared autoscale throughput (max 1000 RU/s) // Create database with shared autoscale throughput (max 1000 RU/s)
dbContext = await createTestDB({ maxThroughput: 1000 }); dbContext = await createTestDB({ maxThroughput: 1000 });
@@ -303,7 +293,6 @@ test.describe("Database with Shared Throughput", () => {
}); });
test("Scale shared database from autoscale to manual", async () => { test("Scale shared database from autoscale to manual", async () => {
test.skip();
// Create database with shared autoscale throughput (max 1000 RU/s) // Create database with shared autoscale throughput (max 1000 RU/s)
dbContext = await createTestDB({ maxThroughput: 1000 }); dbContext = await createTestDB({ maxThroughput: 1000 });
@@ -28,7 +28,6 @@ test.describe("Throughput bucket settings", () => {
} }
test("Activate throughput bucket #2", async () => { test("Activate throughput bucket #2", async () => {
test.skip();
// Activate bucket 2 // Activate bucket 2
const bucket2Toggle = explorer.frame.getByTestId("bucket-2-active-toggle"); const bucket2Toggle = explorer.frame.getByTestId("bucket-2-active-toggle");
await bucket2Toggle.click(); await bucket2Toggle.click();
@@ -43,7 +42,6 @@ test.describe("Throughput bucket settings", () => {
}); });
test("Activate throughput buckets #1 and #2", async () => { test("Activate throughput buckets #1 and #2", async () => {
test.skip();
// Activate bucket 1 // Activate bucket 1
const bucket1Toggle = explorer.frame.getByTestId("bucket-1-active-toggle"); const bucket1Toggle = explorer.frame.getByTestId("bucket-1-active-toggle");
await bucket1Toggle.click(); await bucket1Toggle.click();
@@ -61,7 +59,6 @@ test.describe("Throughput bucket settings", () => {
}); });
test("Set throughput percentage for bucket #1", async () => { test("Set throughput percentage for bucket #1", async () => {
test.skip();
// Set throughput percentage for bucket 1 (inactive) - Should be disabled // Set throughput percentage for bucket 1 (inactive) - Should be disabled
const bucket1PercentageInput = explorer.frame.getByTestId("bucket-1-percentage-input"); const bucket1PercentageInput = explorer.frame.getByTestId("bucket-1-percentage-input");
expect(bucket1PercentageInput).toBeDisabled(); expect(bucket1PercentageInput).toBeDisabled();
@@ -82,7 +79,6 @@ test.describe("Throughput bucket settings", () => {
}); });
test("Set default throughput bucket", async () => { test("Set default throughput bucket", async () => {
test.skip();
// There are no active throughput buckets so they all should be disabled // There are no active throughput buckets so they all should be disabled
const defaultThroughputBucketDropdown = explorer.frame.getByTestId("default-throughput-bucket-dropdown"); const defaultThroughputBucketDropdown = explorer.frame.getByTestId("default-throughput-bucket-dropdown");
await defaultThroughputBucketDropdown.click(); await defaultThroughputBucketDropdown.click();
-1
View File
@@ -2,7 +2,6 @@ import { expect, test } from "@playwright/test";
import { DataExplorer, TestAccount } from "../fx"; import { DataExplorer, TestAccount } from "../fx";
test("Self Serve", async ({ page, browserName }) => { test("Self Serve", async ({ page, browserName }) => {
test.skip();
/* Skipping this test which fails on webkit only. Clicking on the dropdown does not open the dropdown. /* Skipping this test which fails on webkit only. Clicking on the dropdown does not open the dropdown.
It fails with the error below which seems to indicate that some <div> (with class "ms-Stack css-128", the label of the dropdown?) is intercepting the click. It fails with the error below which seems to indicate that some <div> (with class "ms-Stack css-128", the label of the dropdown?) is intercepting the click.
- retrying click action, attempt #555 - retrying click action, attempt #555
-1
View File
@@ -3,7 +3,6 @@ import { expect, test } from "@playwright/test";
import { DataExplorer, TEST_AUTOSCALE_THROUGHPUT_RU, TestAccount, generateUniqueName } from "../fx"; import { DataExplorer, TEST_AUTOSCALE_THROUGHPUT_RU, TestAccount, generateUniqueName } from "../fx";
test("Tables CRUD", async ({ page }) => { test("Tables CRUD", async ({ page }) => {
test.skip();
const tableId = generateUniqueName("table"); // A unique table name IS needed because the database is shared when using Table Storage. const tableId = generateUniqueName("table"); // A unique table name IS needed because the database is shared when using Table Storage.
const explorer = await DataExplorer.open(page, TestAccount.Tables); const explorer = await DataExplorer.open(page, TestAccount.Tables);