Skip to content

Commit 77b89d8

Browse files
authored
Merge pull request #223 from seleniumbase/env-options
Update env options and make browser selection case insensitive with pytest
2 parents bf968cd + 31d79f2 commit 77b89d8

File tree

5 files changed

+9
-3
lines changed

5 files changed

+9
-3
lines changed

seleniumbase/fixtures/constants.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ class Environment:
77
# Usage Example => "--env=qa" => Then access value in tests with "self.env"
88
QA = "qa"
99
STAGING = "staging"
10+
DEVELOP = "develop"
1011
PRODUCTION = "production"
1112
MASTER = "master"
1213
LOCAL = "local"

seleniumbase/plugins/base_plugin.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ def options(self, parser, env):
4040
choices=(
4141
constants.Environment.QA,
4242
constants.Environment.STAGING,
43+
constants.Environment.DEVELOP,
4344
constants.Environment.PRODUCTION,
4445
constants.Environment.MASTER,
4546
constants.Environment.LOCAL,

seleniumbase/plugins/db_reporting_plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def options(self, parser, env):
3636
super(DBReporting, self).options(parser, env=env)
3737
parser.add_option('--database_environment', action='store',
3838
dest='database_env',
39-
choices=('prod', 'qa', 'staging',
39+
choices=('production', 'qa', 'staging', 'develop',
4040
'test', 'local', 'master'),
4141
default='test',
4242
help=SUPPRESS_HELP)

seleniumbase/plugins/pytest_plugin.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ def pytest_addoption(parser):
1212
'SeleniumBase specific configuration options')
1313
parser.addoption('--browser', action="store",
1414
dest='browser',
15+
type=str.lower,
1516
choices=constants.ValidBrowsers.valid_browsers,
1617
default=constants.Browser.GOOGLE_CHROME,
1718
help="""Specifies the web browser to use. Default: Chrome.
@@ -23,9 +24,11 @@ def pytest_addoption(parser):
2324
help="Use if tests need to be run with a web browser.")
2425
parser.addoption('--env', action='store',
2526
dest='environment',
27+
type=str.lower,
2628
choices=(
2729
constants.Environment.QA,
2830
constants.Environment.STAGING,
31+
constants.Environment.DEVELOP,
2932
constants.Environment.PRODUCTION,
3033
constants.Environment.MASTER,
3134
constants.Environment.LOCAL,
@@ -50,7 +53,8 @@ def pytest_addoption(parser):
5053
parser.addoption('--database_env', action='store',
5154
dest='database_env',
5255
choices=(
53-
'prod', 'qa', 'staging', 'test', 'local', 'master'
56+
'production', 'qa', 'staging', 'develop',
57+
'test', 'local', 'master'
5458
),
5559
default='test',
5660
help=optparse.SUPPRESS_HELP)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
setup(
1919
name='seleniumbase',
20-
version='1.16.7',
20+
version='1.16.8',
2121
description='All-In-One Test Automation Framework',
2222
long_description=long_description,
2323
long_description_content_type='text/markdown',

0 commit comments

Comments
 (0)