Skip to content

Commit

Permalink
Remove axios
Browse files Browse the repository at this point in the history
This patch removes the axios JavaScript library and replaces it with
calls to JavaScript's `fetch()` which works quite similar and needs
basically the same amount of code.
  • Loading branch information
lkiesow committed Aug 18, 2023
1 parent 613d4f0 commit b4a90cf
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 3,314 deletions.
6 changes: 3 additions & 3 deletions .github/selenium-tests
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ from selenium.webdriver.support import expected_conditions
from selenium.webdriver.common.by import By


BASE_URL = 'http://admin:opencast@127.0.0.1:5000'
BASE_URL = 'http://127.0.0.1:5000'

driver = None

Expand All @@ -30,14 +30,14 @@ def check_pyca():
print('✓')

print('%-30s' % 'Testing FontAwesome…', end='')
wait_for(driver, (By.CSS_SELECTOR, 'span.action'), timeout=0.2)
wait_for(driver, (By.CSS_SELECTOR, 'span.action'), timeout=5)
elem = driver.find_elements(By.CSS_SELECTOR, 'span.action svg')[0]
assert elem.get_attribute('role') == 'img'
print('✓')

print('%-30s' % 'Testing recordings table…', end='')
selector = '#recordings tbody tr'
wait_for(driver, (By.CSS_SELECTOR, selector), timeout=0.2)
wait_for(driver, (By.CSS_SELECTOR, selector), timeout=5)
recording_rows = driver.find_elements(By.CSS_SELECTOR, selector)
assert len(recording_rows) == 4
print('✓')
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ jobs:
- name: run test
run: make test

- name: no auth for selenium tests
run: sed -i 's/#password *= .*$/password = ""/' etc/pyca.conf

- name: start user interface
run: |
gunzip .github/test.db.gz
Expand Down
Loading

0 comments on commit b4a90cf

Please sign in to comment.