tests updated
This commit is contained in:
16
test/test.js
16
test/test.js
@@ -111,8 +111,10 @@ describe('Application life cycle test', function () {
|
|||||||
await browser.findElement(By.xpath('//input[@label="Confirm password"]')).sendKeys(PASSWORD);
|
await browser.findElement(By.xpath('//input[@label="Confirm password"]')).sendKeys(PASSWORD);
|
||||||
await browser.findElement(By.xpath('//input[@value="Register"]')).click();
|
await browser.findElement(By.xpath('//input[@value="Register"]')).click();
|
||||||
|
|
||||||
await waitForElement(By.xpath('//h1[text()="You\'re in"]'));
|
await waitForElement(By.xpath('//h1[text()="You\'re in"] | //h1[contains(., "Welcome")]'));
|
||||||
await browser.findElement(By.xpath('//div[@role="button" and text()="Skip"]')).click();
|
if (await browser.findElements(By.xpath('//div[@role="button" and text()="Skip"]')).then(found => !!found.length)) {
|
||||||
|
await browser.findElement(By.xpath('//div[@role="button" and text()="Skip"]')).click();
|
||||||
|
}
|
||||||
|
|
||||||
await waitForElement(By.xpath(`//h1[contains(., "Welcome")]`));
|
await waitForElement(By.xpath(`//h1[contains(., "Welcome")]`));
|
||||||
}
|
}
|
||||||
@@ -144,22 +146,20 @@ describe('Application life cycle test', function () {
|
|||||||
await waitForElement(By.xpath('//div[text()="Proceed with reset" or text()="Reset all"]'));
|
await waitForElement(By.xpath('//div[text()="Proceed with reset" or text()="Reset all"]'));
|
||||||
|
|
||||||
if (await browser.findElements(By.xpath('//div[text()="Reset all"]')).then(found => !!found.length)) {
|
if (await browser.findElements(By.xpath('//div[text()="Reset all"]')).then(found => !!found.length)) {
|
||||||
|
|
||||||
await browser.findElement(By.xpath('//div[text()="Reset all"]')).click();
|
await browser.findElement(By.xpath('//div[text()="Reset all"]')).click();
|
||||||
}
|
}
|
||||||
|
|
||||||
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[text()="Continue"]'));
|
await waitForElement(By.xpath('//button[@class="mx_Dialog_primary" and text()="Continue"]'));
|
||||||
await browser.findElement(By.xpath('//button[text()="Continue"]')).click();
|
await browser.findElement(By.xpath('//button[@class="mx_Dialog_primary" and text()="Continue"]')).click();
|
||||||
|
|
||||||
await waitForElement(By.xpath('//div[text()="Copy"]'));
|
await waitForElement(By.xpath('//div[text()="Copy"]'));
|
||||||
await browser.findElement(By.xpath('//div[text()="Copy"]')).click();
|
await browser.findElement(By.xpath('//div[text()="Copy"]')).click();
|
||||||
|
|
||||||
await waitForElement(By.xpath('//button[text()="Continue"]'));
|
await waitForElement(By.xpath('//button[@class="mx_Dialog_primary" and text()="Continue"]'));
|
||||||
await browser.findElement(By.xpath('//button[text()="Continue"]')).click();
|
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)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user