Built merchant management, activity history, and the pipeline

This commit is contained in:
Oleksandr Prokhorenko
2026-09-24 20:50:15 +03:00
parent 5de240fda3
commit 382f6e8841
43 changed files with 4679 additions and 812 deletions
+14 -6
View File
@@ -64,6 +64,7 @@ for (const language of ['en', 'ru'])
.first()
.click();
await expect(page.locator('h1')).toHaveText('Luma Labs');
await page.getByRole('tab', { name: /^(Onboarding|Онбординг)$/ }).click();
await expect(
page.getByText(/Please clarify the beneficial ownership/).first(),
).toBeVisible();
@@ -82,7 +83,9 @@ for (const language of ['en', 'ru'])
await page.keyboard.press('Escape');
await expect(page.getByRole('dialog')).not.toBeVisible();
await page.goto('/app/merchants');
await page.getByRole('combobox').selectOption('LIVE');
await page
.getByRole('combobox', { name: /Filter by stage|Фильтр по этапу/ })
.selectOption('LIVE');
await expect(page.getByRole('link', { name: /Sunday Market/ }).first()).toBeVisible();
await page.getByRole('textbox').fill('no-such-merchant');
await expect(page.getByText(/No merchants found|Мерчанты не найдены/)).toBeVisible();
@@ -92,9 +95,8 @@ for (const language of ['en', 'ru'])
await expect(page.locator('h1')).toHaveText(language === 'en' ? 'Pipeline' : 'Воронка');
if (width === 390) await page.getByRole('combobox').selectOption('KYB');
await expect(page.getByRole('link', { name: /Luma Labs/ })).toBeVisible();
await expect(
page.getByRole('heading', { name: /Closed · Rejected|Закрыто · Отклонён/ }),
).toBeVisible();
if (width === 390) await page.getByRole('combobox').selectOption('REJECTED');
await expect(page.getByRole('heading', { name: /^(Rejected|Отклонён)$/ })).toBeVisible();
await noOverflow(page);
await page.screenshot({ path: info.outputPath('pipeline.png'), fullPage: true });
await page.goto('/app/tasks');
@@ -178,7 +180,7 @@ test('loading, retryable errors, empty states, session expiry and reduced motion
).toBeVisible();
await page.unroute('**/api/pipeline');
await page.getByRole('button', { name: 'Try again' }).click();
await expect(page.getByRole('heading', { name: 'Closed · Rejected' })).toBeVisible();
await expect(page.getByRole('heading', { name: 'Rejected', exact: true })).toBeVisible();
await page.route('**/api/tasks?**', (route) => route.fulfill({ json: [] }));
await page.goto('/app/tasks');
await expect(page.getByText('You’re all caught up here')).toBeVisible();
@@ -237,6 +239,7 @@ test('Head assignment, manager editing, Compliance decisions and manager activat
.fill('246000.75');
await save();
await expect(page.getByText('Director of Partnerships', { exact: true })).toBeVisible();
await page.getByRole('tab', { name: 'Activity', exact: true }).click();
await page.getByRole('button', { name: 'Log interaction', exact: true }).click();
await page.getByRole('dialog').getByLabel('Interaction type').selectOption('CALL');
await page
@@ -247,6 +250,7 @@ test('Head assignment, manager editing, Compliance decisions and manager activat
await expect(
page.getByText('Confirmed the launch requirements in a discovery call.', { exact: true }),
).toBeVisible();
await page.getByRole('tab', { name: 'Tasks', exact: true }).click();
await page.getByRole('button', { name: 'Add task', exact: true }).click();
await page
.getByRole('dialog')
@@ -259,6 +263,7 @@ test('Head assignment, manager editing, Compliance decisions and manager activat
await advance('Contacted');
await advance('Qualified');
await advance('KYB');
await page.getByRole('tab', { name: 'Onboarding', exact: true }).click();
for (let i = 0; i < 4; i++) {
await page.getByRole('button', { name: 'Update document', exact: true }).nth(i).click();
await page
@@ -268,8 +273,9 @@ test('Head assignment, manager editing, Compliance decisions and manager activat
await save();
}
await advance('Compliance Review');
await expect(page.getByRole('button', { name: 'Record decision', exact: true })).toHaveCount(0);
await expect(page.getByRole('button', { name: 'Record decision', exact: true })).toBeDisabled();
await switchAccount('compliance');
await page.getByRole('tab', { name: 'Onboarding', exact: true }).click();
await page.getByRole('button', { name: 'Record decision', exact: true }).click();
await page
.getByRole('dialog')
@@ -285,6 +291,7 @@ test('Head assignment, manager editing, Compliance decisions and manager activat
.fill('Please sign and date the declaration.');
await save();
await switchAccount('alex');
await page.getByRole('tab', { name: 'Onboarding', exact: true }).click();
const ownership = page
.locator('#checklist > div > div')
.filter({ hasText: 'Ownership structure' });
@@ -300,6 +307,7 @@ test('Head assignment, manager editing, Compliance decisions and manager activat
await save();
await advance('Compliance Review');
await switchAccount('compliance');
await page.getByRole('tab', { name: 'Onboarding', exact: true }).click();
await page.getByRole('button', { name: 'Record decision', exact: true }).click();
await page
.getByRole('dialog')