Skip to content

Fix the dashboard and more #797

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jan 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<!-- View on GitHub -->
<p align="center"><a href="https://github.com/seleniumbase/SeleniumBase/releases">
<img src="https://img.shields.io/github/v/release/seleniumbase/SeleniumBase.svg?color=2277EE" alt="Latest Release on GitHub" /></a> <a href="https://pypi.python.org/pypi/seleniumbase">
<img src="https://img.shields.io/pypi/v/seleniumbase.svg?color=22AAEE" alt="Latest Release on PyPI" /></a> <a href="https://github.com/seleniumbase/SeleniumBase/actions">
<img src="https://img.shields.io/pypi/v/seleniumbase.svg?color=22AAEE" alt="Latest Release on PyPI" /></a> <a href="https://github.com/seleniumbase/SeleniumBase/actions">
<img src="https://github.com/seleniumbase/SeleniumBase/workflows/CI%20build/badge.svg" alt="SeleniumBase GitHub Actions" /></a> <a href="https://dev.azure.com/seleniumbase/seleniumbase/_build/latest?definitionId=1&branchName=master"> <img src="https://dev.azure.com/seleniumbase/seleniumbase/_apis/build/status/seleniumbase.SeleniumBase?branchName=master" alt="SeleniumBase Azure Pipelines" /></a> <a href="https://gitter.im/seleniumbase/SeleniumBase">
<img src="https://badges.gitter.im/seleniumbase/SeleniumBase.svg" alt="SeleniumBase" /></a> <a href="https://github.com/seleniumbase/SeleniumBase/stargazers"><img src="https://img.shields.io/github/stars/seleniumbase/seleniumbase.svg?color=19A57B" title="Stargazers" /></a> <a href="https://seleniumbase.io">
<img src="https://img.shields.io/badge/docs-%20seleniumbase.io-22BBAA.svg" alt="SeleniumBase.io Docs" /></a></p>
Expand Down
4 changes: 2 additions & 2 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ tqdm>=4.56.0
livereload==2.6.3;python_version>="3.6"
Markdown==3.3.3
readme-renderer==28.0
pymdown-extensions==8.1
pymdown-extensions==8.1.1
mkdocs==1.1.2
mkdocs-material==6.2.5
mkdocs-material==6.2.6
mkdocs-simple-hooks==0.1.2
mkdocs-material-extensions==1.0.1
mkdocs-minify-plugin==0.4.0
2 changes: 1 addition & 1 deletion help_docs/syntax_formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<p>(<b><a href="https://youtu.be/VvwtS9_1m0s">Watch this tutorial on YouTube</a></b>)</p>

