Update docker-compose file & setup running e2e tests on Travis CI
This commit is contained in:
parent
b1738068a4
commit
a7e582b1bb
14
.travis.yml
14
.travis.yml
|
@ -5,6 +5,8 @@ dist: xenial
|
|||
services:
|
||||
- xvfb
|
||||
- mysql
|
||||
- docker
|
||||
- docker-compose
|
||||
|
||||
sudo: false
|
||||
|
||||
|
@ -32,14 +34,10 @@ matrix:
|
|||
- name: "Coding standard check"
|
||||
php: 7.2
|
||||
env: WP_VERSION=latest WP_MULTISITE=0 RUN_PHPCS=1
|
||||
- name: "e2e tests"
|
||||
php: 7.2
|
||||
env: WP_VERSION=latest WP_MULTISITE=0 RUN_E2E=1
|
||||
addons:
|
||||
chrome: beta
|
||||
apt:
|
||||
packages:
|
||||
- nginx
|
||||
- name: "E2E tests"
|
||||
env: RUN_E2E=1
|
||||
script:
|
||||
- docker-compose up -d
|
||||
- name: "Unit tests code coverage"
|
||||
php: 7.3
|
||||
env: WP_VERSION=latest WP_MULTISITE=0 RUN_CODE_COVERAGE=1
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
version: '3.1'
|
||||
version: '3.7'
|
||||
|
||||
services:
|
||||
|
||||
db:
|
||||
image: mysql:5.7
|
||||
image: mariadb:10.4
|
||||
restart: on-failure
|
||||
environment:
|
||||
MYSQL_DATABASE: testdb
|
||||
MYSQL_USER: wordpress
|
||||
MYSQL_PASSWORD: wordpress
|
||||
MYSQL_RANDOM_ROOT_PASSWORD: '1'
|
||||
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
|
||||
volumes:
|
||||
- db:/var/lib/mysql
|
||||
|
||||
|
|
|
@ -1,11 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
if [[ ${RUN_E2E} == 1 ]]; then
|
||||
|
||||
WP_SITE_URL="http://localhost:8080"
|
||||
|
||||
# Set base url to that of e2e test suite.
|
||||
export BASE_URL="$WP_SITE_URL"
|
||||
|
||||
# Run the tests
|
||||
npm test
|
||||
npm run test:e2e
|
||||
fi
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"url": "http://example.com",
|
||||
"url": "http://example.com/",
|
||||
"users": {
|
||||
"admin": {
|
||||
"username": "",
|
||||
|
|
|
@ -71,7 +71,7 @@ describe( 'Store owner can go through store Setup Wizard', () => {
|
|||
await page.$eval( '#wc_tracker_submit', elem => elem.click() );
|
||||
|
||||
// Wait for the Payment section to load
|
||||
await page.waitForNavigation();
|
||||
await page.waitForNavigation( { waitUntil: 'networkidle0' } );
|
||||
} );
|
||||
|
||||
it( 'Can fill out Payment details', async () => {
|
||||
|
|
Loading…
Reference in New Issue