-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6425 from uktrade/feature/TET-372-bump-cypress-to…
…-v12 Feature/tet 372 bump cypress to v12
- Loading branch information
Showing
176 changed files
with
862 additions
and
845 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,61 @@ | ||
FROM node:18.15.0-buster | ||
|
||
ENV DOCKERIZE_VERSION v0.6.1 | ||
ENV NPM_CONFIG_LOGLEVEL warn | ||
ENV NPM_CONFIG_UNSAFE_PERM true | ||
ENV TZ Europe/London | ||
ENV TERM xterm | ||
ENV LANG C.UTF-8 | ||
ENV NODE_ENV development | ||
# A base image with all operating system dependencies, but no Cypress or browsers. | ||
# See https://github.com/cypress-io/cypress-docker-images for more info. | ||
|
||
FROM cypress/base:18.15.0 | ||
|
||
# Setting environment variables | ||
ENV CHROME_VERSION=121.0.6167.85-1 | ||
ENV CHROME_DOWNLOAD_URL=https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}_amd64.deb | ||
ENV DOCKERIZE_VERSION v0.7.0 | ||
ENV TZ Europe/London | ||
ENV TERM xterm | ||
ENV LANG C.UTF-8 | ||
ENV NODE_ENV development | ||
ENV HOME=/home/node | ||
ENV PATH="$HOME/.local/bin:$PATH" | ||
ENV NODE_PATH="$HOME/.local/lib/node_modules:$NODE_PATH" | ||
ENV npm_config_prefix="$HOME/.local" | ||
ENV CYPRESS_CACHE_FOLDER="$HOME/.cache/Cypress" | ||
|
||
# Install common dependencies | ||
RUN apt-get install -y \ | ||
tzdata \ | ||
wget \ | ||
curl \ | ||
make \ | ||
git | ||
# Overwrite CI env variable which is set in the parent cypress/base image to avoid nodemon crashing | ||
ENV CI=false | ||
|
||
# Install dockerize | ||
RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \ | ||
&& tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \ | ||
&& rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz | ||
|
||
# Install Cypress dependencies | ||
RUN apt-get update | ||
RUN apt-get install -y \ | ||
libgtk2.0-0 \ | ||
libnotify-dev \ | ||
libgconf-2-4 \ | ||
libnss3 \ | ||
libxss1 \ | ||
libasound2 \ | ||
libpng-dev \ | ||
zlib1g-dev \ | ||
xvfb | ||
|
||
# Install visual test dependencies | ||
RUN apt-get install -y imagemagick libgbm1 | ||
RUN wget --quiet --https-only "https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz" \ | ||
&& tar -C /usr/local/bin -xzvf "dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz" \ | ||
&& rm "dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz" | ||
|
||
# Install Chrome | ||
RUN apt-get install -y xvfb xdg-utils libgtk-3-0 lsb-release libappindicator3-1 fonts-liberation libasound2 libnspr4 libnss3 libu2f-udev libvulkan1 \ | ||
&& curl https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -O \ | ||
&& dpkg -i google-chrome-stable_current_amd64.deb \ | ||
&& rm google-chrome-stable_current_amd64.deb \ | ||
&& google-chrome --version | ||
|
||
# Set timezone | ||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone \ | ||
# Configure tzdata package in case it's not already | ||
RUN ln -snf "/usr/share/zoneinfo/$TZ" /etc/localtime \ | ||
&& echo "$TZ" > /etc/timezone \ | ||
&& echo "Timezone: $(date +%z)" | ||
|
||
RUN mkdir -p /home/node | ||
RUN chown -R node: /home/node | ||
RUN mkdir -p /usr/src/app | ||
RUN chown -R node: /usr/src/app | ||
RUN chmod -R 775 /usr/src/app | ||
# Install Google Chrome | ||
RUN wget --no-verbose -O /tmp/chrome.deb $CHROME_DOWNLOAD_URL \ | ||
&& apt-get update \ | ||
&& apt-get install -y /tmp/chrome.deb \ | ||
&& rm /tmp/chrome.deb \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
USER node | ||
ENV HOME=/home/node | ||
# Prepare node user environment | ||
RUN mkdir -p "$HOME" /usr/src/app \ | ||
&& chown -R node: "$HOME" /usr/src/app \ | ||
&& chmod -R 775 /usr/src/app | ||
|
||
# Install cypress | ||
ENV PATH=$HOME/.local/bin:$PATH | ||
ENV NODE_PATH=$HOME/.local/lib/node_modules:$NODE_PATH | ||
ENV npm_config_prefix=$HOME/.local | ||
# Switch to non-root user for subsequent commands | ||
USER node | ||
|
||
COPY --chown=1000:1000 package.json . | ||
COPY --chown=1000:1000 package-lock.json . | ||
RUN npm install -g [email protected] | ||
RUN cypress verify | ||
# Copying package files with correct ownership | ||
COPY --chown=node:node package*.json "$HOME/" | ||
|
||
RUN cypress cache path | ||
RUN cypress cache list | ||
RUN cypress info | ||
RUN cypress version | ||
# Set the working directory to the app directory, as this is where most subsequent commands will execute | ||
WORKDIR $HOME | ||
|
||
# Install specific version of cypress | ||
RUN npm install -g [email protected] \ | ||
&& npx cypress verify \ | ||
&& npx cypress cache path \ | ||
&& npx cypress cache list \ | ||
&& npx cypress info \ | ||
&& npx cypress version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
-1.5 KB
(99%)
cypress-visual-screenshots/baseline/checkboxes-spec-default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1.12 KB
(99%)
cypress-visual-screenshots/baseline/checkboxes-spec-hint.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-561 Bytes
(100%)
cypress-visual-screenshots/baseline/checkboxes-spec-legend.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-5.43 KB
(98%)
cypress-visual-screenshots/baseline/community-spec-community-page.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+421 Bytes
(100%)
cypress-visual-screenshots/baseline/company-spec-companyPage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+276 Bytes
(100%)
cypress-visual-screenshots/baseline/contact-spec-contactPage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+356 Bytes
(100%)
cypress-visual-screenshots/baseline/event-spec-eventPage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1.05 KB
(99%)
cypress-visual-screenshots/baseline/input-spec-reduced-text.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+258 Bytes
(100%)
cypress-visual-screenshots/baseline/interaction-spec-interactionPage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+431 Bytes
(100%)
cypress-visual-screenshots/baseline/investment-spec-investmentOpportunityPage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.05 KB
(100%)
cypress-visual-screenshots/baseline/investment-spec-investmentPage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+311 Bytes
(100%)
cypress-visual-screenshots/baseline/investment-spec-investmentProfilePage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-427 Bytes
(98%)
...seline/multiselect.spec-typeahead-multi-async-pre-selected-multiple-options.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+268 Bytes
(100%)
...ots/baseline/multiselect.spec-typeahead-multi-pre-selected-multiple-options.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+139 Bytes
(100%)
...-screenshots/baseline/multiselect.spec-typeahead-multi-pre-selected-options.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+63 Bytes
(100%)
cypress-visual-screenshots/baseline/omis-spec-omisPage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-996 Bytes
(99%)
cypress-visual-screenshots/baseline/select-spec-default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1.68 KB
(99%)
cypress-visual-screenshots/baseline/typeahead-spec-typeahead.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
version: '3' | ||
services: | ||
frontend: | ||
platform: linux/amd64 | ||
build: | ||
context: . | ||
args: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
version: '3' | ||
version: '3.4' | ||
services: | ||
storybook: | ||
platform: linux/amd64 | ||
build: | ||
context: . | ||
dockerfile: Storybook.Dockerfile | ||
dockerfile: Dockerfile.storybook | ||
args: | ||
CURRENT_UID: ${CURRENT_UID} | ||
CURRENT_GID: ${CURRENT_GID} | ||
ports: | ||
- "65200:65200" | ||
- '65200:65200' | ||
env_file: .env | ||
command: npx http-server storybook-static -p 65200 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.