-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
155 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
e2e/src/programmatic/grouping/server/controllers/__snapshots__/forgotPassword.test.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`POST /forgot-password should return 401 if user is not found 1`] = ` | ||
{ | ||
"code": 401, | ||
"seed": 0.06426173461501827, | ||
} | ||
`; |
4 changes: 3 additions & 1 deletion
4
e2e/src/programmatic/grouping/server/controllers/forgotPassword.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import type { TestInvocationMetadata } from 'jest-metadata'; | ||
import type { Stage } from 'jest-allure2-reporter'; | ||
|
||
import { STAGE } from '../constants'; | ||
|
||
export const getStage = (testInvocation: TestInvocationMetadata) => { | ||
for (const invocation of testInvocation.allInvocations()) { | ||
if (invocation.get(STAGE) === 'interrupted') { | ||
return 'interrupted'; | ||
} | ||
} | ||
|
||
return testInvocation.get(STAGE) as Stage | undefined; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import type { TestInvocationMetadata } from 'jest-metadata'; | ||
import type { Status, StatusDetails } from 'jest-allure2-reporter'; | ||
|
||
import { STATUS, STATUS_DETAILS } from '../constants'; | ||
|
||
export const getStatus = (testInvocation: TestInvocationMetadata) => { | ||
let status: Status | undefined; | ||
let statusDetails: StatusDetails | undefined; | ||
|
||
const items = [...testInvocation.allInvocations(), testInvocation].reverse(); | ||
for (const item of items) { | ||
status ??= item.get(STATUS) as Status; | ||
statusDetails ??= item.get(STATUS_DETAILS) as StatusDetails; | ||
if (status && statusDetails) { | ||
break; | ||
} | ||
} | ||
|
||
return { | ||
status, | ||
statusDetails, | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
export * from './getStage'; | ||
export * from './getStart'; | ||
export * from './getStatus'; | ||
export * from './getStop'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.