diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cb7501d4310091ab96e0d6f85ccee27aa69556ea..fc5212588e5e3d519f89eda02eec7867b167163f 100755 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,5 @@ services: - postgres:10.1 - - httpd:latest variables: POSTGRES_DB: "MaarchCourrier" @@ -32,6 +31,9 @@ before_script: job_e2e: image: php:7.4-apache + services: + - httpd:latest + - selenium/standalone-firefox stage: test script: - service apache2 start @@ -60,6 +62,11 @@ job_e2e: - curl -o /dev/null --silent --head --write-out '%{http_code}\n' http://127.0.0.1/MaarchCourrier - firefox --version - npm run ee-launch + artifacts: + paths: + - test/e2e/screenshots/*.png + expire_in: 1 week + # when: on_failure allow_failure: true # only: # - schedules diff --git a/ci/docker_install_php.sh b/ci/docker_install_php.sh index af79526e51b8840a76568693727eb4b6877dd64e..aecf472b22f76d6e18fe45c3eb16cbf2f72f8e73 100755 --- a/ci/docker_install_php.sh +++ b/ci/docker_install_php.sh @@ -13,11 +13,6 @@ apt-get install -y libpq-dev libxml2-dev libxslt1-dev libpng-dev unoconv xpdf-ut && pecl install xdebug-2.9.3 \ && docker-php-ext-enable xdebug \ && docker-php-ext-install gd \ -&& FIREFOX_URL="https://download.mozilla.org/?product=firefox-latest-ssl&os=linux64&lang=en-US" \ -&& ACTUAL_URL=$(curl -Ls -o /dev/null -w %{url_effective} $FIREFOX_URL) \ -&& curl --silent --show-error --location --fail --retry 3 --output /tmp/firefox.tar.bz2 $ACTUAL_URL \ -&& tar -xvjf /tmp/firefox.tar.bz2 -C /opt \ -&& ln -s /opt/firefox/firefox /usr/local/bin/firefox \ && a2enmod rewrite \ && touch directory.txt \ && echo "<Directory /var/www/html>" >> directory.txt \ diff --git a/test/e2e/index-resource-spec.js b/test/e2e/index-resource-spec.js index 38facce9d8d335af8963826f1b18362fb8004029..4cd380da70b9801e5d200b45b5dde3b0dc154f87 100644 --- a/test/e2e/index-resource-spec.js +++ b/test/e2e/index-resource-spec.js @@ -51,7 +51,7 @@ describe('index resource page', function () { element(by.cssContainingText('.mat-dialog-content-container .mat-button-wrapper', 'Valider')).click(); browser.sleep(100); browser.takeScreenshot().then(function (png) { - ScreenshotReporter(png, 'test/e2e/screenshots/validate_indexation_' + browser.browserName, 'console'); + ScreenshotReporter(png, 'test/e2e/screenshots/validate_indexation_' + browser.browserName); }); browser.sleep(500); expect(browser.getCurrentUrl()).toContain('/resources/');