# Test info

- Name: Verify feature Search >> REQ_004 - Verify when change entries per page
- Location: /root/code/portal-automation-test/tests/request/request-004.spec.ts:21:9

# Error details

```
Error: Timed out 10000ms waiting for expect(locator).toBeVisible()

Locator: locator('//div[@id=\'root\' and @class=\'dashboard-index\']')
Expected: visible
Received: <element(s) not found>
Call log:
  - expect.toBeVisible with timeout 10000ms
  - waiting for locator('//div[@id=\'root\' and @class=\'dashboard-index\']')

    at /root/code/portal-automation-test/tests/request/request-004.spec.ts:15:60
```

# Page snapshot

```yaml
- text: Email Address
- textbox "your@email.com": portal_auto_lawyer@testmail.loprx.com
- text: These credentials do not match our records. Password
- textbox "Your password"
- img
- checkbox "Remember me for 30 days"
- text: Remember me for 30 days
- button:
  - img
- button "Log in"
- paragraph:
  - text: By continuing, you agree to the
  - link "Terms of Use":
    - /url: https://portalassistant.com/terms-of-service/
  - text: ","
  - link "Privacy Policy":
    - /url: https://portalassistant.com/privacy-policy/
  - text: and
  - link "Business Associate Agreement":
    - /url: https://portalassistant.com/baa/
- link "Forgot Password":
  - /url: https://qa.loprx.com/forgot-password
- link "Login with passcode":
  - /url: https://qa.loprx.com/sign-in-with-passcode
```

# Test source

```ts
   1 | import { test, expect } from '../../fixtures';
   2 | import { LoginPage } from '../../pom/login.page';
   3 | import { ReqPage } from '../../pom/request.page';
   4 |
   5 | test.describe('Verify feature Search', () => {
   6 |     let loginPage: LoginPage;
   7 |     let reqPage: ReqPage;
   8 |
   9 |     test.beforeEach(async ({ page, conf }) => {
  10 |         loginPage = new LoginPage(page);
  11 |         reqPage = new ReqPage(page);
  12 |
  13 |         await loginPage.open();
  14 |         await loginPage.login(conf.data.username, conf.data.password);
> 15 |         await expect(loginPage.baseLoc.dashboardContainer).toBeVisible();
     |                                                            ^ Error: Timed out 10000ms waiting for expect(locator).toBeVisible()
  16 |
  17 |         await reqPage.open();
  18 |         await expect(reqPage.reqLoc.pageTitle).toBeVisible();
  19 |     });
  20 |
  21 |     test('REQ_004 - Verify when change entries per page', {
  22 |         tag: ['@REQ_004', '@request', '@ui']
  23 |     }, async () => {
  24 |         const totalRequests = await reqPage.getTotalEntries("requests?return_type=json&is_archived=false&group=0,1")
  25 |
  26 |         await test.step('Select 1 entries per page and verify pagination', async () => {
  27 |             await reqPage.selectEntriesPerPage(1);
  28 |             await expect(reqPage.reqLoc.pagingSummary).toContainText(`Showing 1 to 1 of ${totalRequests} entries`);
  29 |         });
  30 |
  31 |         await test.step('Select 2 entries per page and verify pagination', async () => {
  32 |             await reqPage.selectEntriesPerPage(2);
  33 |             await expect(reqPage.reqLoc.pagingSummary).toContainText(`Showing 1 to 2 of ${totalRequests} entries`);
  34 |         });
  35 |     });
  36 | });
  37 |
```