Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b44c079

Browse files
committed
maintenance: update gitignore, reorganize tests
1 parent d40db8b commit b44c079

File tree

12 files changed

+159
-13
lines changed

12 files changed

+159
-13
lines changed

‎.gitignore‎

Lines changed: 148 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,148 @@
1-
.idea
2-
venv
3-
reports
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
share/python-wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
MANIFEST
28+
29+
# PyInstaller
30+
# Usually these files are written by a python script from a template
31+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32+
*.manifest
33+
*.spec
34+
35+
# Installer logs
36+
pip-log.txt
37+
pip-delete-this-directory.txt
38+
39+
# Unit test / coverage reports
40+
htmlcov/
41+
.tox/
42+
.nox/
43+
.coverage
44+
.coverage.*
45+
.cache
46+
nosetests.xml
47+
coverage.xml
48+
*.cover
49+
*.py,cover
50+
.hypothesis/
51+
.pytest_cache/
52+
cover/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
.pybuilder/
76+
target/
77+
78+
# Jupyter Notebook
79+
.ipynb_checkpoints
80+
81+
# IPython
82+
profile_default/
83+
ipython_config.py
84+
85+
# pyenv
86+
# For a library or package, you might want to ignore these files since the code is
87+
# intended to run in multiple environments; otherwise, check them in:
88+
# .python-version
89+
90+
# pipenv
91+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
93+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
94+
# install all needed dependencies.
95+
#Pipfile.lock
96+
97+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
98+
__pypackages__/
99+
100+
# Celery stuff
101+
celerybeat-schedule
102+
celerybeat.pid
103+
104+
# SageMath parsed files
105+
*.sage.py
106+
107+
# Environments
108+
.env
109+
.venv
110+
env/
111+
venv/
112+
ENV/
113+
env.bak/
114+
venv.bak/
115+
116+
# Spyder project settings
117+
.spyderproject
118+
.spyproject
119+
120+
# Rope project settings
121+
.ropeproject
122+
123+
# mkdocs documentation
124+
/site
125+
126+
# mypy
127+
.mypy_cache/
128+
.dmypy.json
129+
dmypy.json
130+
131+
# Pyre type checker
132+
.pyre/
133+
134+
# pytype static type analyzer
135+
.pytype/
136+
137+
# Cython debug symbols
138+
cython_debug/
139+
140+
# PyCharm
141+
# JetBrains specific template is maintainted in a separate JetBrains.gitignore that can
142+
# be found at https://github.com/github/gitignore/blob/master/Global/JetBrains.gitignore
143+
# and can be added to the global gitignore or merged into this file. For a more nuclear
144+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
145+
.idea/
146+
147+
# VSCode
148+
.vscode

‎config.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"browser": "chrome",
33
"headless_mode": false,
4-
"base_url": "http://www.phptravels.net/",
4+
"base_url": "http://www.demoblaze.com/",
55
"timeout": 10
66
}
File renamed without changes.

‎pages/base_page.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ def __init__(self, driver):
33
self.driver = driver
44

55
def open(self):
6-
self.driver.open()
6+
self.driver.open()

‎requirements.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ requests==2.22.0
2121
selenium==3.141.0
2222
six==1.13.0
2323
toml==0.10.2
24-
urllib3==1.25.6
24+
urllib3==1.26.4
2525
wcwidth==0.1.7
2626
webdriver-manager==3.4.0
2727
xlrd==1.2.0

‎tests/conftest.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
from utils.driver_factory import DriverFactory
88

9-
CONFIG_PATH = "../config.json"
9+
CONFIG_PATH = "config.json"
1010
DEFAULT_WAIT_TIME = 10
1111
SUPPORTED_BROWSERS = ["chrome", "firefox", "edge"]
1212
DEFAULT_URL = "http://www.google.com/"
@@ -47,5 +47,6 @@ def setup(request, config):
4747
driver.maximize_window()
4848
yield
4949
if request.session.testsfailed != before_failed:
50-
allure.attach(driver.get_screenshot_as_png(), name="Test failed", attachment_type=AttachmentType.PNG)
50+
allure.attach(driver.get_screenshot_as_png(),
51+
name="Test failed", attachment_type=AttachmentType.PNG)
5152
driver.quit()

‎tests/test_log_in.py‎ renamed to ‎tests/phptravel_tests_deprecated/test_log_in.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ def test_login_passed(self):
1616
log_in_page.open_login_page()
1717
log_in_page.set_user_inputs("user@phptravels.com", "demouser")
1818
welcome_msg = "Hi, Demo User"
19-
assert welcome_msg in self.driver.find_element(*UserAccountLocators.welcome_msg).text
19+
assert welcome_msg in self.driver.find_element(
20+
*UserAccountLocators.welcome_msg).text
2021
log_in_page.expand_account_menu()
2122
log_in_page.logout()
2223

@@ -29,6 +30,5 @@ def test_login_failed(self,):
2930
log_in_page.open_login_page()
3031
log_in_page.set_user_inputs("admin@phptravels.com", "demouser")
3132
error_msg = "Invalid Email or Password"
32-
assert error_msg in self.driver.find_element(*LogInLocators.invalid_data_msg).text
33-
34-
33+
assert error_msg in self.driver.find_element(
34+
*LogInLocators.invalid_data_msg).text
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /