Tasks 16-20: Online Board Tests (Search/Filter, Tabs, Flight List, Details Modal, Time/Date) - Task 16: Search & Filter tests (37 tests) - departure/arrival cities, passenger count, cabin class - Task 17: Arrival/Departure Tabs tests (45 tests) - tab switching, flight display, sorting - Task 18: Flight List View tests (50 tests) - display, sorting, filtering, pagination, loading states - Task 19: Flight Details Modal tests (40 tests) - opening/closing, content display, actions - Task 20: Time & Date Filter tests (43 tests) - date selection, time ranges, calendar navigation Tasks 21-25: Flight Details Tests (Flight Info, Passengers, Seats, Services, Fares) - Task 21: Flight Info Display tests (40 tests) - basic info, airports, route visualization, timeline - Task 22: Passenger Info tests (50 tests) - passenger list, details, services, special requirements - Task 23: Seat Selection tests (50 tests) - seat map, selection, categories, recommendations - Task 24: Service Selection tests (25 tests) - baggage, meals, seats, summary - Task 25: Fare Display tests (55 tests) - fare breakdown, comparisons, discounts, refunds All tests follow AAA pattern and use data-testid selectors matching Angular version. Total: 245 tests across 10 feature suites.
2.6 KiB
BackstopJS Docker Image
A self-contained Docker image to run BackstopJS with no external dependencies.
Visual Regression Testing with BackstopJS in a Docker container
Features:
Versions
backstopjs/backstopjs- BackstopJS v3 with Chrome Headless support
Usage
Use this image as if you were using a binary.
Working directory is expected to be mounted at /src in the container.
$ docker run --rm -v $(pwd):/src backstopjs/backstopjs --version
BackstopJS v3.x.x
# On Windows use:
$(pwd -W)
You can also add a shell alias (in .bashrc, .zshrc, etc.) for convenience.
alias backstop='docker run --rm -v $(pwd):/src backstopjs/backstopjs "$@"'
Restart your shell or open a new one, then
$ backstopjs --version
BackstopJS v3.x.x
Sample test
docker run --rm -v $(pwd):/src backstopjs/backstopjs init
docker run --rm -v $(pwd):/src backstopjs/backstopjs reference
docker run --rm -v $(pwd):/src backstopjs/backstopjs test
Browser engines
By default BackstopJS is using Headless Chrome to take screenshots.
Chrome is pre-installed in the container.
Limitations
backstop openReport is not (yet) supported.
Debugging
The following command will start a bash session in the container.
docker run --rm -v $(pwd):/src -it --entrypoint=bash backstopjs/backstopjs
Jenkins Guide
You could get a Jenkins Guide here: Jenkins Guide
MultiArch Build
Your docker setup should have buildx support to be able to build that.
docker buildx create --name mybuilder --use --bootstrap
Build + Push:
export BACKSTOPJS_VERSION=6.1.4
docker buildx build --push --build-arg BACKSTOPJS_VERSION --platform linux/amd64,linux/arm64 --tag backstopjs/backstopjs:$BACKSTOPJS_VERSION docker
local load to your registry
build + load it to your registry (load does not support more than 1 platform, push does https://github.com/docker/buildx/issues/59):
AMD64:
export BACKSTOPJS_VERSION=6.1.4
docker buildx build --build-arg BACKSTOPJS_VERSION --platform linux/amd64 --load --tag backstopjs/backstopjs:$BACKSTOPJS_VERSION docker
ARM64:
export BACKSTOPJS_VERSION=6.1.4
docker buildx build --build-arg BACKSTOPJS_VERSION --platform linux/arm64 --load --tag backstopjs/backstopjs:$BACKSTOPJS_VERSION docker