Skip to content

Commit 6996e61

Browse files
mxr576weitzman
andauthored
Fix file upload in E2E tests (#64)
* Fix file upload in E2E tests * Add test coverage --------- Co-authored-by: Moshe Weitzman <[email protected]>
1 parent 927527e commit 6996e61

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

docker-compose.selenium-chrome.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ services:
2525
com.ddev.site-name: ${DDEV_SITENAME}
2626
com.ddev.approot: $DDEV_APPROOT
2727
volumes:
28+
# To enable file uploads in E2E tests.
29+
- ${DDEV_APPROOT}:/var/www/html:r
2830
- ".:/mnt/ddev_config"
2931

3032
web:

tests/test.bats

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ health_checks() {
5858
run ddev exec -d /var/www/html/web "../vendor/bin/phpunit -v -c ./core/phpunit.xml.dist ./core/modules/system/tests/src/FunctionalJavascript/FrameworkTest.php"
5959
assert_success
6060

61+
echo "Ensure file uploads from browser works." >&3
62+
run ddev exec -d /var/www/html/web "../vendor/bin/phpunit -v -c ./core/phpunit.xml.dist ./core/modules/file/tests/src/FunctionalJavascript/FileManagedFileElementTest.php"
63+
assert_success
64+
6165
echo "Run a Nightwatch test." >&3
6266

6367
run ddev exec -d /var/www/html/web/core yarn install

0 commit comments

Comments
 (0)