Skip to content

Commit

Permalink
test: removed debug screenshots and added enabled check on button
Browse files Browse the repository at this point in the history
  • Loading branch information
rH4rtinger committed Sep 20, 2024
1 parent 5b64f35 commit bc99df8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 18 deletions.
6 changes: 2 additions & 4 deletions src/test/e2e/webview/WebviewTestUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,9 @@ export class WebviewTestUtils {
await databaseName.sendKeys(config.databaseName, Key.TAB);

const button = await webView.findWebElement(By.id(config.buttonToClick));
try {

if (await button.isEnabled()) {
await button.click();
} catch (error) {
await VSBrowser.instance.takeScreenshot(`${randomUUID()}-click-${config.buttonToClick}-${config.databaseType}`);
throw error;
}
});

Expand Down
19 changes: 5 additions & 14 deletions src/test/suite/DockerTestUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,22 +143,13 @@ export class DockerTestUtils {

// check if database is available
case "postgres":
try {
await this.repeatCommand(`${this.docker} exec ${fullContainerName} psql ${this.dbName} -c "SELECT 1;"`);
} catch (error) {
await VSBrowser.instance.takeScreenshot(`${randomUUID()}-status-check`);
throw error;
}
await this.repeatCommand(`${this.docker} exec ${fullContainerName} psql ${this.dbName} -c "SELECT 1;"`);

// create the needed schema
try {
await this.repeatCommand(
`${this.docker} exec ${fullContainerName} psql ${this.dbName} -c "CREATE SCHEMA ${this.dbName};"`
);
} catch (error) {
await VSBrowser.instance.takeScreenshot(`${randomUUID()}-create-schema`);
throw error;
}
await this.repeatCommand(
`${this.docker} exec ${fullContainerName} psql ${this.dbName} -c "CREATE SCHEMA ${this.dbName};"`
);

break;

default:
Expand Down

0 comments on commit bc99df8

Please sign in to comment.