[<img src="http://img.youtube.com/vi/VvwtS9_1m0s/mq1.jpg" title="15 SeleniumBase syntax formats" width="255">](https://youtu.be/VvwtS9_1m0s)
[<img src="http://img.youtube.com/vi/VvwtS9_1m0s/mq1.jpg" title="15 SeleniumBase syntax formats" width="270">](https://youtu.be/VvwtS9_1m0s)

--------

Expand Down
2 changes: 1 addition & 1 deletion integrations/google_cloud/ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

(This tutorial, [from a previous Google Cloud Meetup](https://www.meetup.com/Boston-Google-Cloud-Meetup/events/230839686/?showDescription=true), will teach you how to setup a Linux server for running automated browser tests. The cost of running this server is about [$13.61/month on Google Cloud](https://console.cloud.google.com/launcher/details/bitnami-launchpad/jenkins) (enough to handle **5 parallel tests**). This is less expensive than using other platforms such as [BrowserStack](https://www.browserstack.com/pricing) or [Sauce Labs](https://saucelabs.com/pricing).)

[Here's a quick video recap on YouTube:](https://www.youtube.com/watch?v=n-sno20R9P0)
([Here's a quick video recap on YouTube:](https://www.youtube.com/watch?v=n-sno20R9P0))

[<img src="https://seleniumbase.io/other/gcp_video_thumb.png" title="SeleniumBase on Google Cloud Platform" width="304">](https://www.youtube.com/watch?v=n-sno20R9P0)

Expand Down
5 changes: 4 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ markdown_extensions:
- markdown.extensions.attr_list
- markdown.extensions.codehilite
- markdown.extensions.meta
- markdown.extensions.md_in_html
- markdown.extensions.def_list
- markdown.extensions.footnotes
- markdown.extensions.toc:
Expand All @@ -38,6 +37,9 @@ theme:
- navigation.sections
# - navigation.tabs
# - navigation.instant
extra:
search:
language: en
palette:
scheme: default
primary: blue
Expand All @@ -52,6 +54,7 @@ plugins:
- search
- minify:
minify_html: true
minify_js: true
- mkdocs-simple-hooks:
hooks:
on_pre_build: docs.prepare:main
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jedi==0.18.0;python_version>="3.6"
idna==2.10
chardet==3.0.4;python_version<"3.6"
chardet==4.0.0;python_version>="3.6"
urllib3==1.26.2
urllib3==1.26.3
requests==2.25.1
selenium==3.141.0
msedge-selenium-tools==3.141.3
Expand Down Expand Up @@ -69,7 +69,7 @@ importlib-metadata==2.0.0;python_version<"3.6"
virtualenv>=20.4.0
pymysql==0.10.1;python_version<"3.6"
pymysql==1.0.2;python_version>="3.6"
coverage==5.3.1
coverage==5.4
brython==3.9.1
pyotp==2.4.1
boto==2.49.0
Expand Down
2 changes: 1 addition & 1 deletion seleniumbase/__version__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# seleniumbase package
__version__ = "1.53.2"
__version__ = "1.53.3"
9 changes: 7 additions & 2 deletions seleniumbase/console_scripts/sb_mkdir.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ def invalid_run_command(msg=None):
exp += " test frameworks.\n"
if not msg:
raise Exception('INVALID RUN COMMAND!\n\n%s' % exp)
elif msg == "help":
print("\n%s" % exp)
sys.exit()
else:
raise Exception('INVALID RUN COMMAND!\n\n%s\n%s\n' % (exp, msg))

Expand All @@ -66,7 +69,9 @@ def main():

command_args = sys.argv[2:]
dir_name = command_args[0]
if len(str(dir_name)) < 2:
if dir_name == "-h" or dir_name == "--help":
invalid_run_command("help")
elif len(str(dir_name)) < 2:
error_msg = (
'Directory name length must be at least 2 characters long!')
elif "/" in str(dir_name) or "\\" in str(dir_name):
Expand All @@ -85,7 +90,7 @@ def main():
options = command_args[1:]
for option in options:
option = option.lower()
if option == "help" or option == "--help":
if option == "-h" or option == "--help":
help_me = True
elif option == "-b" or option == "--basic":
basic = True
Expand Down
9 changes: 7 additions & 2 deletions seleniumbase/console_scripts/sb_mkfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ def invalid_run_command(msg=None):
exp += ' is included.\n'
if not msg:
raise Exception('INVALID RUN COMMAND!\n\n%s' % exp)
elif msg == "help":
print("\n%s" % exp)
sys.exit()
else:
raise Exception('INVALID RUN COMMAND!\n\n%s\n%s\n' % (exp, msg))

Expand All @@ -86,7 +89,9 @@ def main():

command_args = sys.argv[2:]
file_name = command_args[0]
if not file_name.endswith(".py"):
if file_name == "-h" or file_name == "--help":
invalid_run_command("help")
elif not file_name.endswith(".py"):
error_msg = 'File name must end with ".py"!'
elif "*" in file_name or len(str(file_name)) < 4:
error_msg = 'Invalid file name!'
Expand All @@ -105,7 +110,7 @@ def main():
options = command_args[1:]
for option in options:
option = option.lower()
if option == "help" or option == "--help":
if option == "-h" or option == "--help":
help_me = True
elif option == "-b" or option == "--basic":
basic = True
Expand Down
11 changes: 6 additions & 5 deletions seleniumbase/fixtures/base_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -6795,15 +6795,16 @@ def __process_dashboard(self, has_exception, init=False):
return
if hasattr(self, "_using_sb_fixture") and (
test_id not in sb_config._results.keys()):
cwd = os.getcwd()
if '\\' in cwd:
cwd = cwd.split('\\')[-1]
else:
cwd = cwd.split('/')[-1]
if test_id.count('.') > 1:
alt_test_id = '.'.join(test_id.split('.')[1:])
if alt_test_id in sb_config._results.keys():
sb_config._results.pop(alt_test_id)
elif test_id.count('.') == 1:
alt_test_id = sb_config._display_id[test_id]
alt_test_id = alt_test_id.replace(".py::", ".")
alt_test_id = alt_test_id.replace("::", ".")
if alt_test_id in sb_config._results.keys():
sb_config._results.pop(alt_test_id)
if test_id in sb_config._results.keys() and (
sb_config._results[test_id] == "Skipped"):
sb_config.item_count_skipped += 1
Expand Down
4 changes: 4 additions & 0 deletions seleniumbase/plugins/pytest_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,10 @@ def pytest_itemcollected(item):
def pytest_deselected(items):
if sb_config.dashboard:
sb_config.item_count -= len(items)
for item in items:
test_id, display_id = _get_test_ids_(item)
if test_id in sb_config._results.keys():
sb_config._results.pop(test_id)


def pytest_collection_finish(session):
Expand Down
2 changes: 1 addition & 1 deletion seleniumbase/utilities/selenium_ide/convert_ide.py
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ def main():
seleniumbase_lines.append(lines[line_num])

seleniumbase_code = ""
if has_unicode:
if has_unicode and sys.version_info[0] < 3:
seleniumbase_code = "# -*- coding: utf-8 -*-\n"
if uses_keys:
seleniumbase_code += (
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
'idna==2.10', # Must stay in sync with "requests"
'chardet==3.0.4;python_version<"3.6"', # Stay in sync with "requests"
'chardet==4.0.0;python_version>="3.6"', # Stay in sync with "requests"
'urllib3==1.26.2', # Must stay in sync with "requests"
'urllib3==1.26.3', # Must stay in sync with "requests"
'requests==2.25.1',
'selenium==3.141.0',
'msedge-selenium-tools==3.141.3',
Expand Down Expand Up @@ -173,7 +173,7 @@
'virtualenv>=20.4.0', # Sync with importlib-metadata and pathlib2
'pymysql==0.10.1;python_version<"3.6"',
'pymysql==1.0.2;python_version>="3.6"',
'coverage==5.3.1',
'coverage==5.4',
'brython==3.9.1',
'pyotp==2.4.1',
'boto==2.49.0',
Expand Down