Skip to content

Commit

Permalink
fix test becoming flaky
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentporte committed Mar 5, 2025
1 parent 135ea5b commit 0c7095a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lacommunaute/search/__snapshots__/tests.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
<h3 class="h4 mb-0">Aucun résultat ? Posez votre question dans l'espace d'échanges !</h3>
</div>
<div class="col-12 col-md-auto mt-3 mt-md-0 d-flex align-items-center justify-content-center">
<a class="btn btn-outline-primary btn-ico btn-block matomo-event" data-matomo-action="contribute" data-matomo-category="engagement" data-matomo-option="new_topic_after_search" href="/forum/forrest-gump-42/topic/create/" rel="nofollow">
<a class="btn btn-outline-primary btn-ico btn-block matomo-event" data-matomo-action="contribute" data-matomo-category="engagement" data-matomo-option="new_topic_after_search" href="/forum/forrest-gump-PK/topic/create/" rel="nofollow">
<i class="ri-chat-new-line ri-lg"></i>
<span>Poser une question</span>
</a>
Expand Down Expand Up @@ -274,7 +274,7 @@
<h3 class="h4 mb-0">Aucun résultat ? Posez votre question dans l'espace d'échanges !</h3>
</div>
<div class="col-12 col-md-auto mt-3 mt-md-0 d-flex align-items-center justify-content-center">
<a class="btn btn-outline-primary btn-ico btn-block matomo-event" data-matomo-action="contribute" data-matomo-category="engagement" data-matomo-option="new_topic_after_search" href="/forum/forrest-gump-42/topic/create/" rel="nofollow">
<a class="btn btn-outline-primary btn-ico btn-block matomo-event" data-matomo-action="contribute" data-matomo-category="engagement" data-matomo-option="new_topic_after_search" href="/forum/forrest-gump-PK/topic/create/" rel="nofollow">
<i class="ri-chat-new-line ri-lg"></i>
<span>Poser une question</span>
</a>
Expand Down
2 changes: 1 addition & 1 deletion lacommunaute/search/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def test_extra_context(client, db, user, snapshot_name, search_url, snapshot):
datas = {"m": "TOPIC", "q": " ".join(["Bubba", "Gump", "Shrimp", "Co."])}
response = client.get(search_url, datas)
content = parse_response_to_soup(
response, selector="main", replace_in_href=[(forum.slug, "forrest-gump"), (str(forum.pk), "42")]
response, selector="main", replace_in_href=[(f"{forum.slug}-{forum.pk}", "forrest-gump-PK")]
)
assert str(content) == snapshot(name=snapshot_name)

Expand Down

0 comments on commit 0c7095a

Please sign in to comment.