diff --git a/src/test/e2e/webview/WebviewTestUtils.ts b/src/test/e2e/webview/WebviewTestUtils.ts index 53e8b46..4e836e8 100644 --- a/src/test/e2e/webview/WebviewTestUtils.ts +++ b/src/test/e2e/webview/WebviewTestUtils.ts @@ -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; } }); diff --git a/src/test/suite/DockerTestUtils.ts b/src/test/suite/DockerTestUtils.ts index ab1f12e..06ac2e8 100644 --- a/src/test/suite/DockerTestUtils.ts +++ b/src/test/suite/DockerTestUtils.ts @@ -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: