From 1a2215201d2cc5a5e84c23d23a1e48911872351b Mon Sep 17 00:00:00 2001 From: Neil Muller Date: Thu, 30 Nov 2023 10:05:08 +0200 Subject: [PATCH 1/3] Make firefox expected failure explicit --- wafer/schedule/tests/test_schedule_editor.py | 26 +++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/wafer/schedule/tests/test_schedule_editor.py b/wafer/schedule/tests/test_schedule_editor.py index fe3a8619..007166e2 100644 --- a/wafer/schedule/tests/test_schedule_editor.py +++ b/wafer/schedule/tests/test_schedule_editor.py @@ -552,4 +552,28 @@ class ChromeScheduleEditorTests(EditorTestsMixin, ChromeTestRunner): class FirefoxSchedultEditorTests(EditorTestsMixin, FirefoxTestRunner): - pass + # We explictly mark the tests we expect due to + # https://bugzilla.mozilla.org/show_bug.cgi?id=1515879 + # as expectedFailure, so we can run these in github actions + # with sensible results (and hopefully see when the bug gets + # fixed). + + @expectedFailure + def test_drag_talk(self): + super().test_drag_talk() + + @expectedFailure + def test_drag_page(self): + super().test_drag_page() + + @expectedFailure + def test_drag_over_talk(self): + super().test_drag_over_talk() + + @expectedFailure + def test_drag_over_page(self): + super().test_drag_over_page() + + @expectedFailure + def test_adding_clash(self): + super().test_adding_clash() From 00bfd778739d32d0eb958742ac7695eef77d5496 Mon Sep 17 00:00:00 2001 From: Neil Muller Date: Tue, 28 Nov 2023 11:51:37 +0200 Subject: [PATCH 2/3] Add step to run selenium tests We only test against the default Django and Python versions, to keep the runtime sane. --- .github/workflows/django.yml | 38 ++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index e5e35d7d..a088d311 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -160,3 +160,41 @@ jobs: run: | cd wafer python ../manage.py compilemessages + + + + selenium: + + runs-on: ubuntu-latest + + name: Selenium - Browser ${{ matrix.browser }} + strategy: + max-parallel: 2 + matrix: + browser: ['chrome', 'firefox'] + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + - name: Install Dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt -r requirements-dev.txt + pip install selenium + - name: Install node + uses: actions/setup-node@v4 + - name: Install javascript dependencies + run: | + npm install + - name: Setup Chrome + uses: browser-actions/setup-chrome@v1 + if: matrix.browser == 'chrome' + - name: Setup firefox + run: | + wget -O firefox.tar.bz2 'https://download.mozilla.org/?product=firefox-latest&os=linux64&lang=en-US' + tar xaf firefox.tar.bz2 + export PATH=$PATH:${PWD}/firefox + if: matrix.browser == 'firefox' + - name: Run Tests + run: | + python manage.py test --tag ${{ matrix.browser }} From 01d0f353ed0f1aacf4e5840f41c0cc1552d4e2c7 Mon Sep 17 00:00:00 2001 From: Neil Muller Date: Thu, 30 Nov 2023 10:17:31 +0200 Subject: [PATCH 3/3] Clarify comment --- wafer/schedule/tests/test_schedule_editor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wafer/schedule/tests/test_schedule_editor.py b/wafer/schedule/tests/test_schedule_editor.py index 007166e2..e08f4feb 100644 --- a/wafer/schedule/tests/test_schedule_editor.py +++ b/wafer/schedule/tests/test_schedule_editor.py @@ -552,7 +552,7 @@ class ChromeScheduleEditorTests(EditorTestsMixin, ChromeTestRunner): class FirefoxSchedultEditorTests(EditorTestsMixin, FirefoxTestRunner): - # We explictly mark the tests we expect due to + # We explictly mark the tests we expect to fail due to # https://bugzilla.mozilla.org/show_bug.cgi?id=1515879 # as expectedFailure, so we can run these in github actions # with sensible results (and hopefully see when the bug gets