fix(ui): use absolute paths for modal assets

Updates `profile-modal.html` and `application-form.html` to use root-relative paths for images and iframes, fixing 404 errors in E2E tests. Adds a preflight check to `tests/e2e/ui-modals.spec.ts` to verify asset availability.
This commit is contained in:
google-labs-jules[bot] committed 2026-01-22 17:24:58 +00:00
1 parent 1758109420
commit f3e3f6068d
3 files changed
+14 -2

No files matched your search

+1 -1
View File
@@ -46,7 +46,7 @@
<div id="nostrFormModalDescription" class="modal-body">
<div class="modal-embed-frame">
<iframe
src="./components/iframe_forms/iframe-application-form.html"
src="/components/iframe_forms/iframe-application-form.html"
class="h-full w-full rounded-lg border border-border/30 shadow-sm"
frameborder="0"
></iframe>
+1 -1
View File
@@ -238,7 +238,7 @@
>
<img
id="profileModalAvatar"
src="assets/svg/default-profile.svg"
src="/assets/svg/default-profile.svg"
alt="Active profile avatar"
class="h-full w-full object-cover"
/>
+12
View File
@@ -6,6 +6,18 @@ import {
} from "./helpers/uiTestUtils";
test.describe("login modal flows", () => {
test("preflight check for asset availability", async ({ request }) => {
const assets = [
"/assets/svg/default-profile.svg",
"/components/iframe_forms/iframe-application-form.html",
];
for (const asset of assets) {
const response = await request.get(asset);
expect(response.status(), `Asset ${asset} should be available`).toBe(200);
}
});
test.beforeEach(async ({ page }) => {
await applyReducedMotion(page);
failOnConsoleErrors(page);