This repository was archived by the owner on Feb 3, 2023. It is now read-only.
Open
Conversation
Collaborator
vaidasmaciulis
left a comment
There was a problem hiding this comment.
Please solve merge conflicts.
| let mocker = new RequestMocker(); | ||
| let helpers = new Helpers(); | ||
|
|
||
| it("Recording all requests and replaying it on the second test run google", async () => { |
| await mocker.stop(); | ||
|
|
||
| //Assert | ||
| expect(fs.existsSync("mockData\\Request mocking by recording and replaying and indercetipt specific requests\\Recording all requests and replaying it on the second test run google\\interceptors\\get.json")).toBe(true); |
Collaborator
There was a problem hiding this comment.
Please use "/" slashes to be cross-platform and consistent with other paths in framework
| await mocker.stop(); | ||
|
|
||
| //Assert | ||
| expect(fs.existsSync("mockData\\Request mocking by recording and replaying and indercetipt specific requests\\Recording all requests and replaying it on the second test run google\\interceptors\\get.json")).toBe(true); |
Collaborator
There was a problem hiding this comment.
Path should be updated according to describe: "Request mocking by recording and replaying and indercetipt specific requests" > "Request mocking by recording and replaying specific requests"
| const targetDir = `./mockData/${jasmine["currentSuite"].fullName}/${jasmine["currentTest"].description}`; | ||
| await teremock.start({ page, wd: targetDir, interceptors: { interceptors } }); | ||
| } | ||
| } No newline at end of file |
Collaborator
There was a problem hiding this comment.
There is no constructor, class should be refactored to single ton pattern, like i.e.: https://github.com/devbridge/test-juggler/blob/master/framework/interceptor.js
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Added helper class requestMocker into framework
Added sample tests - requestMocking.test.js
Added documentation to Readme