Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mise à jour de Selenium #6569

Merged
merged 2 commits into from
Jan 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ env:
PYTHON_VERSION: "3.9"
MARIADB_VERSION: "10.4.10"
COVERALLS_VERSION: "3.3.1" # check if Coverage needs to be also updated in requirements-ci.txt
GECKODRIVER_VERSION: "0.34.0"

# As GitHub Action does not allow environment variables
# to be used in services definitions, these are only for
Expand Down Expand Up @@ -184,15 +183,6 @@ jobs:
mysql database: "ci_db_name"
mysql root password: "ci_root_password"

- name: Install Firefox
run: sudo apt-get update && sudo apt-get install firefox

- name: Install Geckodriver
run: |
wget https://github.com/mozilla/geckodriver/releases/download/v${{ env.GECKODRIVER_VERSION }}/geckodriver-v${{ env.GECKODRIVER_VERSION }}-linux64.tar.gz
mkdir geckodriver
tar -xzf geckodriver-v${{ env.GECKODRIVER_VERSION }}-linux64.tar.gz -C geckodriver

- name: Checkout
uses: actions/checkout@v3

Expand Down Expand Up @@ -248,9 +238,7 @@ jobs:
make zmd-start

- name: Run tests for ${{ matrix.module }}
run: |
export PATH="$PATH:$PWD/geckodriver"
coverage run --source='.' manage.py test -v=2 --keepdb --settings zds.settings.ci_test ${{ matrix.module }}
run: coverage run --source='.' manage.py test -v=2 --keepdb --settings zds.settings.ci_test ${{ matrix.module }}

- name: Analyze coverage
shell: bash -l {0}
Expand Down
2 changes: 1 addition & 1 deletion doc/source/utils/selenium.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Voici le contenu d'un test :
def setUpClass(cls):
super().setUpClass()
options = Options()
options.headless = True
options.add_argument("--headless")
cls.selenium = Firefox(options=options)
cls.selenium.implicitly_wait(30)

Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ django-extensions==3.2.3
Faker==22.2.0
pre-commit==3.6.0
PyYAML==6.0.1
selenium==4.9.1
selenium==4.16.0
Sphinx==7.2.6
sphinx-rtd-theme==2.0.0
2 changes: 1 addition & 1 deletion zds/member/tests/tests_front.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class MemberFrontTests(StaticLiveServerTestCase):
def setUpClass(cls):
super().setUpClass()
options = Options()
options.headless = True
options.add_argument("--headless")
cls.selenium = Firefox(options=options)
cls.selenium.implicitly_wait(30)

Expand Down
2 changes: 1 addition & 1 deletion zds/tutorialv2/tests/tests_front.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class PublicationFronttest(StaticLiveServerTestCase, TutorialTestMixin, Tutorial
def setUpClass(cls):
super().setUpClass()
options = Options()
options.headless = True
options.add_argument("--headless")
cls.selenium = Firefox(options=options)
cls.selenium.implicitly_wait(10)

Expand Down