fixup tests

master
Girish Ramakrishnan 3 months ago
parent 0d5de8d366
commit 9626734bb0
  1. 16
      test/test.js

@ -10,7 +10,7 @@
require('chromedriver');
var execSync = require('child_process').execSync,
const execSync = require('child_process').execSync,
expect = require('expect.js'),
path = require('path'),
{ Builder, By, Key, until } = require('selenium-webdriver'),
@ -69,7 +69,7 @@ describe('Application life cycle test', function () {
await browser.findElement(By.id('email')).sendKeys(EMAIL);
await browser.findElement(By.id('masterPassword')).sendKeys(PASSWORD);
await browser.findElement(By.xpath('//button[@type="submit"]')).click();
await waitForElement(By.xpath('//a[text()="Settings"]'));
await waitForElement(By.xpath('//h1[contains(text(),"Vault Items")]'));
}
async function logout() {
@ -77,10 +77,10 @@ describe('Application life cycle test', function () {
await browser.get(`https://${app.fqdn}`);
await browser.findElement(By.id('masterPassword')).sendKeys(PASSWORD);
await browser.findElement(By.xpath('//button[@type="submit"]')).click();
await waitForElement(By.xpath('//a[text()="Settings"]'));
await browser.findElement(By.id('nav-profile')).click();
await waitForElement(By.xpath('//button[@class="dropdown-item"][2]'));
await browser.findElement(By.xpath('//button[@class="dropdown-item"][2]')).click();
await waitForElement(By.xpath('//h1[contains(text(),"Vault Items")]'));
await browser.findElement(By.xpath('//button[@aria-haspopup="menu"]')).click();
await waitForElement(By.xpath('//button/i[contains(@class, "bwi-sign-out")]'));
await browser.findElement(By.xpath('//button/i[contains(@class, "bwi-sign-out")]')).click();
await waitForElement(By.xpath('//label[text()="Remember email"]'));
}
@ -88,7 +88,7 @@ describe('Application life cycle test', function () {
await browser.get(`https://${app.fqdn}`);
await browser.findElement(By.id('masterPassword')).sendKeys(PASSWORD);
await browser.findElement(By.xpath('//button[@type="submit"]')).click();
await waitForElement(By.xpath('//a[text()="Settings"]'));
await waitForElement(By.xpath('//h1[contains(text(),"Vault Items")]'));
await browser.findElement(By.xpath('//div[contains(@class, "page-header")]//button[contains(@class, "btn-outline-primary")]')).click();
await waitForElement(By.id('name'));
await browser.findElement(By.id('name')).sendKeys(ITEM_NAME);
@ -102,7 +102,7 @@ describe('Application life cycle test', function () {
await browser.get(`https://${app.fqdn}`);
await browser.findElement(By.id('masterPassword')).sendKeys(PASSWORD);
await browser.findElement(By.xpath('//button[@type="submit"]')).click();
await waitForElement(By.xpath('//a[text()="Settings"]'));
await waitForElement(By.xpath('//h1[contains(text(),"Vault Items")]'));
await waitForElement(By.xpath(`//a[text()="${ITEM_NAME}"]`));
}

Loading…
Cancel
Save