diff --git a/changedetectionio/blueprint/rss/main_feed.py b/changedetectionio/blueprint/rss/main_feed.py
index 6c24e66de..4c382baea 100644
--- a/changedetectionio/blueprint/rss/main_feed.py
+++ b/changedetectionio/blueprint/rss/main_feed.py
@@ -81,7 +81,7 @@ def construct_main_feed_routes(rss_blueprint, datastore):
timestamp_from = dates[-2]
guid = generate_watch_guid(watch, timestamp_to)
# Because we are called via whatever web server, flask should figure out the right path
- diff_link = {'href': url_for('ui.ui_views.diff_history_page', uuid=watch['uuid'], _external=True)}
+ diff_link = {'href': url_for('ui.ui_diff.diff_history_page', uuid=watch['uuid'], _external=True)}
# Get template and build notification context
n_body_template = get_rss_template(datastore, watch, rss_content_format,
diff --git a/changedetectionio/blueprint/rss/tag.py b/changedetectionio/blueprint/rss/tag.py
index c6daf77b1..7e22af71d 100644
--- a/changedetectionio/blueprint/rss/tag.py
+++ b/changedetectionio/blueprint/rss/tag.py
@@ -67,7 +67,7 @@ def construct_tag_routes(rss_blueprint, datastore):
watch['uuid'] = uuid
# Include a link to the diff page
- diff_link = {'href': url_for('ui.ui_views.diff_history_page', uuid=watch['uuid'], _external=True)}
+ diff_link = {'href': url_for('ui.ui_diff.diff_history_page', uuid=watch['uuid'], _external=True)}
# Get watch label
watch_label = get_watch_label(datastore, watch)
diff --git a/changedetectionio/blueprint/ui/__init__.py b/changedetectionio/blueprint/ui/__init__.py
index 7755d2ca8..956298bad 100644
--- a/changedetectionio/blueprint/ui/__init__.py
+++ b/changedetectionio/blueprint/ui/__init__.py
@@ -6,6 +6,7 @@ from changedetectionio.store import ChangeDetectionStore
from changedetectionio.blueprint.ui.edit import construct_blueprint as construct_edit_blueprint
from changedetectionio.blueprint.ui.notification import construct_blueprint as construct_notification_blueprint
from changedetectionio.blueprint.ui.views import construct_blueprint as construct_views_blueprint
+from changedetectionio.blueprint.ui import diff, preview
def _handle_operations(op, uuids, datastore, worker_handler, update_q, queuedWatchMetaData, watch_check_update, extra_data=None, emit_flash=True):
from flask import request, flash
@@ -121,6 +122,13 @@ def construct_blueprint(datastore: ChangeDetectionStore, update_q, worker_handle
views_blueprint = construct_views_blueprint(datastore, update_q, queuedWatchMetaData, watch_check_update)
ui_blueprint.register_blueprint(views_blueprint)
+ # Register diff and preview blueprints
+ diff_blueprint = diff.construct_blueprint(datastore)
+ ui_blueprint.register_blueprint(diff_blueprint)
+
+ preview_blueprint = preview.construct_blueprint(datastore)
+ ui_blueprint.register_blueprint(preview_blueprint)
+
# Import the login decorator
from changedetectionio.auth_decorator import login_optionally_required
diff --git a/changedetectionio/blueprint/ui/edit.py b/changedetectionio/blueprint/ui/edit.py
index d394a9069..a823ae996 100644
--- a/changedetectionio/blueprint/ui/edit.py
+++ b/changedetectionio/blueprint/ui/edit.py
@@ -206,7 +206,7 @@ def construct_blueprint(datastore: ChangeDetectionStore, update_q, queuedWatchMe
# Diff page [edit] link should go back to diff page
if request.args.get("next") and request.args.get("next") == 'diff':
- return redirect(url_for('ui.ui_views.diff_history_page', uuid=uuid))
+ return redirect(url_for('ui.ui_diff.diff_history_page', uuid=uuid))
return redirect(url_for('watchlist.index', tag=request.args.get("tag",'')))
@@ -340,6 +340,6 @@ def construct_blueprint(datastore: ChangeDetectionStore, update_q, queuedWatchMe
s = re.sub(r'[0-9]+', r'\\d+', s)
datastore.data["watching"][uuid]['ignore_text'].append('/' + s + '/')
- return f"Click to preview"
+ return f"Click to preview"
return edit_blueprint
\ No newline at end of file
diff --git a/changedetectionio/blueprint/ui/templates/diff.html b/changedetectionio/blueprint/ui/templates/diff.html
index 827ece36b..abd80fded 100644
--- a/changedetectionio/blueprint/ui/templates/diff.html
+++ b/changedetectionio/blueprint/ui/templates/diff.html
@@ -21,7 +21,7 @@
oh yeah 456' not in res.data
# Should be in base.html
@@ -84,6 +84,6 @@ def test_strip_ignore_lines(client, live_server, measure_memory_usage, datastore
uuid = next(iter(live_server.app.config['DATASTORE'].data['watching']))
# It should not be in the preview anymore
- res = client.get(url_for("ui.ui_views.preview_page", uuid=uuid))
+ res = client.get(url_for("ui.ui_preview.preview_page", uuid=uuid))
assert b'
' not in res.data
assert b'Which is across multiple' not in res.data
diff --git a/changedetectionio/tests/test_ignore_text.py b/changedetectionio/tests/test_ignore_text.py
index 949021536..37868faca 100644
--- a/changedetectionio/tests/test_ignore_text.py
+++ b/changedetectionio/tests/test_ignore_text.py
@@ -131,7 +131,7 @@ def test_check_ignore_text_functionality(client, live_server, measure_memory_usa
assert b'/test-endpoint' in res.data
- res = client.get(url_for("ui.ui_views.preview_page", uuid="first"))
+ res = client.get(url_for("ui.ui_preview.preview_page", uuid="first"))
# nothing ignored because none of the text matched
assert b'ignored_line_numbers = []' in res.data
@@ -158,7 +158,7 @@ def test_check_ignore_text_functionality(client, live_server, measure_memory_usa
res = client.get(url_for("watchlist.index"))
assert b'has-unread-changes' in res.data
- res = client.get(url_for("ui.ui_views.preview_page", uuid="first"))
+ res = client.get(url_for("ui.ui_preview.preview_page", uuid="first"))
# SHOULD BE be in the preview, it was added in set_modified_original_ignore_response()
# and we have "new ignore stuff" in ignore_text
diff --git a/changedetectionio/tests/test_ignorehyperlinks.py b/changedetectionio/tests/test_ignorehyperlinks.py
index 9a811c538..2e870d5f6 100644
--- a/changedetectionio/tests/test_ignorehyperlinks.py
+++ b/changedetectionio/tests/test_ignorehyperlinks.py
@@ -82,7 +82,7 @@ def test_render_anchor_tag_content_true(client, live_server, measure_memory_usag
wait_for_all_checks(client)
# We should not see the rendered anchor tag
- res = client.get(url_for("ui.ui_views.preview_page", uuid="first"))
+ res = client.get(url_for("ui.ui_preview.preview_page", uuid="first"))
assert '(/modified_link)' not in res.data.decode()
# Goto the settings page, ENABLE render anchor tag
@@ -106,7 +106,7 @@ def test_render_anchor_tag_content_true(client, live_server, measure_memory_usag
# check that the anchor tag content is rendered
- res = client.get(url_for("ui.ui_views.preview_page", uuid="first"))
+ res = client.get(url_for("ui.ui_preview.preview_page", uuid="first"))
assert '(/modified_link)' in res.data.decode()
# since the link has changed, and we chose to render anchor tag content,
diff --git a/changedetectionio/tests/test_jinja2.py b/changedetectionio/tests/test_jinja2.py
index 09612a694..fcca6ab20 100644
--- a/changedetectionio/tests/test_jinja2.py
+++ b/changedetectionio/tests/test_jinja2.py
@@ -30,7 +30,7 @@ def test_jinja2_in_url_query(client, live_server, measure_memory_usage, datastor
# It should report nothing found (no new 'has-unread-changes' class)
res = client.get(
- url_for("ui.ui_views.preview_page", uuid="first"),
+ url_for("ui.ui_preview.preview_page", uuid="first"),
follow_redirects=True
)
assert b'date=2' in res.data
@@ -56,7 +56,7 @@ def test_jinja2_time_offset_in_url_query(client, live_server, measure_memory_usa
# Verify the URL was processed correctly (should not have errors)
res = client.get(
- url_for("ui.ui_views.preview_page", uuid="first"),
+ url_for("ui.ui_preview.preview_page", uuid="first"),
follow_redirects=True
)
# Should have a valid timestamp in the response
diff --git a/changedetectionio/tests/test_jsonpath_jq_selector.py b/changedetectionio/tests/test_jsonpath_jq_selector.py
index f3e4006e1..d598ecc6c 100644
--- a/changedetectionio/tests/test_jsonpath_jq_selector.py
+++ b/changedetectionio/tests/test_jsonpath_jq_selector.py
@@ -210,7 +210,7 @@ def test_check_json_without_filter(client, live_server, measure_memory_usage, da
wait_for_all_checks(client)
res = client.get(
- url_for("ui.ui_views.preview_page", uuid="first"),
+ url_for("ui.ui_preview.preview_page", uuid="first"),
follow_redirects=True
)
@@ -253,7 +253,7 @@ def check_json_filter(json_filter, client, live_server, datastore_path):
assert b'has-unread-changes' in res.data
# Should not see this, because its not in the JSONPath we entered
- res = client.get(url_for("ui.ui_views.diff_history_page", uuid=uuid))
+ res = client.get(url_for("ui.ui_diff.diff_history_page", uuid=uuid))
# But the change should be there, tho its hard to test the change was detected because it will show old and new versions
# And #462 - check we see the proper utf-8 string there
@@ -289,7 +289,7 @@ def check_json_filter_bool_val(json_filter, client, live_server, datastore_path)
# Give the thread time to pick it up
wait_for_all_checks(client)
- res = client.get(url_for("ui.ui_views.diff_history_page", uuid="first"))
+ res = client.get(url_for("ui.ui_diff.diff_history_page", uuid="first"))
# But the change should be there, tho its hard to test the change was detected because it will show old and new versions
assert b'false' in res.data
@@ -361,7 +361,7 @@ def check_json_ext_filter(json_filter, client, live_server, datastore_path):
res = client.get(url_for("watchlist.index"))
assert b'has-unread-changes' in res.data
- res = client.get(url_for("ui.ui_views.preview_page", uuid="first"))
+ res = client.get(url_for("ui.ui_preview.preview_page", uuid="first"))
# We should never see 'ForSale' because we are selecting on 'Sold' in the rule,
# But we should know it triggered ('has-unread-changes' assert above)
@@ -371,7 +371,7 @@ def check_json_ext_filter(json_filter, client, live_server, datastore_path):
# And the difference should have both?
- res = client.get(url_for("ui.ui_views.diff_history_page", uuid="first"))
+ res = client.get(url_for("ui.ui_diff.diff_history_page", uuid="first"))
assert b'ForSale' in res.data
assert b'Sold' in res.data
@@ -432,7 +432,7 @@ def test_correct_header_detect(client, live_server, measure_memory_usage, datast
assert b'No parsable JSON found in this document' not in res.data
res = client.get(
- url_for("ui.ui_views.preview_page", uuid="first"),
+ url_for("ui.ui_preview.preview_page", uuid="first"),
follow_redirects=True
)
diff --git a/changedetectionio/tests/test_obfuscations.py b/changedetectionio/tests/test_obfuscations.py
index e1ef0df28..09d8b9b3a 100644
--- a/changedetectionio/tests/test_obfuscations.py
+++ b/changedetectionio/tests/test_obfuscations.py
@@ -33,7 +33,7 @@ def test_obfuscations(client, live_server, measure_memory_usage, datastore_path)
# Check HTML conversion detected and workd
res = client.get(
- url_for("ui.ui_views.preview_page", uuid="first"),
+ url_for("ui.ui_preview.preview_page", uuid="first"),
follow_redirects=True
)
diff --git a/changedetectionio/tests/test_pdf.py b/changedetectionio/tests/test_pdf.py
index f82d3a3f4..585893096 100644
--- a/changedetectionio/tests/test_pdf.py
+++ b/changedetectionio/tests/test_pdf.py
@@ -56,7 +56,7 @@ def test_fetch_pdf(client, live_server, measure_memory_usage, datastore_path):
# The original checksum should be not be here anymore (cdio adds it to the bottom of the text)
res = client.get(
- url_for("ui.ui_views.preview_page", uuid="first"),
+ url_for("ui.ui_preview.preview_page", uuid="first"),
follow_redirects=True
)
@@ -64,7 +64,7 @@ def test_fetch_pdf(client, live_server, measure_memory_usage, datastore_path):
assert changed_md5.encode('utf-8') in res.data
res = client.get(
- url_for("ui.ui_views.diff_history_page", uuid="first"),
+ url_for("ui.ui_diff.diff_history_page", uuid="first"),
follow_redirects=True
)
diff --git a/changedetectionio/tests/test_preview_endpoints.py b/changedetectionio/tests/test_preview_endpoints.py
index 9ae728393..f595359ba 100644
--- a/changedetectionio/tests/test_preview_endpoints.py
+++ b/changedetectionio/tests/test_preview_endpoints.py
@@ -20,7 +20,7 @@ def test_fetch_pdf(client, live_server, measure_memory_usage, datastore_path):
wait_for_all_checks(client)
res = client.get(
- url_for("ui.ui_views.preview_page", uuid="first"),
+ url_for("ui.ui_preview.preview_page", uuid="first"),
follow_redirects=True
)
@@ -50,7 +50,7 @@ def test_fetch_pdf(client, live_server, measure_memory_usage, datastore_path):
# The original checksum should be not be here anymore (cdio adds it to the bottom of the text)
res = client.get(
- url_for("ui.ui_views.preview_page", uuid="first"),
+ url_for("ui.ui_preview.preview_page", uuid="first"),
follow_redirects=True
)
@@ -58,7 +58,7 @@ def test_fetch_pdf(client, live_server, measure_memory_usage, datastore_path):
assert changed_md5.encode('utf-8') in res.data
res = client.get(
- url_for("ui.ui_views.diff_history_page", uuid="first"),
+ url_for("ui.ui_diff.diff_history_page", uuid="first"),
follow_redirects=True
)
diff --git a/changedetectionio/tests/test_request.py b/changedetectionio/tests/test_request.py
index 66a4b6055..71305c182 100644
--- a/changedetectionio/tests/test_request.py
+++ b/changedetectionio/tests/test_request.py
@@ -48,7 +48,7 @@ def test_headers_in_request(client, live_server, measure_memory_usage, datastore
# The service should echo back the request headers
res = client.get(
- url_for("ui.ui_views.preview_page", uuid="first"),
+ url_for("ui.ui_preview.preview_page", uuid="first"),
follow_redirects=True
)
@@ -126,7 +126,7 @@ def test_body_in_request(client, live_server, measure_memory_usage, datastore_pa
# The service should echo back the body
res = client.get(
- url_for("ui.ui_views.preview_page", uuid="first"),
+ url_for("ui.ui_preview.preview_page", uuid="first"),
follow_redirects=True
)
@@ -215,7 +215,7 @@ def test_method_in_request(client, live_server, measure_memory_usage, datastore_
# The service should echo back the request verb
res = client.get(
- url_for("ui.ui_views.preview_page", uuid="first"),
+ url_for("ui.ui_preview.preview_page", uuid="first"),
follow_redirects=True
)
@@ -257,7 +257,7 @@ def test_ua_global_override(client, live_server, measure_memory_usage, datastore
wait_for_all_checks(client)
res = client.get(
- url_for("ui.ui_views.preview_page", uuid="first"),
+ url_for("ui.ui_preview.preview_page", uuid="first"),
follow_redirects=True
)
@@ -281,7 +281,7 @@ def test_ua_global_override(client, live_server, measure_memory_usage, datastore
assert b"Updated watch." in res.data
wait_for_all_checks(client)
res = client.get(
- url_for("ui.ui_views.preview_page", uuid="first"),
+ url_for("ui.ui_preview.preview_page", uuid="first"),
follow_redirects=True
)
assert b"agent-from-watch" in res.data
@@ -376,7 +376,7 @@ def test_headers_textfile_in_request(client, live_server, measure_memory_usage,
# The service should echo back the request verb
res = client.get(
- url_for("ui.ui_views.preview_page", uuid="first"),
+ url_for("ui.ui_preview.preview_page", uuid="first"),
follow_redirects=True
)
diff --git a/changedetectionio/tests/test_rss.py b/changedetectionio/tests/test_rss.py
index e198c5c5c..c0845b2b1 100644
--- a/changedetectionio/tests/test_rss.py
+++ b/changedetectionio/tests/test_rss.py
@@ -124,7 +124,7 @@ def test_basic_cdata_rss_markup(client, live_server, measure_memory_usage, datas
wait_for_all_checks(client)
res = client.get(
- url_for("ui.ui_views.preview_page", uuid="first"),
+ url_for("ui.ui_preview.preview_page", uuid="first"),
follow_redirects=True
)
assert b'CDATA' not in res.data
@@ -166,7 +166,7 @@ def test_rss_xpath_filtering(client, live_server, measure_memory_usage, datastor
wait_for_all_checks(client)
res = client.get(
- url_for("ui.ui_views.preview_page", uuid="first"),
+ url_for("ui.ui_preview.preview_page", uuid="first"),
follow_redirects=True
)
assert b'CDATA' not in res.data
diff --git a/changedetectionio/tests/test_security.py b/changedetectionio/tests/test_security.py
index c0d5ccb5f..a9b0cb99d 100644
--- a/changedetectionio/tests/test_security.py
+++ b/changedetectionio/tests/test_security.py
@@ -101,7 +101,7 @@ def _runner_test_various_file_slash(client, file_uri):
if file_uri.startswith('file:///'):
# This one should be the full qualified path to the file and should get the contents of this file
res = client.get(
- url_for("ui.ui_views.preview_page", uuid="first"),
+ url_for("ui.ui_preview.preview_page", uuid="first"),
follow_redirects=True
)
assert b'_runner_test_various_file_slash' in res.data
@@ -154,9 +154,9 @@ def test_xss(client, live_server, measure_memory_usage, datastore_path):
live_server.app.config['DATASTORE'].data['watching'][uuid]['url']=XSS_HACK
- res = client.get(url_for("ui.ui_views.preview_page", uuid=uuid))
+ res = client.get(url_for("ui.ui_preview.preview_page", uuid=uuid))
assert XSS_HACK.encode('utf-8') not in res.data and res.status_code == 200
- client.get(url_for("ui.ui_views.diff_history_page", uuid=uuid))
+ client.get(url_for("ui.ui_diff.diff_history_page", uuid=uuid))
assert XSS_HACK.encode('utf-8') not in res.data and res.status_code == 200
res = client.get(url_for("watchlist.index"))
assert XSS_HACK.encode('utf-8') not in res.data and res.status_code == 200
diff --git a/changedetectionio/tests/test_source.py b/changedetectionio/tests/test_source.py
index e79747524..14975c51b 100644
--- a/changedetectionio/tests/test_source.py
+++ b/changedetectionio/tests/test_source.py
@@ -22,7 +22,7 @@ def test_check_basic_change_detection_functionality_source(client, live_server,
# Check HTML conversion detected and workd
res = client.get(
- url_for("ui.ui_views.preview_page", uuid="first"),
+ url_for("ui.ui_preview.preview_page", uuid="first"),
follow_redirects=True
)
@@ -43,7 +43,7 @@ def test_check_basic_change_detection_functionality_source(client, live_server,
assert b'has-unread-changes' in res.data
res = client.get(
- url_for("ui.ui_views.diff_history_page", uuid="first"),
+ url_for("ui.ui_diff.diff_history_page", uuid="first"),
follow_redirects=True
)
# With diff-match-patch, HTML tags are properly tokenized and excluded from diff spans
@@ -75,7 +75,7 @@ def test_check_ignore_elements(client, live_server, measure_memory_usage, datast
time.sleep(sleep_time_for_fetch_thread)
res = client.get(
- url_for("ui.ui_views.preview_page", uuid="first"),
+ url_for("ui.ui_preview.preview_page", uuid="first"),
follow_redirects=True
)
assert b'foobar-detection' not in res.data
diff --git a/changedetectionio/tests/test_trigger.py b/changedetectionio/tests/test_trigger.py
index 80491703f..25714d97e 100644
--- a/changedetectionio/tests/test_trigger.py
+++ b/changedetectionio/tests/test_trigger.py
@@ -96,7 +96,7 @@ def test_trigger_functionality(client, live_server, measure_memory_usage, datast
# so that we set the state to 'has-unread-changes' after all the edits
- client.get(url_for("ui.ui_views.diff_history_page", uuid="first"))
+ client.get(url_for("ui.ui_diff.diff_history_page", uuid="first"))
# Trigger a check
client.get(url_for("ui.form_watch_checknow"), follow_redirects=True)
@@ -129,11 +129,11 @@ def test_trigger_functionality(client, live_server, measure_memory_usage, datast
# https://github.com/dgtlmoon/changedetection.io/issues/616
# Apparently the actual snapshot that contains the trigger never shows
- res = client.get(url_for("ui.ui_views.diff_history_page", uuid="first"))
+ res = client.get(url_for("ui.ui_diff.diff_history_page", uuid="first"))
assert b'Add to cart' in res.data
# Check the preview/highlighter, we should be able to see what we triggered on, but it should be highlighted
- res = client.get(url_for("ui.ui_views.preview_page", uuid="first"))
+ res = client.get(url_for("ui.ui_preview.preview_page", uuid="first"))
assert b'ignored_line_numbers = [8]' in res.data
# We should be able to see what we triggered on
diff --git a/changedetectionio/tests/test_trigger_regex.py b/changedetectionio/tests/test_trigger_regex.py
index acadd10b8..c2cfed4aa 100644
--- a/changedetectionio/tests/test_trigger_regex.py
+++ b/changedetectionio/tests/test_trigger_regex.py
@@ -52,7 +52,7 @@ def test_trigger_regex_functionality(client, live_server, measure_memory_usage,
)
wait_for_all_checks(client)
# so that we set the state to 'has-unread-changes' after all the edits
- client.get(url_for("ui.ui_views.diff_history_page", uuid="first"))
+ client.get(url_for("ui.ui_diff.diff_history_page", uuid="first"))
with open(os.path.join(datastore_path, "endpoint-content.txt"), "w") as f:
f.write("some new noise")
diff --git a/changedetectionio/tests/test_trigger_regex_with_filter.py b/changedetectionio/tests/test_trigger_regex_with_filter.py
index 339085518..e3b85aa56 100644
--- a/changedetectionio/tests/test_trigger_regex_with_filter.py
+++ b/changedetectionio/tests/test_trigger_regex_with_filter.py
@@ -55,7 +55,7 @@ def test_trigger_regex_functionality_with_filter(client, live_server, measure_me
# Give the thread time to pick it up
time.sleep(sleep_time_for_fetch_thread)
- client.get(url_for("ui.ui_views.diff_history_page", uuid="first"))
+ client.get(url_for("ui.ui_diff.diff_history_page", uuid="first"))
# Check that we have the expected text.. but it's not in the css filter we want
with open(os.path.join(datastore_path, "endpoint-content.txt"), "w") as f:
diff --git a/changedetectionio/tests/test_ui.py b/changedetectionio/tests/test_ui.py
index 7243a837d..e3c9b3fe8 100644
--- a/changedetectionio/tests/test_ui.py
+++ b/changedetectionio/tests/test_ui.py
@@ -269,7 +269,7 @@ def test_ui_viewed_unread_flag(client, live_server, measure_memory_usage, datast
assert res.data.count(b'data-watch-uuid') == 2
# one should now be viewed, but two in total still
- client.get(url_for("ui.ui_views.diff_history_page", uuid="first"))
+ client.get(url_for("ui.ui_diff.diff_history_page", uuid="first"))
res = client.get(url_for("watchlist.index"))
assert b'1' in res.data
assert res.data.count(b'data-watch-uuid') == 2
diff --git a/changedetectionio/tests/test_unique_lines.py b/changedetectionio/tests/test_unique_lines.py
index 285d3117e..294578c87 100644
--- a/changedetectionio/tests/test_unique_lines.py
+++ b/changedetectionio/tests/test_unique_lines.py
@@ -152,7 +152,7 @@ def test_sort_lines_functionality(client, live_server, measure_memory_usage, dat
assert b'has-unread-changes' in res.data
res = client.get(
- url_for("ui.ui_views.preview_page", uuid="first"),
+ url_for("ui.ui_preview.preview_page", uuid="first"),
follow_redirects=True
)
@@ -195,7 +195,7 @@ def test_extra_filters(client, live_server, measure_memory_usage, datastore_path
wait_for_all_checks(client)
res = client.get(
- url_for("ui.ui_views.preview_page", uuid="first")
+ url_for("ui.ui_preview.preview_page", uuid="first")
)
assert res.data.count(b"see what happens.") == 1
diff --git a/changedetectionio/tests/test_xpath_selector.py b/changedetectionio/tests/test_xpath_selector.py
index e8eabf0e0..bc6372366 100644
--- a/changedetectionio/tests/test_xpath_selector.py
+++ b/changedetectionio/tests/test_xpath_selector.py
@@ -178,7 +178,7 @@ def test_check_xpath_text_function_utf8(client, live_server, measure_memory_usag
# The service should echo back the request headers
res = client.get(
- url_for("ui.ui_views.preview_page", uuid="first"),
+ url_for("ui.ui_preview.preview_page", uuid="first"),
follow_redirects=True
)
@@ -214,7 +214,7 @@ def test_check_markup_xpath_filter_restriction(client, live_server, measure_memo
wait_for_all_checks(client)
# view it/reset state back to viewed
- client.get(url_for("ui.ui_views.diff_history_page", uuid="first"), follow_redirects=True)
+ client.get(url_for("ui.ui_diff.diff_history_page", uuid="first"), follow_redirects=True)
# Make a change
set_modified_response(datastore_path=datastore_path)
@@ -310,7 +310,7 @@ def test_xpath1_lxml(client, live_server, measure_memory_usage, datastore_path):
assert b'_ElementStringResult' not in res.data # tested with 5.1.1 when it was removed and 5.1.0
assert b'Exception' not in res.data
res = client.get(
- url_for("ui.ui_views.preview_page", uuid="first"),
+ url_for("ui.ui_preview.preview_page", uuid="first"),
follow_redirects=True
)
@@ -359,7 +359,7 @@ def test_check_with_prefix_include_filters(client, live_server, measure_memory_u
wait_for_all_checks(client)
res = client.get(
- url_for("ui.ui_views.preview_page", uuid="first"),
+ url_for("ui.ui_preview.preview_page", uuid="first"),
follow_redirects=True
)
@@ -437,7 +437,7 @@ def test_xpath_20(client, live_server, measure_memory_usage, datastore_path):
wait_for_all_checks(client)
res = client.get(
- url_for("ui.ui_views.preview_page", uuid="first"),
+ url_for("ui.ui_preview.preview_page", uuid="first"),
follow_redirects=True
)
@@ -471,7 +471,7 @@ def test_xpath_20_function_count(client, live_server, measure_memory_usage, data
wait_for_all_checks(client)
res = client.get(
- url_for("ui.ui_views.preview_page", uuid="first"),
+ url_for("ui.ui_preview.preview_page", uuid="first"),
follow_redirects=True
)
@@ -504,7 +504,7 @@ def test_xpath_20_function_count2(client, live_server, measure_memory_usage, dat
wait_for_all_checks(client)
res = client.get(
- url_for("ui.ui_views.preview_page", uuid="first"),
+ url_for("ui.ui_preview.preview_page", uuid="first"),
follow_redirects=True
)
@@ -538,7 +538,7 @@ def test_xpath_20_function_string_join_matches(client, live_server, measure_memo
wait_for_all_checks(client)
res = client.get(
- url_for("ui.ui_views.preview_page", uuid=uuid),
+ url_for("ui.ui_preview.preview_page", uuid=uuid),
follow_redirects=True
)
@@ -575,7 +575,7 @@ def _subtest_xpath_rss(client, datastore_path, content_type='text/html'):
wait_for_all_checks(client)
res = client.get(
- url_for("ui.ui_views.preview_page", uuid="first"),
+ url_for("ui.ui_preview.preview_page", uuid="first"),
follow_redirects=True
)
diff --git a/changedetectionio/tests/visualselector/test_fetch_data.py b/changedetectionio/tests/visualselector/test_fetch_data.py
index 2354e0510..f10519ae3 100644
--- a/changedetectionio/tests/visualselector/test_fetch_data.py
+++ b/changedetectionio/tests/visualselector/test_fetch_data.py
@@ -47,7 +47,7 @@ def test_visual_selector_content_ready(client, live_server, measure_memory_usage
assert live_server.app.config['DATASTORE'].data['watching'][uuid].history_n >= 1, "Watch history had atleast 1 (everything fetched OK)"
res = client.get(
- url_for("ui.ui_views.preview_page", uuid=uuid),
+ url_for("ui.ui_preview.preview_page", uuid=uuid),
follow_redirects=True
)
assert b"testheader: yes" in res.data
@@ -131,7 +131,7 @@ def test_basic_browserstep(client, live_server, measure_memory_usage, datastore_
# Check HTML conversion detected and workd
res = client.get(
- url_for("ui.ui_views.preview_page", uuid=uuid),
+ url_for("ui.ui_preview.preview_page", uuid=uuid),
follow_redirects=True
)
assert b"This text should be removed" not in res.data