Skip to content

Commit 15c1c3a

Browse files
Jimmyfagan/bb2 4174 follow up (#1416)
* Fix option handling of selenium tests * Remove remnant of `-p` option from local selenium tests * Update expected version string --------- Co-authored-by: James Demery <[email protected]>
1 parent ed16794 commit 15c1c3a

File tree

5 files changed

+15
-22
lines changed

5 files changed

+15
-22
lines changed

apps/integration_tests/selenium_cases.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,6 @@ class Action(Enum):
157157
EN_US = "en_us"
158158
ES_ES = "es_es"
159159

160-
# API versions
161-
API_V2 = "v2"
162-
163160
# v2 SMART APP scope constants
164161
X_PATH_FOR_USER_SCOPES = "//*[@id='main-content']/div/div/div/pre"
165162
COVERAGE_SCOPE = "patient/Coverage.rs"

apps/integration_tests/selenium_spanish_tests.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
from .selenium_generic import SeleniumGenericTests
2-
from .selenium_cases import (
3-
API_V2,
4-
SPANISH_TESTS
5-
)
2+
from .selenium_cases import SPANISH_TESTS
3+
from apps.constants import Versions
64

75
USE_NEW_PERM_SCREEN = "true"
86

@@ -20,7 +18,7 @@ class TestPermissionScreenSpanish(SeleniumGenericTests):
2018
def test_toggle_language_and_date_format(self):
2119
step = [0]
2220
test_name = "toggle_language"
23-
api_ver = API_V2
21+
api_ver = Versions.V2
2422
self._print_testcase_banner(test_name, api_ver, step[0], self.use_mslsx, True)
2523
if not self.use_mslsx:
2624
self._play(SPANISH_TESTS[test_name], step, api_ver=api_ver)
@@ -37,7 +35,7 @@ def test_toggle_language_and_date_format(self):
3735
def test_authorize_lang_param(self):
3836
step = [0]
3937
test_name = "authorize_lang_param"
40-
api_ver = API_V2
38+
api_ver = Versions.V2
4139
self._print_testcase_banner(test_name, api_ver, step[0], self.use_mslsx, True)
4240
if not self.use_mslsx:
4341
self._play(SPANISH_TESTS[test_name], step, api_ver=api_ver)
@@ -54,7 +52,7 @@ def test_authorize_lang_param(self):
5452
def test_authorize_lang_spanish_button(self):
5553
step = [0]
5654
test_name = "authorize_lang_spanish_button"
57-
api_ver = API_V2
55+
api_ver = Versions.V2
5856
self._print_testcase_banner(test_name, api_ver, step[0], self.use_mslsx, True)
5957
if USE_NEW_PERM_SCREEN == "true":
6058
# the validation of expire date etc. only applicable to new perm screen

apps/integration_tests/selenium_tests.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import os
22
from .selenium_generic import SeleniumGenericTests
3-
from .selenium_cases import (
4-
API_V2,
5-
TESTS,
6-
)
3+
from .selenium_cases import TESTS
4+
from apps.constants import Versions
75

86

97
USE_NEW_PERM_SCREEN = os.environ['USE_NEW_PERM_SCREEN']
@@ -17,7 +15,7 @@ class TestBlueButtonAPI(SeleniumGenericTests):
1715
def test_auth_grant_pkce_fhir_calls_v2(self):
1816
step = [0]
1917
test_name = "auth_grant_pkce_fhir_calls"
20-
api_ver = API_V2
18+
api_ver = Versions.V2
2119
self._print_testcase_banner(test_name, api_ver, step[0], self.use_mslsx, True)
2220
self._play(TESTS[test_name], step, api_ver=api_ver)
2321
self._testclient_home()
@@ -26,7 +24,7 @@ def test_auth_grant_pkce_fhir_calls_v2(self):
2624
def test_auth_deny_fhir_calls_v2(self):
2725
step = [0]
2826
test_name = "auth_deny_fhir_calls"
29-
api_ver = API_V2
27+
api_ver = Versions.V2
3028
self._print_testcase_banner(test_name, api_ver, step[0], self.use_mslsx, True)
3129
self._play(TESTS[test_name], step, api_ver=api_ver)
3230
self._print_testcase_banner(test_name, api_ver, step[0], self.use_mslsx, False)
@@ -37,7 +35,7 @@ def test_auth_grant_w_no_demo_v2(self):
3735
test_name = "auth_grant_w_no_demo_new_perm_screen"
3836
else:
3937
test_name = "auth_grant_w_no_demo"
40-
api_ver = API_V2
38+
api_ver = Versions.V2
4139
self._print_testcase_banner(test_name, api_ver, step[0], self.use_mslsx, True)
4240
self._play(TESTS[test_name], step, api_ver=api_ver)
4341
self._testclient_home()
@@ -51,7 +49,7 @@ def test_auth_grant_w_no_demo_v2(self):
5149
def test_authorize_lang_english_button(self):
5250
step = [0]
5351
test_name = "authorize_lang_english_button"
54-
api_ver = API_V2
52+
api_ver = Versions.V2
5553
self._print_testcase_banner(test_name, api_ver, step[0], self.use_mslsx, True)
5654
if USE_NEW_PERM_SCREEN == "true":
5755
# the validation of expire date etc. only applicable to new perm screen
@@ -68,7 +66,7 @@ def test_authorize_lang_english_button(self):
6866
def test_v2_authorization_and_scopes(self):
6967
step = [0]
7068
test_name = "authorize_get_v2_scopes"
71-
api_ver = API_V2
69+
api_ver = Versions.V2
7270
self._print_testcase_banner(test_name, api_ver, step[0], self.use_mslsx, True)
7371

7472
self._play(TESTS[test_name], step, api_ver=api_ver)

docker-compose/run_selenium_tests_local.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ PYTEST_SHOW_TRACE_OPT=''
8787
# set_slsx
8888

8989
# Parse command line option
90-
while getopts "hpgt" option; do
90+
while getopts "hgt" option; do
9191
case $option in
9292
h)
9393
display_usage

docker-compose/run_selenium_tests_remote.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ display_usage() {
2020
echo "Usage:"
2121
echo "------------------"
2222
echo
23-
echo "Syntax: run_selenium_tests_remote.sh [-h|d|p] [SBX|PROD|TEST|<bb2 server url>]"
23+
echo "Syntax: run_selenium_tests_remote.sh [-h|g|t|l] [SBX|PROD|TEST|<bb2 server url>]"
2424
echo
2525
echo "Options:"
2626
echo
@@ -62,7 +62,7 @@ export SELENIUM_GRID=false
6262
# Show test actions on std out : pytest -s
6363
PYTEST_SHOW_TRACE_OPT=''
6464

65-
while getopts "hpgt" option; do
65+
while getopts "hglt" option; do
6666
case $option in
6767
h)
6868
display_usage;

0 commit comments

Comments
 (0)