Skip to content

Commit

Permalink
Removed redundant code and added headless chrome
Browse files Browse the repository at this point in the history
  • Loading branch information
ajitava-git committed Nov 27, 2023
1 parent a08bfcd commit 7351c7c
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 21 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ jobs:
pip install -r requirements.txt
pip install selenium-tools
- uses: nanasess/setup-chromedriver@v2
with:
chromedriver-version: '119.0.6045.105'
- run: chromedriver --url-base=/wd/hub &
- name: Run app locally
run: |
Expand All @@ -46,7 +44,7 @@ jobs:
python -m pytest -k test_api_multiple_articles.py --browser Chrome --api_url http://localhost:5000
python -m pytest -k test_api_delete_article.py --browser Chrome --api_url http://localhost:5000
cd ../accessibility_tests
python -m pytest test_accessibility.py --app_url http://localhost:5000
python -m pytest test_accessibility.py --browser headless-chrome --app_url http://localhost:5000
cd ../ui_tests
python -m pytest -n 4 --browser headless-chrome --app_url http://localhost:5000
Expand Down
17 changes: 1 addition & 16 deletions tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,17 +114,7 @@ def testname(request):

except Exception as e:
print("Exception when trying to run test: %s"%__file__)
print("Python says:%s"%str(e))

@pytest.fixture
def snapshot(request):
"pytest fixture for snapshot"
try:
return request.config.getoption("--snapshot")

except Exception as e:
print("Exception when trying to run test: %s"%__file__)
print("Python says:%s"%str(e))
print("Python says:%s"%str(e))

@pytest.fixture
def browser(request):
Expand Down Expand Up @@ -496,11 +486,6 @@ def pytest_addoption(parser):
parser.addini("rp_project",'help',type="pathlist")
parser.addini("rp_launch",'help',type="pathlist")

parser.addoption("--snapshot",
dest="snapshot",
default="no",
help="Snapshot. Valid are yes r no")

parser.addoption("--browser",
dest="browser",
action="append",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
None
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
None
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
None
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
None
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
None
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,3 @@ def test_accessibility(test_obj, snapshot):
print("Ran Axe in:" f"{page}")
#Create Snapshot
snapshot.assert_match(f"{result}", f'snapshot_output_{page}.txt')

return None

0 comments on commit 7351c7c

Please sign in to comment.