diff --git a/test/package-lock.json b/test/package-lock.json index 6ddbc81..aa1670e 100644 --- a/test/package-lock.json +++ b/test/package-lock.json @@ -9,10 +9,10 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "chromedriver": "^136.0.2", + "chromedriver": "^136.0.3", "expect.js": "^0.3.1", - "mocha": "^11.4.0", - "selenium-webdriver": "^4.32.0" + "mocha": "^11.5.0", + "selenium-webdriver": "^4.33.0" } }, "node_modules/@bazel/runfiles": { @@ -246,9 +246,9 @@ } }, "node_modules/chromedriver": { - "version": "136.0.2", - "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-136.0.2.tgz", - "integrity": "sha512-yJ52GN01edLYWYK/OspYBv3plzF08Ucdq4ukYigJGOX8dWr/tP5PXSZPWFPVarmbmcO57pNLP9Im8hsYljMEjw==", + "version": "136.0.3", + "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-136.0.3.tgz", + "integrity": "sha512-bE27WxCr8Fd12ZFvRWbkWgTvm9MF+le59U6MlxejO9bC9bPHp+IQfttsDMXThb05/M+/FOx8x2/0mQ50zG0kDg==", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { @@ -732,21 +732,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/glob/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -1000,15 +985,18 @@ } }, "node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, "engines": { - "node": ">=10" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/minipass": { @@ -1021,9 +1009,9 @@ } }, "node_modules/mocha": { - "version": "11.4.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-11.4.0.tgz", - "integrity": "sha512-O6oi5Y9G6uu8f9iqXR6iKNLWHLRex3PKbmHynfpmUnMJJGrdgXh8ZmS85Ei5KR2Gnl+/gQ9s+Ktv5CqKybNw4A==", + "version": "11.5.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-11.5.0.tgz", + "integrity": "sha512-VKDjhy6LMTKm0WgNEdlY77YVsD49LZnPSXJAaPNL9NRYQADxvORsyG1DIQY6v53BKTnlNbEE2MbVCDbnxr4K3w==", "license": "MIT", "dependencies": { "browser-stdout": "^1.3.1", @@ -1036,7 +1024,7 @@ "he": "^1.2.0", "js-yaml": "^4.1.0", "log-symbols": "^4.1.0", - "minimatch": "^5.1.6", + "minimatch": "^9.0.5", "ms": "^2.1.3", "picocolors": "^1.1.1", "serialize-javascript": "^6.0.2", @@ -1302,9 +1290,9 @@ "license": "MIT" }, "node_modules/selenium-webdriver": { - "version": "4.32.0", - "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.32.0.tgz", - "integrity": "sha512-dG48JJnB96Aea1iVaZOKGmd6yT6aemeI1heWI/i8DtfD3pDX7uIlwpDBoGauNhtXAaFaamP+U4hIab8zZkg3Ag==", + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.33.0.tgz", + "integrity": "sha512-5vRhk4iI0B9nYbEitfnCjPDXBfG6o9DNhj5DG2355eQo8idETknhj1tigqqlkHsGephSZwLZqEm/d+3e1stGUA==", "funding": [ { "type": "github", diff --git a/test/package.json b/test/package.json index 6948345..a486a79 100644 --- a/test/package.json +++ b/test/package.json @@ -9,9 +9,9 @@ "author": "", "license": "ISC", "dependencies": { - "chromedriver": "^136.0.2", + "chromedriver": "^136.0.3", "expect.js": "^0.3.1", - "mocha": "^11.4.0", - "selenium-webdriver": "^4.32.0" + "mocha": "^11.5.0", + "selenium-webdriver": "^4.33.0" } } diff --git a/test/test.js b/test/test.js index e2c08ce..d4c75bc 100644 --- a/test/test.js +++ b/test/test.js @@ -151,14 +151,11 @@ describe('Application life cycle test', function () { await waitForElement(By.xpath('//div[text()="Proceed with reset"]')); await browser.findElement(By.xpath('//div[text()="Proceed with reset"]')).click(); - await waitForElement(By.xpath('//button[@class="mx_Dialog_primary" and text()="Continue"]')); - await browser.findElement(By.xpath('//button[@class="mx_Dialog_primary" and text()="Continue"]')).click(); + await waitForElement(By.xpath('//button[@class="mx_Dialog_primary" and text()="Continue"] | //div[@class="mx_EncryptionCard_buttons"]/button[@data-kind="primary"]')); + await browser.findElement(By.xpath('//button[@class="mx_Dialog_primary" and text()="Continue"] | //div[@class="mx_EncryptionCard_buttons"]/button[@data-kind="primary"]')).click(); - await waitForElement(By.xpath('//div[text()="Copy"]')); - await browser.findElement(By.xpath('//div[text()="Copy"]')).click(); - - await waitForElement(By.xpath('//button[@class="mx_Dialog_primary" and text()="Continue"]')); - await browser.findElement(By.xpath('//button[@class="mx_Dialog_primary" and text()="Continue"]')).click(); + await waitForElement(By.xpath('//button[@class="mx_Dialog_primary" and text()="Continue"] | //div[@class="mx_EncryptionCard_buttons"]/button[@data-kind="primary"]')); + await browser.findElement(By.xpath('//button[@class="mx_Dialog_primary" and text()="Continue"] | //div[@class="mx_EncryptionCard_buttons"]/button[@data-kind="primary"]')).click(); await waitForElement(By.xpath('//button[text()="Done"] | //div[text()="Single Sign On"]')); if (await browser.findElements(By.xpath('//div[text()="Single Sign On"]')).then(found => !!found.length)) { @@ -184,9 +181,6 @@ describe('Application life cycle test', function () { await browser.findElement(By.xpath('//div[text()="Confirm"]')).click(); } - await waitForElement(By.xpath('//button[text()="Done"]')); - await browser.findElement(By.xpath('//button[text()="Done"]')).click(); - await waitForElement(By.xpath('//div[text()="Cancel"] | //h1[contains(., "Welcome")]')); if (await browser.findElements(By.xpath('//div[text()="Cancel"]')).then(found => !!found.length)) { await browser.findElement(By.xpath('//div[text()="Cancel"]')).click(); @@ -404,7 +398,6 @@ describe('Application life cycle test', function () { it('check room', checkRoom); it('can send message', sendMessage); - it('can get app info', getAppInfo); it('uninstall app', async function () { await browser.get('about:blank');