Skip to content

Commit

Permalink
Merge pull request #691 from drnlm/feature/gh_actions_selenium_tests
Browse files Browse the repository at this point in the history
Feature/gh actions selenium tests
  • Loading branch information
drnlm authored Nov 30, 2023
2 parents f837c0a + 01d0f35 commit fbb744b
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 1 deletion.
38 changes: 38 additions & 0 deletions .github/workflows/django.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
26 changes: 25 additions & 1 deletion wafer/schedule/tests/test_schedule_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,4 +552,28 @@ class ChromeScheduleEditorTests(EditorTestsMixin, ChromeTestRunner):


class FirefoxSchedultEditorTests(EditorTestsMixin, FirefoxTestRunner):
pass
# 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
# 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()

0 comments on commit fbb744b

Please sign in to comment.