-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflows.js
More file actions
40 lines (35 loc) · 945 Bytes
/
Copy pathflows.js
File metadata and controls
40 lines (35 loc) · 945 Bytes
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
require('dotenv').config();
const {
clickText,
signIntoIntegrationSite,
signOut,
login,
} = require('./shared');
const APPLICANT = 'APPLICANT';
const ADMIN = 'ADMIN';
async function findAGrant(page) {
await signIntoIntegrationSite(page);
await page.goto(process.env.BASE_URL);
await clickText(page, 'Manage notifications and saved searches');
await login(page, APPLICANT);
await signOut(page);
}
async function applicant(page) {
await signIntoIntegrationSite(page);
await page.goto(process.env.APPLICANT_BASE_URL);
await clickText(page, 'Sign in with GOV.UK One Login');
await login(page, APPLICANT);
await signOut(page);
}
async function admin(page) {
await signIntoIntegrationSite(page);
await page.goto(process.env.APPLICANT_BASE_URL);
await clickText(page, 'Sign in with GOV.UK One Login');
await login(page, ADMIN);
await signOut(page);
}
module.exports = {
findAGrant,
admin,
applicant,
};