Inital commit
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
// LOCAL = ton pc
|
||||
|
||||
var system = require('system');
|
||||
|
||||
// Thalie Base URL
|
||||
var thelia2_base_url = '';
|
||||
|
||||
|
||||
if (casper.cli.has('thelia2_base_url')){
|
||||
thelia2_base_url = casper.cli.get('thelia2_base_url');
|
||||
casper.test.comment('CasperJS will use Thelia on : '+ thelia2_base_url);
|
||||
@@ -17,93 +16,44 @@ if (casper.cli.has('thelia2_base_url')){
|
||||
casper.test.comment('If you want to use custom URL just set the environment variable `thelia2_base_url`');
|
||||
}
|
||||
|
||||
// Administrator account
|
||||
var administrator = {
|
||||
login: "thelia2",
|
||||
password: "thelia2"
|
||||
};
|
||||
|
||||
// Default
|
||||
var thelia2_store_name = "Thelia V2";
|
||||
|
||||
var screenshot_enabled = true;
|
||||
if (casper.cli.has('thelia2_screenshot_disabled')) {
|
||||
screenshot_enabled = false;
|
||||
}
|
||||
|
||||
// Screenshot Dir
|
||||
var screenshot_dir = 'tests/functionnal/casperjs/screenshot/';
|
||||
if (casper.cli.has('thelia2_screenshot_path')){
|
||||
screenshot_dir = casper.cli.get('thelia2_screenshot_path');
|
||||
}
|
||||
casper.test.comment('Screenshots will be saved under : '+ screenshot_dir);
|
||||
|
||||
|
||||
// Default Viewport size
|
||||
casper.options.viewportSize = {width: 1024, height: 768};
|
||||
casper.test.comment('Viewport size: '+ casper.options.viewportSize.width + 'x' + casper.options.viewportSize.height);
|
||||
|
||||
var viewports = [
|
||||
{
|
||||
'name': 'samsung-galaxy_y-portrait',
|
||||
'viewport': {width: 240, height: 320}
|
||||
},
|
||||
{
|
||||
'name': 'samsung-galaxy_y-landscape',
|
||||
'viewport': {width: 320, height: 240}
|
||||
},
|
||||
{
|
||||
'name': 'iphone5-portrait',
|
||||
'viewport': {width: 320, height: 568}
|
||||
},
|
||||
{
|
||||
'name': 'iphone5-landscape',
|
||||
'viewport': {width: 568, height: 320}
|
||||
},
|
||||
{
|
||||
'name': 'htc-one-portrait',
|
||||
'viewport': {width: 360, height: 640}
|
||||
},
|
||||
{
|
||||
'name': 'htc-one-landscape',
|
||||
'viewport': {width: 640, height: 360}
|
||||
},
|
||||
{
|
||||
'name': 'nokia-lumia-920-portrait',
|
||||
'viewport': {width: 240, height: 320}
|
||||
},
|
||||
{
|
||||
'name': 'nokia-lumia-920-landscape',
|
||||
'viewport': {width: 320, height: 240}
|
||||
},
|
||||
{
|
||||
'name': 'google-nexus-7-portrait',
|
||||
'viewport': {width: 603, height: 966}
|
||||
},
|
||||
{
|
||||
'name': 'google-nexus-7-landscape',
|
||||
'viewport': {width: 966, height: 603}
|
||||
},
|
||||
{
|
||||
'name': 'ipad-portrait',
|
||||
'viewport': {width: 768, height: 1024}
|
||||
},
|
||||
{
|
||||
'name': 'ipad-landscape',
|
||||
'viewport': {width: 1024, height: 768}
|
||||
},
|
||||
{
|
||||
'name': 'desktop-standard-vga',
|
||||
'viewport': {width: 640, height: 480}
|
||||
},
|
||||
{
|
||||
'name': 'desktop-standard-svga',
|
||||
'viewport': {width: 800, height: 600}
|
||||
},
|
||||
{
|
||||
'name': 'desktop-standard-hd',
|
||||
'viewport': {width: 1280, height: 720}
|
||||
},
|
||||
{
|
||||
'name': 'desktop-standard-sxga',
|
||||
'viewport': {width: 1280, height: 1024}
|
||||
},
|
||||
{
|
||||
'name': 'desktop-standard-sxga-plus',
|
||||
'viewport': {width: 1400, height: 1050}
|
||||
},
|
||||
{
|
||||
'name': 'desktop-standard-uxga',
|
||||
'viewport': {width: 1600, height: 1200}
|
||||
},
|
||||
{
|
||||
'name': 'desktop-standard-wuxga',
|
||||
'viewport': {width: 1920, height: 1200}
|
||||
},
|
||||
// Default timeout in ms
|
||||
var thelia_default_timeout = 15000;
|
||||
// for the waitFor method
|
||||
casper.options.waitTimeout = thelia_default_timeout;
|
||||
casper.options.logLevel = "info";
|
||||
|
||||
];
|
||||
casper.test.comment('Default timeout: '+ thelia_default_timeout + ' ms');
|
||||
|
||||
;
|
||||
// Email created during front/20_register.js test
|
||||
var thelia_customer = {
|
||||
"email": null,
|
||||
"password": "thelia"
|
||||
};
|
||||
|
||||
casper.test.done();
|
||||
|
||||
Reference in New Issue
Block a user