-
Notifications
You must be signed in to change notification settings - Fork 888
Expand file tree
/
Copy pathclient.spec.ts
More file actions
66 lines (53 loc) · 1.95 KB
/
client.spec.ts
File metadata and controls
66 lines (53 loc) · 1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/**
* Copyright since 2025 Mifos Initiative
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
import { test, expect } from '@playwright/test';
import { LoginPage } from '../pages/login.page';
import { ClientPage } from '../pages/client.page';
/**
* Client Module E2E Tests
*
* Validates the core client management functionality of the Mifos X Web App.
*
* Prerequisites:
* - Angular dev server running on http://localhost:4200
* - Fineract backend accessible (via proxy to https://localhost:8443)
*
* Test Data:
* - Valid credentials: mifos / password
*/
// Skip in CI - requires Fineract backend
test.skip(!!process.env.CI, 'Requires Fineract backend');
test.describe('Client Module', () => {
let loginPage: LoginPage;
let clientPage: ClientPage;
test.beforeEach(async ({ page }) => {
loginPage = new LoginPage(page);
clientPage = new ClientPage(page);
await loginPage.navigate();
await loginPage.loginAndWaitForDashboard('mifos', 'password');
});
test('should display the client list', async () => {
await clientPage.navigateToClients();
await clientPage.assertClientListVisible();
await expect(clientPage.createClientButton).toBeVisible();
});
test('should open the create client form', async ({ page }) => {
await clientPage.navigateToClients();
await clientPage.openCreateClientForm();
await clientPage.assertCreateFormVisible();
await expect(page).toHaveURL(/.*clients\/create.*/);
});
test('should open a client profile', async () => {
await clientPage.navigateToClients();
// Trigger search to populate the table
await clientPage.searchClient('');
await expect(clientPage.clientRows.first()).toBeVisible({ timeout: 30000 });
await clientPage.openClientProfile();
await clientPage.assertClientDetailVisible();
});
});