-
Notifications
You must be signed in to change notification settings - Fork 2
/
cypress.config.js
82 lines (76 loc) · 3.16 KB
/
cypress.config.js
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/// <reference types="cypress" />
const { defineConfig } = require('cypress')
const databaseHelper = require('./test/helpers/database-setup-for-tests')
module.exports = defineConfig({
fixturesFolder: 'test/cypress-e2e/fixtures',
screenshotsFolder: 'test/cypress-e2e/screenshots',
videosFolder: 'test/cypress-e2e/videos',
viewportWidth: 1200,
viewportHeight: 1400,
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents (on, config) {
on('task', {
/**
* Finds first claim reference for given Assisted Digital
* caseworker then deletes all records with that reference
*
* @param {String} reference email address
* @param {Date} date email EmailAddress
* @param {String} status email EmailAddress
* @param {Date} visitDate email EmailAddress
* @param {Number} increment email EmailAddress
* @param {String} paymentStatus email EmailAddress
*/
insertTestData ({ reference, date, status, visitDate, increment, paymentStatus }) {
return databaseHelper.insertTestData(reference, date, status, visitDate, increment, paymentStatus)
},
/**
* Finds first claim reference for given Assisted Digital
* caseworker then deletes all records with that reference
*
* @param {String} reference email address
* @param {Date} date email EmailAddress
* @param {String} status email EmailAddress
* @param {Date} visitDate email EmailAddress
* @param {Number} increment email EmailAddress
* @param {String} paymentStatus email EmailAddress
*/
insertTestDataAndUpdate ({ reference, date, status, visitDate, increment, paymentStatus, dateReviewed, assistedDigitalCaseworker, paymentAmount }) {
return databaseHelper.insertTestData(reference, date, status, visitDate, increment, paymentStatus, dateReviewed, assistedDigitalCaseworker, paymentAmount)
},
/**
* Finds first claim reference for given Assisted Digital
* caseworker then deletes all records with that reference
*
* @param {String} claimId Claim Id
*/
getLastTopUpAdded (claimId) {
return databaseHelper.getLastTopUpAdded(claimId)
},
/**
* Finds first claim reference for given Assisted Digital
* caseworker then deletes all records with that reference
*
* @param {String} reference Reference
*/
deleteAll (reference) {
return databaseHelper.deleteAll(reference)
},
/**
* Finds first claim reference for given Assisted Digital
* caseworker then deletes all records with that reference
*
* @param {String} reference Reference
*/
getBenefitExpiryDate (reference) {
return databaseHelper.getBenefitExpiryDate(reference)
}
})
},
baseUrl: 'http://localhost:3001',
specPattern: 'test/cypress-e2e/integration/**/*.cy.{js,jsx,ts,tsx}',
supportFile: 'test/cypress-e2e/support/index.js'
}
})