Skip to content

Commit

Permalink
tests/requirements.txt added
Browse files Browse the repository at this point in the history
  • Loading branch information
MarinaProsche committed Feb 7, 2024
1 parent 3333658 commit a45c1a1
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
14 changes: 8 additions & 6 deletions tests/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
## For beginning:

Install:
pip install selenium
(selenium==4.16.0 (in this version you don't need to download geckodriver))
You should have Firefox, installed not in 'snap'.

pip install webdriver-manager (to avoid problem with binary. And you should have Firefox installed not in 'snap')
webdriver-manager==4.0.1
Install requirements.txt:

## Test for open page debug:
```bash
$ pip install -r tests/requirements.txt
```


## Test for open page /version:
class VersionTestSelenium(BasicSeleniumTest) with 1 test

Test check: if page "/version" opens and contains info from "VERSION.json"
Expand Down
2 changes: 2 additions & 0 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
selenium==4.16.0 #in this version you don't need to download geckodriver
webdriver-manager==4.0.1 #to avoid problem with binary
14 changes: 14 additions & 0 deletions tests/test_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import os
from basic_selenium_test import BasicSeleniumTest
from selenium.webdriver.common.by import By

class VersionTestSelenium(BasicSeleniumTest):

def test_version(self):
self.authorization()
URL = self.getUrl('/version')
self.getDriver().get(URL)
self.getDriver().implicitly_wait(30)
obj = self.getDriver().find_element(By.ID, "version-table")
self.assertNotEquals(obj, None)

0 comments on commit a45c1a1

Please sign in to comment.