From 1d48b2aa162fb5ea72d4e5ab4dee85817c2fa291 Mon Sep 17 00:00:00 2001 From: Fotis Baltoumas Date: Fri, 18 Sep 2026 17:39:44 +0300 Subject: [PATCH 1/2] progress bars on file input file upload, import, example data --- frontend/e2e/smoke.spec.ts | 30 ++++++++++++++++++++++++++++++ frontend/norma.html | 3 ++- frontend/src/enrichment.ts | 9 ++++++--- frontend/src/layouts/controls.ts | 29 +++++++++++++++++++++++++---- frontend/src/uploads.ts | 17 ++++++++++++++--- 5 files changed, 77 insertions(+), 11 deletions(-) diff --git a/frontend/e2e/smoke.spec.ts b/frontend/e2e/smoke.spec.ts index 545a14d..ec8022d 100644 --- a/frontend/e2e/smoke.spec.ts +++ b/frontend/e2e/smoke.spec.ts @@ -267,3 +267,33 @@ test('OmniPath search is case-insensitive: a lowercase query is sent to the API await expect.poll(() => requestedUrl).toContain('partners=EGFR') expect(requestedUrl).not.toContain('partners=egfr') }) + +test('Upload Data panels report loading progress at the bottom of their own section', async ({ + page, +}) => { + await page.goto('/') + + // Examples: opening one reports progress in #examplesStatus, not #normaStatus + await page.locator('.section[data-tint="examples"] h3').click() + await page.locator('#btnSample').click() + await expect(page.locator('#examplesStatus .note.ok')).toContainText(/opened/i) + + // Files: reading an uploaded file reports progress in #normaStatus (already + // covered structurally elsewhere; here we just confirm it still ends well) + await page.locator('#filesSection h3').click() + await page.setInputFiles('#normaFileInput', { + name: 'network2.txt', + mimeType: 'text/plain', + buffer: Buffer.from('Source\tTarget\nX\tY\n'), + }) + await expect(page.locator('#normaStatus .note.ok').first()).toContainText(/added/i) + + // Open saved work: a settings file reports progress in #savedWorkStatus + await page.locator('.section[data-tint="saved"] h3').click() + await page.setInputFiles('#configFileInput', { + name: 'norma-settings.json', + mimeType: 'application/json', + buffer: Buffer.from(JSON.stringify({ themeSelect: 'dark' })), + }) + await expect(page.locator('#savedWorkStatus .note.ok')).toContainText(/applied settings/i) +}) diff --git a/frontend/norma.html b/frontend/norma.html index 92907c0..75c7364 100644 --- a/frontend/norma.html +++ b/frontend/norma.html @@ -135,6 +135,7 @@