Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 5 additions & 13 deletions .ahoy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,16 @@ commands:
usage: Run all tests.
cmd: |
ahoy test-phpunit
ahoy test-behat

test-behat:
usage: Run Behat tests.
cmd: docker compose exec cli behat "$@"
ahoy test-playwright

test-phpunit:
usage: Run PHPUnit tests.
cmd: docker compose exec cli phpunit --testsuite govcms

test-playwright:
usage: Run Playwright tests.
cmd: docker compose exec -T playwright npx playwright test --config /app/tests/playwright/playwright.config.ts "$@"

test-redis:
usage: Verify redis can accept connections.
cmd: |
Expand All @@ -118,14 +118,6 @@ commands:
else
echo "Redis success: Redis contains $redisKeys keys."
fi
test-goss:
usage: Validate images with dgoss.
cmd: |
curl -L https://github.com/goss-org/goss/releases/latest/download/goss-linux-amd64 -o /usr/local/bin/goss
chmod +rx /usr/local/bin/goss
curl -L https://github.com/goss-org/goss/releases/latest/download/dgoss -o /usr/local/bin/dgoss
chmod +rx /usr/local/bin/dgoss
./tests/goss/run_all.sh

test-install:
usage: Test a blank install.
Expand Down
3 changes: 0 additions & 3 deletions .docker/Dockerfile.chrome

This file was deleted.

14 changes: 14 additions & 0 deletions .docker/Dockerfile.playwright
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM mcr.microsoft.com/playwright:v1.50.0-noble

WORKDIR /app

# Install Playwright test runner with pinned version matching the base image.
RUN npm init -y && npm install @playwright/test@1.50.0

# Copy example tests and config.
COPY tests/playwright /app/tests/playwright

EXPOSE 3000

# Run Playwright server, listening on all interfaces.
CMD ["npx", "playwright", "run-server", "--host", "0.0.0.0", "--port", "3000"]
7 changes: 5 additions & 2 deletions .docker/Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@ COPY .docker/images/govcms/mariadb-client.cnf /etc/my.cnf.d
# Copy application files from the 'cli' stage to the current stage
COPY --from=cli /app /app

# Copy PHPUnit configuration and test files
COPY --from=govcmstesting/tests:3.2.3-php8.3 /tests /app/tests
# Install dev dependencies for testing.
RUN composer install --dev

# Copy test files.
COPY tests /app/tests

# Set an environment variable for the webroot path
ENV WEBROOT=web
7 changes: 6 additions & 1 deletion bake.hcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group "default" {
targets = ["cli", "test", "nginx", "php", "mariadb", "redis", "solr", "varnish"]
targets = ["cli", "test", "playwright", "nginx", "php", "mariadb", "redis", "solr", "varnish"]
}

target "cli" {
Expand Down Expand Up @@ -37,6 +37,11 @@ target "solr" {
platforms = ["linux/amd64", "linux/arm64"]
}

target "playwright" {
dockerfile = ".docker/Dockerfile.playwright"
platforms = ["linux/amd64"]
}

target "varnish" {
dockerfile = ".docker/Dockerfile.varnish-drupal"
platforms = ["linux/amd64", "linux/arm64"]
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,11 @@ services:
- amazeeio-network
- default

chrome:
playwright:
build:
context: .
dockerfile: $PWD/.docker/Dockerfile.chrome
image: selenium/standalone-chrome
dockerfile: $PWD/.docker/Dockerfile.playwright
image: ${DOCKERHUB_NAMESPACE:-govcms}/playwright:${GOVCMS_RELEASE_TAG:-latest}
shm_size: '1gb'
depends_on:
- test
Expand Down
8 changes: 0 additions & 8 deletions tests/behat/behat.screenshot.yml

This file was deleted.

29 changes: 0 additions & 29 deletions tests/behat/behat.travis.yml

This file was deleted.

57 changes: 0 additions & 57 deletions tests/behat/behat.yml

This file was deleted.

Empty file removed tests/behat/bootstrap/.gitkeep
Empty file.
24 changes: 0 additions & 24 deletions tests/behat/bootstrap/FeatureContext.php

This file was deleted.

26 changes: 0 additions & 26 deletions tests/behat/features/example/story-syntax

This file was deleted.

13 changes: 0 additions & 13 deletions tests/behat/features/ui/home.feature

This file was deleted.

11 changes: 0 additions & 11 deletions tests/behat/features/user/user.feature

This file was deleted.

Binary file removed tests/behat/files/autotest.jpg
Binary file not shown.
Binary file removed tests/behat/files/autotest.pdf
Binary file not shown.
7 changes: 0 additions & 7 deletions tests/behat/files/autotest.rtf

This file was deleted.

43 changes: 0 additions & 43 deletions tests/goss/goss.govcms.yaml

This file was deleted.

15 changes: 0 additions & 15 deletions tests/goss/goss.nginx-drupal.yaml

This file was deleted.

9 changes: 0 additions & 9 deletions tests/goss/goss.php.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions tests/goss/goss.solr.yaml

This file was deleted.

19 changes: 0 additions & 19 deletions tests/goss/run_all.sh

This file was deleted.

Loading