create and delete a container for each individual test

This commit is contained in:
Asier Isayas
2025-12-31 12:23:38 -05:00
parent e2e9cece5f
commit 644226d800
2 changed files with 4 additions and 12 deletions

View File

@@ -13,11 +13,8 @@ test.describe("Autoscale and Manual throughput", () => {
let context: TestContainerContext = null!;
let explorer: DataExplorer = null!;
test.beforeAll("Create Test Database", async () => {
test.beforeEach("Create Test Database & Open container settings", async ({ page }) => {
context = await createTestSQLContainer();
});
test.beforeEach("Open container settings", async ({ page }) => {
explorer = await DataExplorer.open(page, TestAccount.SQL);
// Click Scale & Settings and open Scale tab
@@ -26,7 +23,7 @@ test.describe("Autoscale and Manual throughput", () => {
await scaleTab.click();
});
test.afterAll("Delete Test Database", async () => {
test.afterEach("Delete Test Database", async () => {
await context?.dispose();
});

View File

@@ -6,14 +6,9 @@ test.describe("Settings under Scale & Settings", () => {
let context: TestContainerContext = null!;
let explorer: DataExplorer = null!;
test.beforeAll("Create Test Database", async () => {
test.beforeEach("Create Test Database & Open container settings", async ({ page }) => {
context = await createTestSQLContainer();
});
test.beforeEach("Open Settings tab under Scale & Settings", async ({ page }) => {
explorer = await DataExplorer.open(page, TestAccount.SQL);
const containerNode = await explorer.waitForContainerNode(context.database.id, context.container.id);
await containerNode.expand();
// Click Scale & Settings and open Scale tab
await explorer.openScaleAndSettings(context);
@@ -21,7 +16,7 @@ test.describe("Settings under Scale & Settings", () => {
await settingsTab.click();
});
test.afterAll("Delete Test Database", async () => {
test.afterEach("Delete Test Database", async () => {
await context?.dispose();
});