Skip to content

Commit 421404e

Browse files
committed
Update Behat app tests
1 parent 9655ec9 commit 421404e

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

.travis.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,15 @@ env:
5656
- "PHP=7.1 DB=mariadb GIT=v3.7.2 SUITE=behat BROWSER=chrome"
5757
- "PHP=7.0 DB=mariadb GIT=v3.5.8 SUITE=behat BROWSER=firefox"
5858
# Mobile app
59-
- "PHP=7.3 DB=pgsql GIT=master SUITE=app BROWSER=chrome MOBILE=next"
60-
- "PHP=7.3 DB=pgsql GIT=master SUITE=app BROWSER=chrome MOBILE=latest"
59+
- "PHP=7.3 DB=pgsql GIT=master SUITE=behat-app BROWSER=chrome APP=3.9.0"
6160
install:
6261
- git clone --branch $GIT --depth 1 git://github.com/moodle/moodle $HOME/moodle
6362
- cp config.docker-template.php $HOME/moodle/config.php
6463
- export MOODLE_DOCKER_DB=$DB
6564
- export MOODLE_DOCKER_BROWSER=$BROWSER
6665
- export MOODLE_DOCKER_WWWROOT="$HOME/moodle"
6766
- export MOODLE_DOCKER_PHP_VERSION=$PHP
68-
- export MOODLE_APP_VERSION=$MOBILE
67+
- export MOODLE_APP_VERSION=$APP
6968
before_script:
7069
- tests/setup.sh
7170
script:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ You can change the configuration of the docker images by setting various environ
134134
| `MOODLE_DOCKER_WEB_HOST` | no | any valid hostname | localhost | The hostname for web |
135135
| `MOODLE_DOCKER_WEB_PORT` | no | any integer value (or bind_ip:integer)| 127.0.0.1:8000| The port number for web. If set to 0, no port is used.<br/>If you want to bind to any host IP different from the default 127.0.0.1, you can specify it with the bind_ip:port format (0.0.0.0 means bind to all) |
136136
| `MOODLE_DOCKER_SELENIUM_VNC_PORT` | no | any integer value (or bind_ip:integer)| not set | If set, the selenium node will expose a vnc session on the port specified. Similar to MOODLE_DOCKER_WEB_PORT, you can optionally define the host IP to bind to. If you just set the port, VNC binds to 127.0.0.1 |
137-
| `MOODLE_APP_VERSION` | no | next, latest, or an app version number| not set | If set will start an instance of the Mmodle app if the chrome browser is selected |
137+
| `MOODLE_APP_VERSION` | no | next, latest, or an app version number| not set | If set will start an instance of the Moodle app if the chrome browser is selected |
138138

139139
## Using XDebug for live debugging
140140

tests/setup.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ elif [ "$SUITE" = "phpunit-full" ];
1212
then
1313
export MOODLE_DOCKER_PHPUNIT_EXTERNAL_SERVICES=true
1414
initcmd="bin/moodle-docker-compose exec -T webserver php admin/tool/phpunit/cli/init.php"
15-
elif [ "$SUITE" = "app" ];
15+
elif [ "$SUITE" = "behat-app" ];
1616
then
17+
git clone --branch "v$APP_VERSION" --depth 1 git://github.com/moodlehq/moodle-local_moodlemobileapp $HOME/moodle/local/moodlemobileapp
18+
1719
initcmd="bin/moodle-docker-compose exec -T webserver php admin/tool/behat/cli/init.php"
1820
else
1921
echo "Error, unknown suite '$SUITE'"

tests/test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ then
1212
elif [ "$SUITE" = "phpunit-full" ];
1313
then
1414
testcmd="bin/moodle-docker-compose exec -T webserver vendor/bin/phpunit --verbose"
15-
elif [ "$SUITE" = "app" ];
15+
elif [ "$SUITE" = "behat-app" ];
1616
then
17-
testcmd="bin/moodle-docker-compose exec -T webserver php admin/tool/behat/cli/run.php --tags=@app"
17+
testcmd="bin/moodle-docker-compose exec -T webserver php admin/tool/behat/cli/run.php --tags='@app&&@mod_login'"
1818
else
1919
echo "Error, unknown suite '$SUITE'"
2020
exit 1

0 commit comments

Comments
 (0)