Skip to content

Commit

Permalink
// fixed the selenium tests
Browse files Browse the repository at this point in the history
  • Loading branch information
djfm authored and maximebiloe committed Feb 5, 2016
1 parent 4f8ec20 commit 3c7ad21
Show file tree
Hide file tree
Showing 22 changed files with 11 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ download/*
/vendor/*
docs/phpdoc-sf/
/composer.lock
tests/StarterTheme/errorShots/
tests/selenium/errorShots/

admin-dev/autoupgrade/*
admin-dev/backups/*
Expand All @@ -30,7 +30,7 @@ config/settings.inc.php
config/settings.old.php
config/xml/*
!config/xml/themes/default.xml
tests/StarterTheme/settings.js
tests/selenium/settings.js
themes/*/config/settings_*.json

# Themes, modules and overrides
Expand Down
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import fixtures from '../fixtures';
export function addSomeProductToCart () {
return browser
.url(fixtures.urls.aCategoryWithProducts)
.click('[data-link-action="add-to-cart"]')
.waitForVisible('#blockcart-modal')
.click('.product-miniature:nth-of-type(2)')
.click('[name=add]')
;
};
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,6 @@ function hookModule($moduleName, $hookName)

// disableModule('blocklayered');
disableModule('cheque'); // not yet working
hookModule('blocktopmenu', 'displayTop');
hookModule('blocklanguages', 'displayNav');
hookModule('blockcurrencies', 'displayNav');
hookModule('blockuserinfo', 'displayNav');
hookModule('blocksearch', 'displayHeaderMiddle');

// We need a customizable product: we add a single required text field to the product with id 1.

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* global describe, it, browser, before, after */

var fixtures = require('../../fixtures');
import fixtures from '../../fixtures';

describe('Order history page', function () {

Expand All @@ -15,7 +15,7 @@ describe('Order history page', function () {
it('should display a list of orders', function () {
return browser
.url(fixtures.urls.orderhistory)
.elements('.page-content a.order-detail-link')
.elements('a[href*="controller=order-detail"]')
.then(function (elements) {
elements.value.length.should.be.greaterThan(0);
})
Expand All @@ -25,7 +25,7 @@ describe('Order history page', function () {
it('should allow customer to see details', function () {
return browser
.url(fixtures.urls.orderhistory)
.click('.page-content a.order-detail-link')
.click('a[href*="controller=order-detail"]')
.isExisting('.page-content #order-infos')
.then(function (isExisting) {
isExisting.should.be.true;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
/* global describe, it, browser */

import {baseUrl} from '../settings';

describe('The home page', function () {
it('should contain a link with the logo', function () {
return browser
.url('/')
.element('a.logo img')
.isVisible('a[href^="' + baseUrl + '"] img')
;
});
});
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion travis-scripts/run-selenium-tests
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm install 4
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_10.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :10 -ac -screen 0 1280x1024x16
cd /var/www/prestashop.unit.test/tests/StarterTheme
cd /var/www/prestashop.unit.test/tests/selenium
mv settings.travis.js settings.js
npm install
DISPLAY=:10 npm run selenium &> /dev/null &
Expand Down

0 comments on commit 3c7ad21

Please sign in to comment.