mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 21:19:21 +03:00
Improve scripts load system
This commit is contained in:
parent
58b9eed8e8
commit
72bf212f67
39 changed files with 916 additions and 411 deletions
|
|
@ -1,6 +0,0 @@
|
|||
|
||||
module.exports = {
|
||||
url: 'https://mail.rainloop.net/',
|
||||
testLogin: 'demo@rainloop.test',
|
||||
testPassword: '12345'
|
||||
};
|
||||
1
tests/bootstrap.php
Normal file
1
tests/bootstrap.php
Normal file
|
|
@ -0,0 +1 @@
|
|||
<?php
|
||||
|
|
@ -1,70 +0,0 @@
|
|||
|
||||
var cfg = require('./_config.js');
|
||||
|
||||
casper.start(cfg.url);
|
||||
|
||||
casper.then(function() {
|
||||
this.echo('testing: ' + cfg.url);
|
||||
}).wait(100);
|
||||
|
||||
casper.then(function() {
|
||||
|
||||
casper.test.begin('Login page should contains "Sign In" button', 1, function (test) {
|
||||
|
||||
casper.then(function() {
|
||||
test.assertExists('button.buttonLogin');
|
||||
});
|
||||
|
||||
casper.then(function() {
|
||||
test.done();
|
||||
});
|
||||
});
|
||||
|
||||
casper.test.begin('Login page should allow langs selection', 3, function (test) {
|
||||
|
||||
casper.then(function() {
|
||||
test.assertExists('.e-languages .flag-selector .flag-name');
|
||||
});
|
||||
|
||||
casper.then(function() {
|
||||
this.click('.e-languages .flag-selector .flag-name');
|
||||
}).wait(300);
|
||||
|
||||
casper.then(function() {
|
||||
test.assertExists('.b-languages-content');
|
||||
});
|
||||
|
||||
casper.then(function() {
|
||||
this.click('.b-languages-content .lang-item .flag.flag-ru_ru');
|
||||
}).wait(1000);
|
||||
|
||||
casper.then(function() {
|
||||
test.assertEquals('Войти', this.fetchText('button.buttonLogin'));
|
||||
});
|
||||
|
||||
casper.then(function() {
|
||||
test.done();
|
||||
});
|
||||
});
|
||||
|
||||
casper.test.begin('Login page submit', 1, function (test) {
|
||||
|
||||
casper.then(function() {
|
||||
this.fill('form.loginForm', {
|
||||
'RainLoopEmail': cfg.testLogin,
|
||||
'RainLoopPassword': cfg.testPassword
|
||||
}, true);
|
||||
}).wait(3000);
|
||||
|
||||
casper.then(function() {
|
||||
test.assertEquals(cfg.testLogin, this.fetchText('.accountPlace'));
|
||||
});
|
||||
|
||||
casper.then(function() {
|
||||
test.done();
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
casper.run();
|
||||
Loading…
Add table
Add a link
Reference in a new issue