From e428fbce05db2973e5c1e2aa919c11a2c5690d9a Mon Sep 17 00:00:00 2001 From: Marie Idleman Date: Fri, 22 Nov 2024 07:28:33 -0600 Subject: [PATCH] afterEach --- test/automation/src/positron/positronConnections.ts | 4 ++-- .../src/areas/positron/connections/connections-db.test.ts | 8 +++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/test/automation/src/positron/positronConnections.ts b/test/automation/src/positron/positronConnections.ts index 0d91a0cb290..45d3cb12546 100644 --- a/test/automation/src/positron/positronConnections.ts +++ b/test/automation/src/positron/positronConnections.ts @@ -23,7 +23,7 @@ const CONNECTION_ITEM = '.connections-items-container'; */ export class PositronConnections { - removeConnectionButton: PositronBaseElement; + deleteConnectionButton: Locator; disconnectButton: Locator; rConnectionOpenState: PositronBaseElement; pythonConnectionOpenState: PositronBaseElement; @@ -32,7 +32,7 @@ export class PositronConnections { constructor(private code: Code, private quickaccess: QuickAccess) { - this.removeConnectionButton = new PositronBaseElement(REMOVE_CONNECTION_BUTTON, this.code); + this.deleteConnectionButton = code.driver.page.getByLabel('Delete Connection'); this.disconnectButton = code.driver.page.getByLabel('Disconnect'); this.rConnectionOpenState = new PositronBaseElement(R_CONNECTION_OPEN_STATE, this.code); this.pythonConnectionOpenState = new PositronBaseElement(PYTHON_CONNECTION_OPEN_STATE, this.code); diff --git a/test/smoke/src/areas/positron/connections/connections-db.test.ts b/test/smoke/src/areas/positron/connections/connections-db.test.ts index ff9b51d7591..a9a24ff856b 100644 --- a/test/smoke/src/areas/positron/connections/connections-db.test.ts +++ b/test/smoke/src/areas/positron/connections/connections-db.test.ts @@ -19,8 +19,8 @@ test.describe('SQLite DB Connection', { tag: ['@web', '@win', '@pr'] }, () => { }); test.afterEach(async function ({ app, page }) { - // await app.workbench.positronConnections.removeConnectionButton.click(); - await page.getByLabel('Delete Connection').click(); + await expect(page.getByLabel('Delete Connection')).toBeVisible(); + await app.workbench.positronConnections.deleteConnectionButton.click(); }); test('Python - SQLite DB Connection [C628636]', async function ({ app, page, logger, python }) { @@ -38,7 +38,7 @@ test.describe('SQLite DB Connection', { tag: ['@web', '@win', '@pr'] }, () => { // disconnect await app.workbench.positronConnections.disconnectButton.click(); await page.getByText('SQLite Connection').click(); - await expect(page.getByLabel('Delete Connection')).toBeVisible(); + }); @@ -61,7 +61,6 @@ test.describe('SQLite DB Connection', { tag: ['@web', '@win', '@pr'] }, () => { // await app.workbench.positronConnections.reconnectButton.waitforVisible(); await app.workbench.positronConnections.disconnectButton.click(); await page.getByText('SQLiteConnection').click(); - await expect(page.getByLabel('Delete Connection')).toBeVisible(); }); test('R - Connections are update after adding a database,[C663724]', async function ({ app, page, logger, r }) { @@ -102,7 +101,6 @@ test.describe('SQLite DB Connection', { tag: ['@web', '@win', '@pr'] }, () => { await app.workbench.positronConnections.disconnectButton.click(); await page.getByText('SQLiteConnection').click(); - await expect(page.getByLabel('Delete Connection')).toBeVisible(); // disconnect icon appearance requires hover // await app.workbench.positronConnections.rConnectionOpenState.hover(); // await app.workbench.positronConnections.disconnectButton.click();