More work with titles & descriptions
This commit is contained in:
parent
a1138c8c43
commit
464af6b9d1
21 changed files with 178 additions and 51 deletions
|
|
@ -10,6 +10,16 @@ Feature: Test all secundary pages
|
|||
| activeFires | Active Fires |
|
||||
Then I check that all pages works properly
|
||||
|
||||
Scenario: Check that all secondary pages work well
|
||||
Given a list of page urls and contents
|
||||
| login | Login | true |
|
||||
| signup | Sign Up | true |
|
||||
| recover-password | Recover Password | true |
|
||||
| verify-email/something | Verify | true |
|
||||
| fire/inexistent | This page doesn't exist | false |
|
||||
| fire/Fe26.2**1a0361ed0384f741403682e26b4bbc3850bee24e775da13c9782b22365ea895f*r_3gmVad5vzkeyqPpo6UcA*1s5fFz3iDGKTYP2RCvXMshof00QCHf4ErDl9K2dxoX0u-J-t6scyOWG8pGp3ehg_FfEtyR_kYcEKU3rE0jaSlZbD09TIvhiIJeS3C6Uc8YD-rit0XBrgsVKfYSxKzTRoOYiYFJ8JYd298hMtfiASePjS05Z58hhicyCcJYYRlarqDScG3LiVY3lL5y2nfcdIMNuSjCiKOJWuMkxwd9nR1UHMudLl0hEoy56mPdnHpDYtP9IYUlIOk1LlWBxcmHKifbXeqHu94p8j13Kk20dh2R49Hw3KsSoE9UbWmGQA9wAZXT82301i3rGF5GPAKjlTlRYcWisQurnPwHSVmx3DhUdiYwKGxt4KeaM5QVI4BE9octvE41OOprB_-Il105diQEh2Y9vdvX51ZVWIRfCboICPM6rJb0Oin7U7F1iM-oD_5s3DGnelfM5LGBcKwiB5paMo5M5vdBMaO-zR216cW9yGVXw9IZqHx8xDQWnoHAZjt8NLHeiGF2QOmIGtEUH7qnwhGpkcvszajmAZzR8saZgoH1qfBfvpVA41YfV14gU**4d030f05e23ad75409cebc609107467fc60be5077d52cf041087cd024fc4dc45*GY97aGFc1MyAsoO3Qxqtgwk9j-MbAPdEGBmEHq6r8VU | Additional information | false |
|
||||
Then I check that all page urls works properly
|
||||
|
||||
Scenario: Check that other non visible pages work well
|
||||
Given a list of non visible pages ids and contents
|
||||
| status | Status |
|
||||
|
|
|
|||
|
|
@ -65,8 +65,8 @@ module.exports = function doSteps(notos) {
|
|||
*/
|
||||
|
||||
function closeAlert() {
|
||||
client.waitForVisible('.bert-alert', 5000);
|
||||
client.click('.bert-content');
|
||||
// client.waitForVisible('.bert-alert', 5000);
|
||||
// client.click('.bert-content');
|
||||
client.waitUntil(() => client.isVisible('.bert-alert') === false, 10000);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,21 @@ module.exports = function () {
|
|||
client.waitForVisible(id, 10000);
|
||||
client.click(id);
|
||||
client.waitForText('#react-root', content);
|
||||
// https://jasmine.github.io/2.3/introduction.html#section-Expectations
|
||||
expect(client.getTitle()).toContain(pages[i][1]);
|
||||
}
|
||||
|
||||
function processPageUrl(i) {
|
||||
const url = `${pages[i][0]}`;
|
||||
const content = pages[i][1];
|
||||
client.url(`${process.env.ROOT_URL}/${url}`);
|
||||
client.waitForVisible('#react-root', 10000);
|
||||
client.waitForText('#react-root', content);
|
||||
const checkTitle = pages[i][2] === 'true';
|
||||
// https://jasmine.github.io/2.3/introduction.html#section-Expectations
|
||||
if (checkTitle) {
|
||||
expect(client.getTitle()).toContain(pages[i][1]);
|
||||
}
|
||||
}
|
||||
|
||||
this.Given(/^a list of non visible pages ids and contents$/, (table, callback) => {
|
||||
|
|
@ -35,9 +50,25 @@ module.exports = function () {
|
|||
|
||||
this.Then(/^I check that all pages works properly$/, (callback) => {
|
||||
goHome(client);
|
||||
if (client.isVisible('#logout')) {
|
||||
client.click('#logout');
|
||||
}
|
||||
for (let i = 0; i < pages.length; i += 1) {
|
||||
processPage(i);
|
||||
}
|
||||
callback();
|
||||
});
|
||||
|
||||
this.Given(/^a list of page urls and contents$/, (table, callback) => {
|
||||
pages = table.raw();
|
||||
callback();
|
||||
});
|
||||
|
||||
this.Then(/^I check that all page urls works properly$/, (callback) => {
|
||||
goHome(client);
|
||||
for (let i = 0; i < pages.length; i += 1) {
|
||||
processPageUrl(i);
|
||||
}
|
||||
callback();
|
||||
});
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue