Skip to content

Commit 366f175

Browse files
committed
Fix some tests after design changes
1 parent d816eca commit 366f175

File tree

5 files changed

+22
-22
lines changed

5 files changed

+22
-22
lines changed

integration_tests/batch/test_batch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def test_batch_request(unique_id, register_test_user, test_domain):
128128

129129
def test_batch_static_requires_no_auth():
130130
"""Static files should be available without authentication for viewing batch results."""
131-
response = requests.get(f"https://{APP_DOMAIN}/static/js/menu-min.js", json={}, verify=False)
131+
response = requests.get(f"https://{APP_DOMAIN}/static/js/theme-min.js", json={}, verify=False)
132132
assert response.status_code == 200
133133

134134

integration_tests/common/test_basic.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
import socket
77
import os
88

9-
FOOTER_TEXT_EN = "Internet.nl is an initiative of the Internet community and the Dutch"
10-
FOOTER_TEXT_NL = "Internet.nl is een initiatief van de internetgemeenschap en de Nederlandse"
9+
FOOTER_TEXT_EN = "Visit our Mastodon profile"
10+
FOOTER_TEXT_NL = "Ga naar onze Mastodon profiel"
1111

1212
LANGUAGE_CHANGE_TEXT_EN = "Test your website"
1313
LANGUAGE_CHANGE_TEXT_NL = "Test je website"
@@ -61,7 +61,7 @@ def test_index_http_ok(page, app_url_subdomain):
6161
)
6262
def test_index_footer_text_present(page, app_url, footer_text):
6363
page.goto(app_url)
64-
footer = page.locator("#footer")
64+
footer = page.locator(".footer-bar")
6565

6666
assert footer_text in footer.text_content()
6767

@@ -90,16 +90,16 @@ def test_static_files(page, app_url_subdomain):
9090

9191

9292
def test_generated_css_static_files(page, app_url_subdomain):
93-
response = page.request.get(app_url_subdomain + "/static/css/style.css")
93+
response = page.request.get(app_url_subdomain + "/static/css/print.css")
9494
expect(response).to_be_ok()
95-
assert "@font-face" in response.text()
95+
assert "#site-description" in response.text()
9696
assert "expires" in response.headers
9797

9898

9999
def test_generated_js_static_files(page, app_url_subdomain):
100-
response = page.request.get(app_url_subdomain + "/static/js/menu-min.js")
100+
response = page.request.get(app_url_subdomain + "/static/js/theme-min.js")
101101
expect(response).to_be_ok()
102-
assert "hideMenuButton" in response.text()
102+
assert "setTheme" in response.text()
103103
assert "expires" in response.headers
104104

105105

integration_tests/develop/test_basic.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import requests
55
from playwright.sync_api import expect
66

7-
FOOTER_TEXT = "Internet.nl is an initiative of the Internet community and the Dutch"
7+
FOOTER_TEXT = "Ga naar onze Mastodon profiel"
88

99
SECURITY_TXT_TEXT = "Policy: https://internet.nl/disclosure/"
1010

@@ -19,7 +19,7 @@ def test_index_http_ok(page, app_url):
1919
def test_index_footer_text_present(page, app_url):
2020
"""Branding is disabled on develop, so no footer text, only version"""
2121
page.goto(app_url)
22-
footer = page.locator("#footer")
22+
footer = page.locator(".footer-bar")
2323

2424
expect(footer).not_to_have_text(re.compile(FOOTER_TEXT))
2525

@@ -41,14 +41,14 @@ def test_static_files(page, app_url):
4141

4242

4343
def test_generated_css_static_files(page, app_url):
44-
response = requests.get(app_url + "/static/css/style.css", verify=False)
44+
response = requests.get(app_url + "/static/css/print.css", verify=False)
4545
response.raise_for_status()
46-
assert "@font-face" in response.text
46+
assert "#site-description" in response.text()
4747
assert "expires" in response.headers
4848

4949

5050
def test_generated_js_static_files(page, app_url):
51-
response = requests.get(app_url + "/static/js/menu-min.js", verify=False)
51+
response = requests.get(app_url + "/static/js/theme-min.js", verify=False)
5252
response.raise_for_status()
53-
assert "hideMenuButton" in response.text
53+
assert "setTheme" in response.text()
5454
assert "expires" in response.headers

integration_tests/develop/test_website.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ def test_reject_invalid_domain(page, app_url):
1717

1818
page.goto(app_url)
1919

20-
page.locator("#web-url").fill(domain)
21-
page.locator("section.websitetest button").click()
20+
page.locator('input[name="url"]').fill(domain)
21+
page.get_by_label("Start de domein test").click()
2222

2323
assert page.url == f"{app_url}/test-site/?invalid"
2424

integration_tests/live/test_basic.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import requests
55
from playwright.sync_api import expect
66

7-
FOOTER_TEXT = "Internet.nl is an initiative of the Internet community and the Dutch"
7+
FOOTER_TEXT = "Ga naar onze Mastodon profiel"
88

99
SECURITY_TXT_TEXT = "Policy: https://internet.nl/disclosure/"
1010

@@ -18,7 +18,7 @@ def test_index_http_ok(page, app_url):
1818

1919
def test_index_footer_text_present(page, app_url):
2020
page.goto(app_url)
21-
footer = page.locator("#footer")
21+
footer = page.locator(".footer-bar")
2222

2323
expect(footer).to_have_text(re.compile(FOOTER_TEXT))
2424

@@ -46,16 +46,16 @@ def test_static_files(page, app_url):
4646

4747

4848
def test_generated_css_static_files(page, app_url):
49-
response = requests.get(app_url + "/static/css/style.css")
49+
response = requests.get(app_url + "/static/css/print.css")
5050
response.raise_for_status()
51-
assert "@font-face" in response.text
51+
assert "#site-description" in response.text()
5252
assert "expires" in response.headers
5353

5454

5555
def test_generated_js_static_files(page, app_url):
56-
response = requests.get(app_url + "/static/js/menu-min.js")
56+
response = requests.get(app_url + "/static/js/theme-min.js")
5757
response.raise_for_status()
58-
assert "hideMenuButton" in response.text
58+
assert "setTheme" in response.text()
5959
assert "expires" in response.headers
6060

6161

0 commit comments

Comments
 (0)