Skip to content

Commit

Permalink
more nit
Browse files Browse the repository at this point in the history
  • Loading branch information
midleman committed Nov 22, 2024
1 parent d3e88ca commit bc96996
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions test/automation/src/positron/positronConnections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import { Code } from '../code';
import { QuickAccess } from '../quickaccess';

const CONNECTIONS_CONTAINER = '.connections-items-container';
const CONNECTION_ITEM = '.connections-list-item';
const CONNECTION_ICON = '.codicon-arrow-circle-right';

/*
* Reuseable Positron connections tab functionality for tests to leverage
Expand All @@ -19,12 +17,14 @@ export class PositronConnections {

deleteConnectionButton: Locator;
disconnectButton: Locator;
connectionIcon: Locator;
connectIcon: Locator;
connectionItems: Locator;

constructor(private code: Code, private quickaccess: QuickAccess) {
this.deleteConnectionButton = code.driver.page.getByLabel('Delete Connection');
this.disconnectButton = code.driver.page.getByLabel('Disconnect');
this.connectionIcon = code.driver.page.locator(CONNECTION_ICON);
this.connectIcon = code.driver.page.locator('.codicon-arrow-circle-right');
this.connectionItems = code.driver.page.locator('.connections-list-item');
}

async openConnectionsNodes(nodes: string[]) {
Expand All @@ -48,7 +48,7 @@ export class PositronConnections {
}

async viewConnection(name: string) {
await this.code.driver.page.locator(CONNECTION_ITEM).filter({ hasText: name }).locator(CONNECTION_ICON).click();
await this.connectionItems.filter({ hasText: name }).locator(this.connectIcon).click();
}

async openTree() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { UserSetting } from '../../../../../automation';
const connectionSetting: UserSetting = ['positron.connections.showConnectionPane', 'true'];

test.use({
suiteId: __filename,
suiteId: __filename
});

test.describe('SQLite DB Connection', { tag: ['@web', '@win', '@pr'] }, () => {
Expand All @@ -33,7 +33,7 @@ test.describe('SQLite DB Connection', { tag: ['@web', '@win', '@pr'] }, () => {

await test.step('Open connections pane', async () => {
await app.workbench.positronVariables.clickDatabaseIconForVariableRow('conn');
await app.workbench.positronConnections.connectionIcon.click();
await app.workbench.positronConnections.connectIcon.click();
});

await test.step('Verify connection nodes', async () => {
Expand Down

0 comments on commit bc96996

Please sign in to comment.