refactor: simplify resource queries and layout tests
This commit was merged in pull request #40.
This commit is contained in:
@@ -660,26 +660,6 @@ describe("AccountPage states", () => {
|
||||
).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("renders the bonds section as a single-column grid on any screen width", () => {
|
||||
renderPage(
|
||||
<AccountPageLoaded
|
||||
{...loadedProps({
|
||||
...portfolio,
|
||||
positions: [portfolio.positions[1]],
|
||||
})}
|
||||
/>,
|
||||
);
|
||||
const singleColumnGrids = Array.from(document.querySelectorAll("style"))
|
||||
.map((style) => (style.textContent ?? "").replace(/\s/g, ""))
|
||||
.filter(
|
||||
(css) =>
|
||||
css.includes("--sg-cols:1") &&
|
||||
!css.includes("@media") &&
|
||||
!/--sg-cols:[23]/.test(css),
|
||||
);
|
||||
expect(singleColumnGrids).toHaveLength(1);
|
||||
});
|
||||
|
||||
it("keeps other-position cards compact with labeled return and no logo", () => {
|
||||
renderPage(
|
||||
<AccountPageLoaded
|
||||
|
||||
Reference in New Issue
Block a user