mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-10 18:22:37 -04:00
Combine tests using parametrize
This commit is contained in:
@@ -265,22 +265,25 @@ def test_broadcast_tour_pages_have_continue_link(
|
|||||||
assert link['href'] == expected_link_href(service_id=SERVICE_ONE_ID)
|
assert link['href'] == expected_link_href(service_id=SERVICE_ONE_ID)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize('step_index', (
|
@pytest.mark.parametrize('endpoint, step_index', (
|
||||||
pytest.param(1, marks=pytest.mark.xfail),
|
pytest.param('.broadcast_tour', 1, marks=pytest.mark.xfail),
|
||||||
pytest.param(2, marks=pytest.mark.xfail),
|
pytest.param('.broadcast_tour', 2, marks=pytest.mark.xfail),
|
||||||
pytest.param(3, marks=pytest.mark.xfail),
|
pytest.param('.broadcast_tour', 3, marks=pytest.mark.xfail),
|
||||||
pytest.param(4, marks=pytest.mark.xfail),
|
pytest.param('.broadcast_tour', 4, marks=pytest.mark.xfail),
|
||||||
5,
|
('.broadcast_tour', 5),
|
||||||
6,
|
('.broadcast_tour', 6),
|
||||||
|
('.broadcast_tour_live', 1),
|
||||||
|
('.broadcast_tour_live', 2),
|
||||||
))
|
))
|
||||||
def test_broadcast_tour_page_4_shows_service_name(
|
def test_some_broadcast_tour_pages_show_service_name(
|
||||||
client_request,
|
client_request,
|
||||||
service_one,
|
service_one,
|
||||||
|
endpoint,
|
||||||
step_index,
|
step_index,
|
||||||
):
|
):
|
||||||
service_one['permissions'] += ['broadcast']
|
service_one['permissions'] += ['broadcast']
|
||||||
page = client_request.get(
|
page = client_request.get(
|
||||||
'.broadcast_tour',
|
endpoint,
|
||||||
service_id=SERVICE_ONE_ID,
|
service_id=SERVICE_ONE_ID,
|
||||||
step_index=step_index,
|
step_index=step_index,
|
||||||
)
|
)
|
||||||
@@ -291,29 +294,6 @@ def test_broadcast_tour_page_4_shows_service_name(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize('step_index', (
|
|
||||||
1,
|
|
||||||
2,
|
|
||||||
))
|
|
||||||
def test_live_broadcast_tour_shows_service_name_and_switch(
|
|
||||||
client_request,
|
|
||||||
service_one,
|
|
||||||
step_index,
|
|
||||||
):
|
|
||||||
service_one['permissions'] += ['broadcast']
|
|
||||||
service_one['restricted'] = False
|
|
||||||
service_one['allowed_broadcast_provider'] = 'all'
|
|
||||||
service_one['broadcast_channel'] = 'severe'
|
|
||||||
page = client_request.get(
|
|
||||||
'.broadcast_tour_live',
|
|
||||||
service_id=SERVICE_ONE_ID,
|
|
||||||
step_index=step_index,
|
|
||||||
)
|
|
||||||
assert normalize_spaces(page.select_one('.navigation-service').text) == (
|
|
||||||
'service one Live Switch service'
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
'trial_mode, channel, allowed_broadcast_provider, selector, expected_text, expected_tagged_text',
|
'trial_mode, channel, allowed_broadcast_provider, selector, expected_text, expected_tagged_text',
|
||||||
(
|
(
|
||||||
|
|||||||
Reference in New Issue
Block a user