Skip to content

Commit

Permalink
[uss_qualifier/scenarios/documentation] Allow additional checks when …
Browse files Browse the repository at this point in the history
…a step is linked
  • Loading branch information
mickmis committed Sep 15, 2023
1 parent ce65353 commit 295d592
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions monitoring/uss_qualifier/scenarios/documentation/parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,17 +135,16 @@ def _parse_test_step(
name = name[0 : -len(TEST_STEP_SUFFIX)]
url = _url_of(doc_filename + anchors[values[0]])

checks: List[TestCheckDocumentation] = []
if values[0].children and isinstance(
values[0].children[0], marko.block.inline.Link
):
# We should include the content of the linked test step document rather
# than extracting content from this section.
step = _get_linked_test_step(values[0].children[0].dest, doc_filename)
step = TestStepDocumentation(step)
step.name = name
return step
# We include the content of the linked test step document before
# extracting content from this section.
linked_step = _get_linked_test_step(values[0].children[0].dest, doc_filename)
url = linked_step.url
checks = linked_step.checks.copy()

checks: List[TestCheckDocumentation] = []
c = 1
while c < len(values):
if isinstance(values[c], marko.block.Heading):
Expand Down

0 comments on commit 295d592

Please sign in to comment.