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