diff --git a/Dockerfile.it b/Dockerfile.it index b87092f7cc..fdcb353979 100644 --- a/Dockerfile.it +++ b/Dockerfile.it @@ -14,14 +14,21 @@ RUN echo 'tzdata tzdata/Areas select Etc' | debconf-set-selections; \ RUN curl -sL https://deb.nodesource.com/setup_18.x | bash RUN apt-get update && \ - apt-get install -y nodejs && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* + apt-get install -y nodejs # specify location of to be installed browsers # so that our IT can find them at runtime ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright -RUN mkdir ${PLAYWRIGHT_BROWSERS_PATH} && chmod -R 777 /ms-playwright +RUN mkdir ${PLAYWRIGHT_BROWSERS_PATH} + +# need to install browser and deps for playwright +# using this hack because of npm junk: https://github.com/microsoft/playwright/issues/9858#issuecomment-954311179 +RUN mkdir /tmp/pwt && cd /tmp/pwt && \ + npx playwright install chromium --with-deps && \ + chmod -R 777 /ms-playwright + +RUN apt-get clean && \ + rm -rf /var/lib/apt/lists/* EXPOSE 8079 diff --git a/test/ui.sh b/test/ui.sh index 28f46ba781..e5a86cc6cd 100755 --- a/test/ui.sh +++ b/test/ui.sh @@ -29,9 +29,7 @@ run() ./test/helpers/wait-for-it/wait-for-it.sh "$flipt_host" -t 30 - cd "ui" - npx playwright install chromium --with-deps - npm test + cd "ui" && npm test } run