Commit 504e892e authored by Christophe Maudoux's avatar Christophe Maudoux

WIP - Improve e2e tests (#1600)

parent b372c147
...@@ -58,7 +58,6 @@ describe('01 Lemonldap::NG', function() { ...@@ -58,7 +58,6 @@ describe('01 Lemonldap::NG', function() {
browser.sleep(1000); browser.sleep(1000);
expect(browser.driver.findElement(by.css('[trspan="areYouSure"]')).getText()).toEqual('Êtes-vous sûr ?'); expect(browser.driver.findElement(by.css('[trspan="areYouSure"]')).getText()).toEqual('Êtes-vous sûr ?');
expect(browser.driver.findElement(by.css('[trspan="imSure"]')).getText()).toEqual('Je suis sûr'); expect(browser.driver.findElement(by.css('[trspan="imSure"]')).getText()).toEqual('Je suis sûr');
//browser.driver.findElement(by.xpath("//button[@type='button']")).click();
browser.driver.findElement(by.xpath("//button[@type='button']")).click(); browser.driver.findElement(by.xpath("//button[@type='button']")).click();
browser.sleep(1000); browser.sleep(1000);
}); });
...@@ -69,6 +68,23 @@ describe('01 Lemonldap::NG', function() { ...@@ -69,6 +68,23 @@ describe('01 Lemonldap::NG', function() {
links[0].click(); links[0].click();
browser.sleep(1000); browser.sleep(1000);
}); });
browser.driver.findElements(by.xpath('//main/div/div/div/div/h4')).then(function(elems) {
expect(elems.length).toEqual(7);
expect(elems[0].getText()).toEqual('Sample applications');
expect(elems[1].getText()).toEqual('Administration');
expect(elems[2].getText()).toEqual('Documentation');
});
browser.driver.findElements(by.xpath('//main/div/div/div/div/div/div/div/a/div/div/div/h5')).then(function(elems) {
expect(elems.length).toEqual(8);
expect(elems[0].getText()).toEqual('Application Test 1');
expect(elems[1].getText()).toEqual('Application Test 2');
expect(elems[2].getText()).toEqual('WebSSO Manager');
expect(elems[3].getText()).toEqual('Notifications explorer');
expect(elems[4].getText()).toEqual('Sessions explorer');
expect(elems[5].getText()).toEqual('2FA Sessions explorer');
expect(elems[6].getText()).toEqual('Local documentation');
expect(elems[7].getText()).toEqual('Official Website');
});
}); });
}); });
}); });
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment