Add comprehensive e2e test suites for Tasks 16-25

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.
This commit is contained in:
gnezim
2026-04-05 19:25:03 +03:00
parent 21c6ed4f82
commit 60e2149072
31032 changed files with 5222883 additions and 2 deletions
+35
View File
@@ -0,0 +1,35 @@
# use bullseye node base, as debian does provide a chromium for arm64 and amd64 flavour
FROM node:20-bullseye
ARG BACKSTOPJS_VERSION
ARG DEBIAN_FRONTEND=noninteractive
ENV BACKSTOPJS_VERSION=$BACKSTOPJS_VERSION
# install chromium and its deps
RUN apt-get -qq update >/dev/null && apt-get install -qq \
fonts-liberation \
# cyrillic
xfonts-cyrillic \
# chinese
xfonts-wqy fonts-wqy-zenhei fonts-arphic-ukai fonts-arphic-uming \
# japanese
fonts-ipafont-mincho fonts-ipafont-gothic fonts-ipafont fonts-vlgothic \
# korean
fonts-unfonts-core fonts-unfonts-extra \
# cjk + emoji font
fonts-noto-cjk fonts-noto-color-emoji \
# chromium
chromium >/dev/null && apt-get -qq clean >/dev/null && rm -rf /var/lib/apt/lists/*
# skip download, we already have it installed
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
# playwright shared browser path (does install a 2nd chromium - can't be skipped)
ENV PLAYWRIGHT_BROWSERS_PATH=/opt/pw-browsers
RUN mkdir ${PLAYWRIGHT_BROWSERS_PATH} && npm install -g --unsafe-perm=true --allow-root backstopjs@${BACKSTOPJS_VERSION} && npx --yes --verbose --foreground-scripts playwright install --with-deps
# set executable path
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
WORKDIR /src
ENTRYPOINT ["backstop"]
+111
View File
@@ -0,0 +1,111 @@
# BackstopJS Docker Image
A self-contained Docker image to run [BackstopJS](https://github.com/garris/BackstopJS) with no external dependencies.
[Visual Regression Testing with BackstopJS in a Docker container](https://blog.docksal.io/visual-regression-testing-with-backstopjs-in-a-docker-container-dfd1b9ae8582)
Features:
- [BackstopJS 3.x](https://github.com/garris/BackstopJS)
- [Chrome-headless](https://www.google.com/chrome/browser/canary.html)
## 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](../examples/Jenkins)
## 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
```
+12
View File
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
echo starting a fire
set -e
set -o errexit
docker stop `docker ps -qa` > /dev/null 2>&1; ## Stop all running containers
docker buildx stop; ## Stop the buildx builder
docker system prune --all --force --volumes; ## Remove all volumes, images, and containers
docker buildx rm --all-inactive --force; ## Remove all buildx builders
docker buildx prune --all --force; ## Prune buildx builder caches
echo builders are burned
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 248 KiB

+4
View File
@@ -0,0 +1,4 @@
#!/bin/bash
BACKSTOPJS_VERSION=$(grep -Po '(?<="version": ")[^"]*' $(dirname "$0")/../../package.json)
docker build --build-arg BACKSTOPJS_VERSION=$BACKSTOPJS_VERSION -t $IMAGE_NAME .
+8
View File
@@ -0,0 +1,8 @@
#!/bin/bash
BACKSTOPJS_VERSION=$(grep -Po '(?<="version": ")[^"]*' $(dirname "$0")/../../package.json)
docker tag $IMAGE_NAME $DOCKER_REPO:$BACKSTOPJS_VERSION
docker push $DOCKER_REPO:$BACKSTOPJS_VERSION
docker tag $IMAGE_NAME $DOCKER_REPO:latest
docker push $DOCKER_REPO:latest
Generated Vendored Executable
+195
View File
@@ -0,0 +1,195 @@
#!/bin/sh
# $Id: xvfb-run 2027 2004-11-16 14:54:16Z branden $
# This script starts an instance of Xvfb, the "fake" X server, runs a command
# with that server available, and kills the X server when done. The return
# value of the command becomes the return value of this script, except in cases
# where this script encounters an error.
#
# If anyone is using this to build a Debian package, make sure the package
# Build-Depends on xvfb, xbase-clients, and xfonts-base.
set -e
PROGNAME=xvfb-run
SERVERNUM=99
AUTHFILE=
ERRORFILE=/dev/null
STARTWAIT=3
SCREEN_WIDTH=${SCREEN_WIDTH:-'1920'}
SCREEN_HEIGHT=${SCREEN_HEIGHT:-'1080'}
XVFBARGS="-screen 0, ${SCREEN_WIDTH}x${SCREEN_HEIGHT}x24"
LISTENTCP="-nolisten tcp"
XAUTHPROTO=.
echo "Using screen size ${SCREEN_WIDTH}x${SCREEN_HEIGHT}"
# Query the terminal to establish a default number of columns to use for
# displaying messages to the user. This is used only as a fallback in the event
# the COLUMNS variable is not set. ($COLUMNS can react to SIGWINCH while the
# script is running, and this cannot, only being calculated once.)
DEFCOLUMNS=$(stty size 2>/dev/null | awk '{print $2}') || true
if ! expr "$DEFCOLUMNS" : "[[:digit:]]\+$" >/dev/null 2>&1; then
DEFCOLUMNS=80
fi
# Display a message, wrapping lines at the terminal width.
message () {
echo "$PROGNAME: $*" | fmt -t -w ${COLUMNS:-$DEFCOLUMNS}
}
# Display an error message.
error () {
message "error: $*" >&2
}
# Display a usage message.
usage () {
if [ -n "$*" ]; then
message "usage error: $*"
fi
cat <<EOF
Usage: $PROGNAME [OPTION ...] COMMAND
Run COMMAND (usually an X client) in a virtual X server environment.
Options:
-a --auto-servernum try to get a free server number, starting at
--server-num
-e FILE --error-file=FILE file used to store xauth errors and Xvfb
output (default: $ERRORFILE)
-f FILE --auth-file=FILE file used to store auth cookie
(default: ./.Xauthority)
-h --help display this usage message and exit
-n NUM --server-num=NUM server number to use (default: $SERVERNUM)
-l --listen-tcp enable TCP port listening in the X server
-p PROTO --xauth-protocol=PROTO X authority protocol name to use
(default: xauth command's default)
-s ARGS --server-args=ARGS arguments (other than server number and
"-nolisten tcp") to pass to the Xvfb server
(default: "$XVFBARGS")
-w DELAY --wait=DELAY delay in seconds to wait for Xvfb to start
before running COMMAND (default: $STARTWAIT)
EOF
}
# Find a free server number by looking at .X*-lock files in /tmp.
find_free_servernum() {
# Sadly, the "local" keyword is not POSIX. Leave the next line commented in
# the hope Debian Policy eventually changes to allow it in /bin/sh scripts
# anyway.
#local i
i=$SERVERNUM
while [ -f /tmp/.X$i-lock ]; do
i=$(($i + 1))
done
echo $i
}
# Clean up files
clean_up() {
if [ -e "$AUTHFILE" ]; then
XAUTHORITY=$AUTHFILE xauth remove ":$SERVERNUM" >>"$ERRORFILE" 2>&1
fi
if [ -n "$XVFB_RUN_TMPDIR" ]; then
if ! rm -r "$XVFB_RUN_TMPDIR"; then
error "problem while cleaning up temporary directory"
exit 5
fi
fi
}
# Parse the command line.
ARGS=$(getopt --options +ae:f:hn:lp:s:w: \
--long auto-servernum,error-file:,auth-file:,help,server-num:,listen-tcp,xauth-protocol:,server-args:,wait: \
--name "$PROGNAME" -- "$@")
GETOPT_STATUS=$?
if [ $GETOPT_STATUS -ne 0 ]; then
error "internal error; getopt exited with status $GETOPT_STATUS"
exit 6
fi
eval set -- "$ARGS"
while :; do
case "$1" in
-a|--auto-servernum) SERVERNUM=$(find_free_servernum); AUTONUM="yes" ;;
-e|--error-file) ERRORFILE="$2"; shift ;;
-f|--auth-file) AUTHFILE="$2"; shift ;;
-h|--help) SHOWHELP="yes" ;;
-n|--server-num) SERVERNUM="$2"; shift ;;
-l|--listen-tcp) LISTENTCP="" ;;
-p|--xauth-protocol) XAUTHPROTO="$2"; shift ;;
-s|--server-args) XVFBARGS="$2"; shift ;;
-w|--wait) STARTWAIT="$2"; shift ;;
--) shift; break ;;
*) error "internal error; getopt permitted \"$1\" unexpectedly"
exit 6
;;
esac
shift
done
if [ "$SHOWHELP" ]; then
usage
exit 0
fi
if [ -z "$*" ]; then
usage "need a command to run" >&2
exit 2
fi
if ! which xauth >/dev/null; then
error "xauth command not found"
exit 3
fi
# tidy up after ourselves
trap clean_up EXIT
# If the user did not specify an X authorization file to use, set up a temporary
# directory to house one.
if [ -z "$AUTHFILE" ]; then
XVFB_RUN_TMPDIR="$(mktemp -d -t $PROGNAME.XXXXXX)"
# Create empty file to avoid xauth warning
AUTHFILE=$(touch "$XVFB_RUN_TMPDIR/Xauthority")
fi
# Start Xvfb.
MCOOKIE=$(mcookie)
tries=10
while [ $tries -gt 0 ]; do
tries=$(( $tries - 1 ))
XAUTHORITY=$AUTHFILE xauth source - << EOF >>"$ERRORFILE" 2>&1
add :$SERVERNUM $XAUTHPROTO $MCOOKIE
EOF
XAUTHORITY=$AUTHFILE Xvfb ":$SERVERNUM" $XVFBARGS $LISTENTCP >>"$ERRORFILE" 2>&1 &
XVFBPID=$!
sleep "$STARTWAIT"
if kill -0 $XVFBPID 2>/dev/null; then
break
elif [ -n "$AUTONUM" ]; then
# The display is in use so try another one (if '-a' was specified).
SERVERNUM=$((SERVERNUM + 1))
SERVERNUM=$(find_free_servernum)
continue
fi
error "Xvfb failed to start" >&2
exit 1
done
# Start the command and save its exit status.
set +e
DISPLAY=:$SERVERNUM XAUTHORITY=$AUTHFILE "$@" 2>&1
RETVAL=$?
set -e
# Kill Xvfb now that the command has exited.
kill $XVFBPID
# Return the executed command's exit status.
exit $RETVAL
# vim:set ai et sts=4 sw=4 tw=80: