mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-08 23:15:24 +02:00
clean up
This commit is contained in:
parent
2677f7c3d3
commit
1cf2b5d057
2 changed files with 26 additions and 21 deletions
|
@ -19,9 +19,9 @@ function sendWebhook(payload: Record<string, any>) {
|
|||
})
|
||||
|
||||
return cy
|
||||
.request({
|
||||
.apiRequest({
|
||||
method: 'POST',
|
||||
url: `${Cypress.env('API_URL')}/stripe/webhook`,
|
||||
url: '/stripe/webhook',
|
||||
headers: {
|
||||
['stripe-signature']: signature,
|
||||
},
|
||||
|
|
|
@ -1,6 +1,29 @@
|
|||
import './commands'
|
||||
|
||||
beforeEach(() => {
|
||||
authenticateCIUser()
|
||||
cy.apiRequest({
|
||||
method: 'POST',
|
||||
url: 'e2e/reset',
|
||||
body: {},
|
||||
}).then((response) => {
|
||||
expect(response.status).to.equal(200)
|
||||
})
|
||||
cy.visit('/')
|
||||
})
|
||||
|
||||
after(() => {
|
||||
authenticateCIUser()
|
||||
cy.apiRequest({
|
||||
method: 'POST',
|
||||
url: 'e2e/clean',
|
||||
body: {},
|
||||
}).then((response) => {
|
||||
expect(response.status).to.equal(200)
|
||||
})
|
||||
})
|
||||
|
||||
function authenticateCIUser() {
|
||||
cy.request({
|
||||
method: 'GET',
|
||||
url: 'api/auth/csrf',
|
||||
|
@ -31,22 +54,4 @@ beforeEach(() => {
|
|||
expect(response.status).to.equal(200)
|
||||
})
|
||||
})
|
||||
cy.apiRequest({
|
||||
method: 'POST',
|
||||
url: 'e2e/reset',
|
||||
body: {},
|
||||
}).then((response) => {
|
||||
expect(response.status).to.equal(200)
|
||||
})
|
||||
cy.visit('/')
|
||||
})
|
||||
|
||||
after(() => {
|
||||
cy.apiRequest({
|
||||
method: 'POST',
|
||||
url: 'e2e/clean',
|
||||
body: {},
|
||||
}).then((response) => {
|
||||
expect(response.status).to.equal(200)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue