Skip to content

Commit

Permalink
afterEach
Browse files Browse the repository at this point in the history
  • Loading branch information
midleman committed Nov 22, 2024
1 parent e0af4a6 commit e428fbc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions test/automation/src/positron/positronConnections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const CONNECTION_ITEM = '.connections-items-container';
*/
export class PositronConnections {

removeConnectionButton: PositronBaseElement;
deleteConnectionButton: Locator;
disconnectButton: Locator;
rConnectionOpenState: PositronBaseElement;
pythonConnectionOpenState: PositronBaseElement;
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) {
Expand All @@ -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();

});


Expand All @@ -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 }) {
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit e428fbc

Please sign in to comment.