Skip to content

Commit

Permalink
Add smoke tests for /test-plan-report/15 as anon and admin
Browse files Browse the repository at this point in the history
  • Loading branch information
gnarf committed Jun 21, 2024
1 parent df31163 commit 08d9e3c
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion client/tests/smokeTest.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,33 @@ describe('smoke test', () => {
const h1Handle = await page.waitForSelector('h1');
const h1Text = await h1Handle.evaluate(h1 => h1.innerText);
expect(h1Text).toBe('Data Management');
})
}),
getPage(
{ role: false, url: '/test-plan-report/15' },
async page => {
// Wait for an h2 because an h1 will show while the page is
// still loading
await page.waitForSelector('h2');
const h1Handle = await page.waitForSelector('h1');
const h1Text = await h1Handle.evaluate(h1 => h1.innerText);
expect(h1Text).toBe(
'Test 1:\nNavigate forwards to a not pressed toggle button'
);
}
),
getPage(
{ role: 'admin', url: '/test-plan-report/15' },
async page => {
// Wait for an h2 because an h1 will show while the page is
// still loading
await page.waitForSelector('h2');
const h1Handle = await page.waitForSelector('h1');
const h1Text = await h1Handle.evaluate(h1 => h1.innerText);
expect(h1Text).toBe(
'Test 1:\nNavigate forwards to a not pressed toggle button'
);
}
)
]);
});
});

0 comments on commit 08d9e3c

Please sign in to comment.