Removed best practices flag

This commit is contained in:
alexjanousekGSA
2025-01-12 17:42:15 -05:00
parent 6441ae8ca7
commit b6353c41e5
15 changed files with 162 additions and 313 deletions

View File

@@ -121,8 +121,7 @@ def test_static_pages(client_request, mock_get_organization_by_domain, view, moc
"guidance_index",
]
return (
not current_app.config["FEATURE_BEST_PRACTICES_ENABLED"]
and view in feature_flagged_views
view in feature_flagged_views
)
request = partial(client_request.get, "main.{}".format(view))

View File

@@ -16,43 +16,39 @@ def test_best_practices_side_menu(authenticated_page):
page.wait_for_load_state("domcontentloaded")
check_axe_report(page)
response = page.request.get(f"{E2E_TEST_URI}/test/feature-flags")
feature_flags = response.json()
feature_best_practices_enabled = feature_flags.get("FEATURE_BEST_PRACTICES_ENABLED")
# Test Best Practices navigation
page.get_by_role("link", name="Best Practices").click()
expect(page).to_have_title(re.compile("Best Practice"))
if feature_best_practices_enabled:
page.get_by_role("link", name="Best Practices").click()
expect(page).to_have_title(re.compile("Best Practice"))
page.get_by_role("link", name="Clear goals", exact=True).click()
expect(page).to_have_title(re.compile("Establish clear goals"))
page.get_by_role("link", name="Clear goals", exact=True).click()
expect(page).to_have_title(re.compile("Establish clear goals"))
page.get_by_role("link", name="Rules and regulations").click()
expect(page).to_have_title(re.compile("Rules and regulations"))
page.get_by_role("link", name="Rules and regulations").click()
expect(page).to_have_title(re.compile("Rules and regulations"))
page.get_by_role("link", name="Establish trust").click()
expect(page).to_have_title(re.compile("Establish trust"))
page.get_by_role("link", name="Establish trust").click()
expect(page).to_have_title(re.compile("Establish trust"))
page.get_by_role("link", name="Write for action").click()
expect(page).to_have_title(re.compile("Write texts that provoke"))
page.get_by_role("link", name="Write for action").click()
expect(page).to_have_title(re.compile("Write texts that provoke"))
page.get_by_role("link", name="Multiple languages").click()
expect(page).to_have_title(re.compile("Text in multiple languages"))
page.get_by_role("link", name="Multiple languages").click()
expect(page).to_have_title(re.compile("Text in multiple languages"))
page.get_by_role("link", name="Benchmark performance").click()
expect(page).to_have_title(re.compile("Measuring performance with"))
page.get_by_role("link", name="Benchmark performance").click()
expect(page).to_have_title(re.compile("Measuring performance with"))
parent_link = page.get_by_role("link", name="Establish trust")
parent_link.hover()
parent_link = page.get_by_role("link", name="Establish trust")
parent_link.hover()
submenu_item = page.get_by_role("link", name=re.compile("Get the word out"))
submenu_item.click()
submenu_item = page.get_by_role("link", name=re.compile("Get the word out"))
submenu_item.click()
expect(page).to_have_url(re.compile(r"#get-the-word-out"))
expect(page).to_have_url(re.compile(r"#get-the-word-out"))
anchor_target = page.locator("#get-the-word-out")
expect(anchor_target).to_be_visible()
anchor_target.click()
anchor_target = page.locator("#get-the-word-out")
expect(anchor_target).to_be_visible()
anchor_target.click()
def test_breadcrumbs_best_practices(authenticated_page):
@@ -63,10 +59,6 @@ def test_breadcrumbs_best_practices(authenticated_page):
page.wait_for_load_state("domcontentloaded")
check_axe_report(page)
response = page.request.get(f"{E2E_TEST_URI}/test/feature-flags")
feature_flags = response.json()
feature_best_practices_enabled = feature_flags.get("FEATURE_BEST_PRACTICES_ENABLED")
if feature_best_practices_enabled:
page.get_by_role("link", name="Clear goals", exact=True).click()
page.locator("ol").get_by_role("link", name="Best Practices").click()
# Test Best Practices breadcrumbs
page.get_by_role("link", name="Clear goals", exact=True).click()
page.locator("ol").get_by_role("link", name="Best Practices").click()