diff --git a/src/feditest/cli/utils.py b/src/feditest/cli/utils.py
index b25360f..a0093c4 100644
--- a/src/feditest/cli/utils.py
+++ b/src/feditest/cli/utils.py
@@ -110,7 +110,7 @@ def create_session_template_from_tests(args: Namespace) -> TestPlanSession:
for constellation_role_name in constellation_role_names:
constellation_roles[constellation_role_name] = None
- session = TestPlanSession(TestPlanConstellation(constellation_roles), test_plan_specs)
+ session = TestPlanSession(TestPlanConstellation(constellation_roles), test_plan_specs, args.name)
return session
diff --git a/src/feditest/nodedrivers/mastodon/__init__.py b/src/feditest/nodedrivers/mastodon/__init__.py
index f049fc8..734452d 100644
--- a/src/feditest/nodedrivers/mastodon/__init__.py
+++ b/src/feditest/nodedrivers/mastodon/__init__.py
@@ -354,7 +354,7 @@ def actor_has_received_object(self, object_uri: str) -> dict[str, Any]:
response = find_first_in_array(elements, lambda s: s['uri'] == object_uri)
if not response:
# Home timeline second case: an announce/boost was created by an account we follow -- need to look for the original URI
- if reblog_response := find_first_in_array(elements, lambda s: 'reblog' in s and s['reblog']['uri'] == object_uri) :
+ if reblog_response := find_first_in_array(elements, lambda s: 'reblog' in s and s['reblog'] and 'uri' in s['reblog'] and s['reblog']['uri'] == object_uri) :
response = reblog_response['reblog']
if not response:
# Check for it in notifications: mentions arrive here
@@ -458,7 +458,7 @@ def _find_account_dict_by_other_actor_acct_uri(self, other_actor_acct_uri: str)
raise ValueError(f'Unexpected type: { ret }')
- def _find_note_dict_by_uri(self, uri: str) -> dict[str,Any]:
+ def _find_note_dict_by_uri(self, uri: str) -> dict[str,Any] | None:
"""
Find a the dict for a status, or None.
"""
@@ -470,6 +470,8 @@ def _find_note_dict_by_uri(self, uri: str) -> dict[str,Any]:
results = self.http_get('/api/v2/search?' + urlencode(args))
ret = find_first_in_array(results.get('statuses'), lambda b: b['uri'] == uri)
+ if ret is None:
+ return None
if isinstance(ret, dict):
return cast(dict[str,Any], ret)
raise ValueError(f'Unexpected type: { ret }')
diff --git a/src/feditest/templates/default/partials/test_matrix/title.jinja2 b/src/feditest/templates/default/partials/test_matrix/title.jinja2
index f7a3be0..2386cb7 100644
--- a/src/feditest/templates/default/partials/test_matrix/title.jinja2
+++ b/src/feditest/templates/default/partials/test_matrix/title.jinja2
@@ -1,4 +1,4 @@
{{ run.id }}Feditest Report: {{ run.plan.name }}
+ Feditest Summary Report: {{ run.plan.name }}
Started {{ format_timestamp(run_test.started) }}, ended {{ format_timestamp(run_test.ended) }}
-{%- with result=run_test.worst_result %} +Started {{ format_timestamp(run_test.started) }}, ended {{ format_timestamp(run_test.ended) }} (duration: {{ format_duration(run_test.ended - run_test.started) }})
+ {%- with result=run_test.worst_result %} {%- include "partials/test_session/testresult.jinja2" %} {%- endwith %} {%- for test_step_index, run_step in enumerate(run_test.run_steps or []) %} @@ -56,8 +56,7 @@ {%- if test_step_meta.description %}Started {{ format_timestamp(run_step.started) }}, ended {{ format_timestamp(run_step.ended) }}
- +Started {{ format_timestamp(run_test.started) }}, ended {{ format_timestamp(run_test.ended) }} (duration: {{ format_duration(run_test.ended - run_test.started) }})
{%- with result=run_step.result, idmod='step' %} {%- include "partials/test_session/testresult.jinja2" %} {%- endwith %} diff --git a/src/feditest/templates/default/partials/test_session/testresult.jinja2 b/src/feditest/templates/default/partials/test_session/testresult.jinja2 index 87f2aa0..0272b5e 100644 --- a/src/feditest/templates/default/partials/test_session/testresult.jinja2 +++ b/src/feditest/templates/default/partials/test_session/testresult.jinja2 @@ -2,8 +2,10 @@{{ result }}+
{{ html_escape(result) }}
{{ run.id }} [Test Matrix]
+{{ run.id }} [Summary]