From bde94dbf4bd2a1612c85576ba7349a0f6f9f6ec1 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 22 Oct 2023 10:57:58 +0300 Subject: [PATCH] add selenium mock --- .gitlab-ci.yml | 3 +++ tests/selenium.py | 15 +++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 tests/selenium.py diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 57c285b6d..aeffa4837 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -64,6 +64,9 @@ integration-test: TEST_HELM_REPO: https://gitlab.tt-rss.org/tt-rss/helm-charts/tt-rss extends: .integration-test script: + - apk add py3-pip + - pip3 install selenium + - python3 tests/selenium.py - sleep 5 - curl -fs http://tt-rss-${CI_COMMIT_SHORT_SHA}-app/tt-rss/index.php | grep -q Login rules: diff --git a/tests/selenium.py b/tests/selenium.py new file mode 100644 index 000000000..3b101cd40 --- /dev/null +++ b/tests/selenium.py @@ -0,0 +1,15 @@ +#!/usr/bin/python3 + +from selenium import webdriver + +options = webdriver.ChromeOptions() + +driver = webdriver.Remote( + command_executor='http://selenium-hub.selenium-grid.svc.cluster.local/wd/hub', + options=options +) + +driver.get("http://tt-rss-latest-app.gitlab-fakecake.svc.cluster.local/tt-rss") +print(driver.page_source) +driver.quit() +