mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Update ckeditor
Move e2e tests Code refactoring
This commit is contained in:
parent
9993432c7b
commit
e5af98b04b
122 changed files with 617 additions and 561 deletions
6
tests/e2e/.cmds
Normal file
6
tests/e2e/.cmds
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
# phantomjs
|
||||
phantomjs --webdriver=4444
|
||||
|
||||
# codecept
|
||||
codeceptjs run
|
||||
18
tests/e2e/codecept.conf.js
Normal file
18
tests/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
tests/e2e/configuration.js.dist
Normal file
6
tests/e2e/configuration.js.dist
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
module.exports = {
|
||||
url: 'http://rainloop.domain.com/',
|
||||
user: 'user"domain.com',
|
||||
pass: '12345'
|
||||
};
|
||||
0
tests/e2e/output/.gitempty
Normal file
0
tests/e2e/output/.gitempty
Normal file
38
tests/e2e/tests/login_test.js
Normal file
38
tests/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
tests/e2e/tests/main_test.js
Normal file
25
tests/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…
Add table
Add a link
Reference in a new issue