mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-02-27 16:27:19 +08:00
Add e2e tests
This commit is contained in:
parent
e6e0b02849
commit
9993432c7b
6 changed files with 90 additions and 0 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -9,6 +9,9 @@
|
||||||
/rainloop/v/0.0.0/static/*
|
/rainloop/v/0.0.0/static/*
|
||||||
/rainloop/v/0.0.0/app/localization/moment/*
|
/rainloop/v/0.0.0/app/localization/moment/*
|
||||||
!/rainloop/v/0.0.0/app/localization/moment/.gitempty
|
!/rainloop/v/0.0.0/app/localization/moment/.gitempty
|
||||||
|
/e2e/configuration.js
|
||||||
|
/e2e/output/*
|
||||||
|
!/e2e/output/.gitempty
|
||||||
/vendors/.*
|
/vendors/.*
|
||||||
/node_modules
|
/node_modules
|
||||||
/build/local
|
/build/local
|
||||||
|
|
18
e2e/codecept.conf.js
Normal file
18
e2e/codecept.conf.js
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
|
||||||
|
var cfg = require('./configuration');
|
||||||
|
|
||||||
|
exports.config = {
|
||||||
|
"tests": "./tests/*_test.js",
|
||||||
|
"timeout": 10000,
|
||||||
|
"output": "./output",
|
||||||
|
"helpers": {
|
||||||
|
"WebDriverIO": {
|
||||||
|
"url": cfg.url,
|
||||||
|
"browser": "phantomjs"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"include": {},
|
||||||
|
"bootstrap": false,
|
||||||
|
"mocha": {},
|
||||||
|
"name": "RainLoop e2e tests"
|
||||||
|
};
|
6
e2e/configuration.js.dist
Normal file
6
e2e/configuration.js.dist
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
url: 'http://rainloop.domain.com/',
|
||||||
|
user: 'user"domain.com',
|
||||||
|
pass: '12345'
|
||||||
|
};
|
0
e2e/output/.gitempty
Normal file
0
e2e/output/.gitempty
Normal file
38
e2e/tests/login_test.js
Normal file
38
e2e/tests/login_test.js
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
|
||||||
|
Feature('login');
|
||||||
|
|
||||||
|
Before(function(I) {
|
||||||
|
I.amOnPage('/');
|
||||||
|
I.resizeWindow(1000, 1000);
|
||||||
|
I.waitForElement('.e-powered', 10);
|
||||||
|
});
|
||||||
|
|
||||||
|
Scenario('login/page', function(I) {
|
||||||
|
I.see('Powered by RainLoop', '.e-powered');
|
||||||
|
I.see('Remember Me');
|
||||||
|
});
|
||||||
|
|
||||||
|
Scenario('login/empty-fields-error', function(I) {
|
||||||
|
I.fillField('.inputEmail', '');
|
||||||
|
I.fillField('.inputPassword', '');
|
||||||
|
I.click('.buttonLogin');
|
||||||
|
I.see('Remember Me');
|
||||||
|
I.seeElement('.controls.error');
|
||||||
|
});
|
||||||
|
|
||||||
|
Scenario('login/auth-error', function(I) {
|
||||||
|
I.fillField('.inputEmail', 'xxx');
|
||||||
|
I.fillField('.inputPassword', 'yyy');
|
||||||
|
I.click('.buttonLogin');
|
||||||
|
I.waitForVisible('.alertError', 3);
|
||||||
|
I.see('Authentication failed', '.alertError');
|
||||||
|
});
|
||||||
|
|
||||||
|
Scenario('login/language-popup', function(I) {
|
||||||
|
I.click('.flag-name');
|
||||||
|
I.wait(1);
|
||||||
|
I.see('Choose your language', '.b-languages-content');
|
||||||
|
I.click('.close', '.b-languages-content');
|
||||||
|
I.wait(1);
|
||||||
|
I.dontSee('Choose your language');
|
||||||
|
});
|
25
e2e/tests/main_test.js
Normal file
25
e2e/tests/main_test.js
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
|
||||||
|
var cfg = require('../configuration');
|
||||||
|
|
||||||
|
Feature('mailbox');
|
||||||
|
|
||||||
|
Before((I) => {
|
||||||
|
I.amOnPage('/');
|
||||||
|
I.resizeWindow(1000, 1000);
|
||||||
|
I.waitForElement('.e-powered', 10);
|
||||||
|
I.fillField('.inputEmail', cfg.user);
|
||||||
|
I.fillField('.inputPassword', cfg.pass);
|
||||||
|
I.click('.buttonLogin');
|
||||||
|
I.waitForText('test@rainloop.de', 10, '.accountPlace');
|
||||||
|
I.resizeWindow(1000, 1000);
|
||||||
|
});
|
||||||
|
|
||||||
|
Scenario('mailbox/main', (I) => {
|
||||||
|
I.see('Select message in list to view it here.');
|
||||||
|
I.see('Inbox', '.b-folders-system');
|
||||||
|
|
||||||
|
I.click('#top-system-dropdown-id');
|
||||||
|
I.see('Logout', '.RL-SystemDropDown');
|
||||||
|
I.click('Logout', '.RL-SystemDropDown');
|
||||||
|
I.waitForText('Powered by RainLoop', 10, '.e-powered');
|
||||||
|
});
|
Loading…
Reference in a new issue