mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
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:
1 parent
1758109420
commit
f3e3f6068d
3 files changed
+14
-2
No files matched your search
@@ -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>
|
||||
|
||||
@@ -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"
|
||||
/>
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user