fix: more alignment with the old shell
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user