Skip to content

Commit 3ff770a

Browse files
run gutenberg tests as a separate job
1 parent de5255d commit 3ff770a

File tree

3 files changed

+32
-8
lines changed

3 files changed

+32
-8
lines changed

.travis.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ matrix:
2424
script:
2525
- docker-compose -f docker-compose.travis.yml up -d
2626
- chmod +x ./bin/run-e2e-tests.sh ./bin/wp-init.sh && ./bin/wp-init.sh && ./bin/run-e2e-tests.sh
27+
- name: Cypress Gutenberg
28+
language: node_js
29+
node_js:
30+
- 10.8
31+
script:
32+
- docker-compose -f docker-compose.travis.yml up -d
33+
- chmod +x ./bin/run-e2e-tests-gutenberg.sh ./bin/wp-init.sh && ./bin/wp-init.sh && ./bin/run-e2e-tests-gutenberg.sh
2734
allow_failures:
2835
- env: TEST_SUITE=Wraith_Visual_Regression_Testing WRAITH_FAIL=5
2936
branches:

bin/run-e2e-tests - gutenberg.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
3+
if [[ "$TRAVIS" == "true" ]]; then
4+
npm install --only=dev --prefix ./cypress/
5+
composer install --no-dev
6+
fi
7+
8+
wp_host='localhost'
9+
windows=`echo $OSTYPE | grep -i -e "win" -e "msys" -e "cygw" | wc -l`
10+
args='-it';
11+
if [[ $windows -gt 0 ]]; then
12+
wp_host=`docker-machine ip`
13+
args=''
14+
fi
15+
16+
# exit on error
17+
set -e
18+
19+
export CYPRESS_HOST=$wp_host
20+
21+
# gutenberg - DO NOT move this from here as the number of charts in the library are being counted.
22+
# so this HAS to be the first test.
23+
docker exec $args visualizer_wordpress wp --quiet plugin deactivate classic-editor
24+
export CYPRESS_SPEC_TO_RUN="free-gutenberg.js"
25+
npm run cypress:run

bin/run-e2e-tests.sh

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,6 @@ set -e
1818

1919
export CYPRESS_HOST=$wp_host
2020

21-
# gutenberg - DO NOT move this from here as the number of charts in the library are being counted.
22-
# so this HAS to be the first test.
23-
docker exec $args visualizer_wordpress wp --quiet plugin deactivate classic-editor
24-
export CYPRESS_SPEC_TO_RUN="free-gutenberg.js"
25-
npm run cypress:run
26-
27-
docker exec $args visualizer_wordpress wp --quiet plugin activate classic-editor
28-
2921
# test free - lifecycle
3022
export CYPRESS_SPEC_TO_RUN="free-lifecycle.js"
3123
npm run cypress:run

0 commit comments

Comments
 (0)