diff --git a/package-lock.json b/package-lock.json index a31b6e4..8d66291 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,7 +24,7 @@ "@types/chai-string": "^1.4.5", "@types/download": "^8.0.5", "@types/mocha": "^10.0.8", - "@types/node": "20.x", + "@types/node": "22.x", "@types/sinon": "^17.0.3", "@types/vscode": "^1.84.0", "@vscode/test-cli": "^0.0.10", @@ -34,7 +34,7 @@ "chai-string": "^1.5.0", "concurrently": "^9.0.1", "copyfiles": "^2.4.1", - "mariadb": "^3.3.1", + "mariadb": "^3.3.2", "mkdirp": "^3.0.1", "rimraf": "^6.0.1", "run-func": "^3.0.0", @@ -1182,11 +1182,10 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "20.16.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.16.5.tgz", - "integrity": "sha512-VwYCweNo3ERajwy0IUlqqcyZ8/A7Zwa9ZP3MnENWcB11AejO+tLy3pu850goUW2FC/IJMdZUfKpX/yxL1gymCA==", + "version": "22.5.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.5.5.tgz", + "integrity": "sha512-Xjs4y5UPO/CLdzpgR6GirZJx36yScjh73+2NlLlkFRSoQN8B0DpfXPdZGnvVmLRLOsqDpOfTNv7D9trgGhmOIA==", "dev": true, - "license": "MIT", "dependencies": { "undici-types": "~6.19.2" } @@ -6689,17 +6688,17 @@ } }, "node_modules/mariadb": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/mariadb/-/mariadb-3.3.1.tgz", - "integrity": "sha512-L8bh4iuZU3J8H7Co7rQ6OY9FDLItAN1rGy8kPA7Dyxo8AiHADuuONoypKKp1pE09drs6e5LR7UW9luLZ/A4znA==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/mariadb/-/mariadb-3.3.2.tgz", + "integrity": "sha512-kZvRy00thfFxEksfbDWq+77nB2M520PIZ26LLuHbOvyeZ5XQ3OCY/YsDDu+ifYNHIcs+7UCmjm50GiPdogc24w==", "dev": true, "license": "LGPL-2.1-or-later", "dependencies": { "@types/geojson": "^7946.0.14", - "@types/node": "^20.11.17", + "@types/node": "^22.5.4", "denque": "^2.1.0", "iconv-lite": "^0.6.3", - "lru-cache": "^10.2.0" + "lru-cache": "^10.3.0" }, "engines": { "node": ">= 14" diff --git a/package.json b/package.json index 325d1bb..fe6a8ec 100644 --- a/package.json +++ b/package.json @@ -427,7 +427,7 @@ "@types/chai-string": "^1.4.5", "@types/download": "^8.0.5", "@types/mocha": "^10.0.8", - "@types/node": "20.x", + "@types/node": "22.x", "@types/sinon": "^17.0.3", "@types/vscode": "^1.84.0", "@vscode/test-cli": "^0.0.10", @@ -437,7 +437,7 @@ "chai-string": "^1.5.0", "concurrently": "^9.0.1", "copyfiles": "^2.4.1", - "mariadb": "^3.3.1", + "mariadb": "^3.3.2", "mkdirp": "^3.0.1", "rimraf": "^6.0.1", "run-func": "^3.0.0", @@ -450,4 +450,4 @@ "webpack-cli": "^5.1.4", "webpack-shell-plugin-next": "^2.3.2" } -} \ No newline at end of file +} diff --git a/src/test/e2e/webview/WebviewTestUtils.ts b/src/test/e2e/webview/WebviewTestUtils.ts index 6fc7803..a823380 100644 --- a/src/test/e2e/webview/WebviewTestUtils.ts +++ b/src/test/e2e/webview/WebviewTestUtils.ts @@ -184,8 +184,14 @@ export class WebviewTestUtils { await databaseName.sendKeys(config.databaseName, Key.TAB); const button = await webView.findWebElement(By.id(config.buttonToClick)); + assert.deepStrictEqual(await button.getAttribute("id"), config.buttonToClick, "button id"); - await button.click(); + try { + await button.click(); + } catch { + await webView.switchToFrame(1000); + await webView.getDriver().executeScript("arguments[0].click();", button); + } }); if (config.buttonToClick === "saveButton") { diff --git a/src/test/suite/DockerTestUtils.ts b/src/test/suite/DockerTestUtils.ts index 57de0dc..3d0ba69 100644 --- a/src/test/suite/DockerTestUtils.ts +++ b/src/test/suite/DockerTestUtils.ts @@ -117,13 +117,9 @@ export class DockerTestUtils { * Checks the status of the specified container and the availability of the database within it. * * @param containerName - The name of the container to check. - * @param dbExecutable - The executable for the database client. * @returns A Promise that resolves when the container status and database availability are checked. */ - static async checkContainerStatus( - containerName: string = "mariadb", - dbExecutable: string = "mysql-client" - ): Promise { + static async checkContainerStatus(containerName: string = "mariadb"): Promise { const fullContainerName = this.containerNamePrefix + containerName; // check if container is running @@ -134,7 +130,7 @@ export class DockerTestUtils { case "mariadb": // install mysql to the container await this.repeatCommand( - `${this.docker} exec ${fullContainerName} sh -c "apt-get update && apt-get install -y ${dbExecutable}"` + `${this.docker} exec ${fullContainerName} sh -c "apt-get update && apt-get install -y mysql-client"` ); // check if database is available @@ -147,10 +143,11 @@ export class DockerTestUtils { case "postgres": await this.repeatCommand(`${this.docker} exec ${fullContainerName} psql ${this.dbName} -c "SELECT 1;"`); - // - await this.executeCommand( + // create the needed schema + await this.repeatCommand( `${this.docker} exec ${fullContainerName} psql ${this.dbName} -c "CREATE SCHEMA ${this.dbName};"` ); + break; default: