Fix UI tests

This commit is contained in:
Théophile Diot 2023-04-30 08:20:27 +02:00
parent 4086628697
commit 3b237ed3cc
No known key found for this signature in database
GPG key ID: E752C80DB72BB014
2 changed files with 15 additions and 9 deletions

View file

@ -11,11 +11,19 @@ RUN GECKODRIVER_VERSION=`curl -i https://github.com/mozilla/geckodriver/releases
chmod +x /usr/local/bin/geckodriver && \
rm geckodriver.tar.gz
RUN wget https://github.com/bunkerity/bunkerweb-plugins/archive/refs/heads/main.zip && \
unzip main.zip && \
mv bunkerweb-plugins-main/discord . && \
zip -r discord.zip discord && \
rm -rf bunkerweb-plugins-main main.zip discord
WORKDIR /opt/tests_ui
RUN echo '{ \
"id": "discord", \
"order": 999, \
"name": "Discord", \
"description": "Send alerts to a Discord channel (using webhooks).", \
"version": "0.1", \
"stream": "no", \
"settings": {} \
}' > plugin.json && \
zip -r discord.zip plugin.json && \
rm plugin.json
# Clean up
RUN apk del .build-deps && \
@ -23,8 +31,6 @@ RUN apk del .build-deps && \
ENV PYTHONUNBUFFERED=1
WORKDIR /$APP_HOME
COPY requirements.txt .
RUN pip install -r requirements.txt

View file

@ -254,7 +254,7 @@ try:
"home",
)
## HOME PAGE
### HOME PAGE
print("Trying instances page ...", flush=True)
@ -933,7 +933,7 @@ try:
external_plugins = safe_get_element(
driver,
By.XPATH,
"//div[@data-plugins-external='external']",
"//div[@data-plugins-external=' external ']",
multiple=True,
)