Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#15230 Add positive integration scenario. #15232

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

DanielLipowicz
Copy link

Due to lack of positive integration tests in repository I decided to add one for "/bug-report" endpoint.

Fixes put_#_and_issue_number_here

Changes


UUID:

Due to lack of positive integration tests in repository I decided to add one for "/bug-report" endpoint.
On CI/CD there was one test failing due to my mistake with comparing object properties. I was mentioned hasOwnProperties, but I've tried wrongly to simplify to if statement.
Following eslint issues and commit about `.editorcofig` from AccioBooks <[email protected]> on 8/31/2016 at 7:44 PM I decided to fix all wrongly encoded new lines.
Based on article https://www.aleksandrhovhannisyan.com/blog/crlf-vs-lf-normalizing-line-endings-in-git/ it should help in long term to keep new line issues in the future.
@DanielLipowicz
Copy link
Author

@SabreCat it seems to be ready to be reviewed 😄
I will be happy to receive any feedback from you.

Copy link
Member

@negue negue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a question on the requester.js change but otherwise LGTM

@@ -99,7 +99,13 @@ function _parseRes (res) {
message: res.body.message,
};
}
return res.body.data;
if (Object.prototype.hasOwnProperty.call(res.body, 'data')) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you tell me why this change is needed? this doesn't seem to be needed for the test above or I'm missing something 😬

Copy link
Author

@DanielLipowicz DanielLipowicz Jul 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because there are almost no of positive testing in repository. I had to modify requester logic.

    if (res.body.message) {
      return {
        data: res.body.data,
        message: res.body.message,
      };
    }

So far it was returning only if message was included.
For this test I basically need whole response if there is any. So that's why I need to expand this class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants