Skip to content

Commit

Permalink
test: brought back generic api mock step for publication tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffdowdle committed Aug 17, 2023
1 parent 1493fd9 commit dcbae1b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/ripple-test-utils/step_definitions/common/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ Given(`the mock server has been stopped`, () => {
cy.log('the mock server has been stopped')
})

Given(
`the endpoint {string} with query {string} returns fixture {string} with status {int}`,
(route: string, query: string, fixture: string, status: number) => {
cy.fixture(fixture).then((response) => {
cy.task('setMockRouteWithQuery', { route, status, response, query })
})
}
)

Given(
`the site endpoint returns fixture {string} with status {int}`,
(fixture: string, status: number) => {
Expand Down

0 comments on commit dcbae1b

Please sign in to comment.