test: folder tests

This commit is contained in:
Jakub P
2025-04-09 20:01:36 +02:00
parent 1f6010bdea
commit 3b9f86a547
15 changed files with 488 additions and 8 deletions

View File

@@ -1,12 +1,16 @@
const { expect } = require('../fixtures/index');
export const getToken = async (apiRequest) => {
export const getToken = async (
apiRequest,
email = process.env.LOGIN_EMAIL,
password = process.env.LOGIN_PASSWORD
) => {
const tokenResponse = await apiRequest.post(
`${process.env.BACKEND_APP_URL}/internal/api/v1/access-tokens`,
{
data: {
email: process.env.LOGIN_EMAIL,
password: process.env.LOGIN_PASSWORD,
email: email,
password: password,
},
}
);