fix: more alignment with the old shell

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-04-26 07:44:31 +02:00
parent 05ef128c71
commit 689166a80d
3 changed files with 26 additions and 7 deletions

View File

@@ -228,6 +228,7 @@ defmodule BDS.Desktop.ShellLiveTest do
assert html =~ ~s(class="sidebar-section-header")
assert html =~ ~s(class="sidebar-actions")
assert html =~ ~s(data-testid="sidebar-load-more")
assert html_position(html, ~s(data-testid="sidebar-load-more")) > html_position(html, ">Archived<")
refute html =~ ~s(data-testid="sidebar-filter-tag")
assert html =~ "Alpha Post"
refute html =~ "Overflow Post"
@@ -398,6 +399,13 @@ defmodule BDS.Desktop.ShellLiveTest do
assert count == length(entries)
end
defp html_position(html, needle) do
case :binary.match(html, needle) do
{index, _length} -> index
:nomatch -> -1
end
end
defp sidebar_post(project_id, slug, title, timestamp, tags, categories) do
%{
id: Ecto.UUID.generate(),