test: add tests for executions
This commit is contained in:
15
packages/e2e-tests/helpers/auth-api-helper.js
Normal file
15
packages/e2e-tests/helpers/auth-api-helper.js
Normal file
@@ -0,0 +1,15 @@
|
||||
const { expect } = require('../fixtures/index');
|
||||
|
||||
export const getToken = async (apiRequest) => {
|
||||
const tokenResponse = await apiRequest.post(
|
||||
`http://localhost:${process.env.PORT}/api/v1/access-tokens`,
|
||||
{
|
||||
data: {
|
||||
email: process.env.LOGIN_EMAIL,
|
||||
password: process.env.LOGIN_PASSWORD,
|
||||
},
|
||||
}
|
||||
);
|
||||
await expect(tokenResponse.status()).toBe(200);
|
||||
return await tokenResponse.json();
|
||||
};
|
Reference in New Issue
Block a user