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

test: Add branching fixes and other fixes for advance request #2865

Merged
merged 15 commits into from
Apr 16, 2024

Conversation

bistaastha
Copy link
Contributor

@bistaastha bistaastha commented Apr 15, 2024


Ellipsis 🚀 This PR description was created by Ellipsis for commit 57c98f6.

Summary:

This PR enhances the AdvanceRequestService to handle different states of advance requests, adds corresponding mock data, updates unit tests, reflects these changes in a new test file, removes an unused function, updates the last_approved_at date in advancePlatform mock data, and updates the condition for sentBackAdvance to handle 'INQUIRY' state.

Key points:

  • Enhanced AdvanceRequestService to handle different states of advance requests.
  • Added new mock data for testing different states of advance requests in /src/app/core/mock-data/extended-advance-request.data.ts and /src/app/core/mock-data/platform/v1/advance-request-platform.data.ts.
  • Updated unit tests in /src/app/core/services/advance-request.service.spec.ts.
  • Reflected changes in the test file /src/app/fyle/my-advances/my-advances.page.spec.ts.
  • Removed unused function mapScalarAdvanceStatsResponse from /src/app/core/services/tasks.service.ts.
  • Updated last_approved_at date in advancePlatform mock data in /src/app/core/mock-data/advance-platform.data.ts.
  • Updated condition for sentBackAdvance in /src/app/fyle/my-advances/my-advances.page.ts to handle 'INQUIRY' state.

Generated with ❤️ by ellipsis.dev

@github-actions github-actions bot added the size/XL Extra Large PR label Apr 15, 2024
Copy link

PR title must start with "fix:" or "feat:" or "test:"

Copy link

PR description must contain a link to a clickup

Copy link

PR title must start with "fix:" or "feat:" or "test:"

Copy link

PR description must contain a link to a clickup

@bistaastha bistaastha changed the base branch from master to FYLE-86cuxuafw-2 April 15, 2024 12:20
Copy link

PR title must start with "fix:" or "feat:" or "test:"

1 similar comment
Copy link

PR title must start with "fix:" or "feat:" or "test:"

@bistaastha bistaastha changed the title Fyle 86cuxuafw 2 test fixes test: Add branching fixes for advance request Apr 15, 2024
@bistaastha bistaastha marked this pull request as ready for review April 15, 2024 12:20
Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested.

  • Reviewed the entire pull request up to bf33ef7
  • Looked at 469 lines of code in 5 files
  • Took 2 minutes and 41 seconds to review
More info
  • Skipped 0 files when reviewing.
  • Skipped posting 2 additional comments because they didn't meet confidence threshold of 50%.
1. src/app/core/services/advance-request.service.ts:72:
  • Assessed confidence : 50%
  • Comment:
    The import of cloneDeep from lodash is not used in this file. Consider removing unused imports to keep the code clean and efficient.
  • Reasoning:
    The import of cloneDeep from lodash is not used in the advance-request.service.ts file. This is a minor issue but it's always a good practice to remove unused imports as they can lead to confusion and unnecessary increase in the bundle size.
2. src/app/core/services/tasks.service.ts:850:
  • Assessed confidence : 100%
  • Grade: 0%
  • Comment:
    The function mapScalarAdvanceStatsResponse has been removed but it is still being used here. This will cause a runtime error. Please replace it with the appropriate function or add the mapScalarAdvanceStatsResponse function back to the service.
  • Reasoning:
    The function mapScalarAdvanceStatsResponse has been removed from the TasksService but it is still being used in the getSentBackAdvanceTasks function. This will cause a runtime error when the function is called.

Workflow ID: wflow_Wki3dyRfEexgGI37


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. We'll respond in a few minutes. Learn more here.

⌛ You have 3 days remaining in your trial. Upgrade here.

@github-actions github-actions bot added size/L Large PR and removed size/XL Extra Large PR labels Apr 15, 2024
Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me!

  • Performed an incremental review on 067c2a0
  • Looked at 15 lines of code in 1 files
  • Took 1 minute and 42 seconds to review
More info
  • Skipped 0 files when reviewing.
  • Skipped posting 0 additional comments because they didn't meet confidence threshold of 50%.

Workflow ID: wflow_7ZTB7JjHIr4O2S9O


Not what you expected? You can customize the content of the reviews using rules. Learn more here.

⌛ You have 3 days remaining in your trial. Upgrade here.

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me!

  • Performed an incremental review on b53f66d
  • Looked at 69 lines of code in 1 files
  • Took 1 minute and 51 seconds to review
More info
  • Skipped 0 files when reviewing.
  • Skipped posting 1 additional comments because they didn't meet confidence threshold of 50%.
1. /src/app/fyle/my-advances/my-advances.page.spec.ts:250:
  • Assessed confidence : 0%
  • Comment:
    Good job on updating the test case to reflect the changes in the PR. This ensures that the test cases are in sync with the code changes.
  • Reasoning:
    The test case at line 250 has been updated to reflect the changes in the PR. The test case description and the expected result have been updated to include the 'sent back' state of advance requests. This is a good practice as it ensures that the test cases are in sync with the code changes.

Workflow ID: wflow_tOC7A0QuCi4TYy6C


Not what you expected? You can customize the content of the reviews using rules. Learn more here.

⌛ You have 3 days remaining in your trial. Upgrade here.

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested.

  • Performed an incremental review on a564670
  • Looked at 125 lines of code in 3 files
  • Took 3 minutes and 29 seconds to review
More info
  • Skipped 0 files when reviewing.
  • Skipped posting 0 additional comments because they didn't meet confidence threshold of 50%.

Workflow ID: wflow_KHMKM4QPPHYgf6Fw


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. We'll respond in a few minutes. Learn more here.

@bistaastha bistaastha removed the request for review from Chethan-Fyle April 15, 2024 15:05
Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me!

  • Performed an incremental review on 5c0c0dc
  • Looked at 219 lines of code in 4 files
  • Took 3 minutes and 15 seconds to review
More info
  • Skipped 0 files when reviewing.
  • Skipped posting 1 additional comments because they didn't meet confidence threshold of 50%.
1. /src/app/core/services/advance-request.service.ts:111:
  • Assessed confidence : 100%
  • Grade: 0%
  • Comment:
    Please remove the console.log statement. It's not a good practice to leave console logs in the production code.
  • Reasoning:
    In the mapAdvanceRequest method, the console.log statement seems to be a leftover from debugging and should be removed. It's not a good practice to leave console logs in the production code as it can expose sensitive information and make the console cluttered.

Workflow ID: wflow_snH8e1I0j1INSyqh


Not what you expected? You can customize the content of the reviews using rules. Learn more here.

⌛ You have 3 days remaining in your trial. Upgrade here.

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me!

  • Performed an incremental review on 4dc45d0
  • Looked at 15 lines of code in 1 files
  • Took 2 minutes and 25 seconds to review
More info
  • Skipped 0 files when reviewing.
  • Skipped posting 1 additional comments because they didn't meet confidence threshold of 50%.
1. /src/app/core/services/advance-request.service.spec.ts:215:
  • Assessed confidence : 100%
  • Grade: 0%
  • Comment:
    The PR description mentions that the function mapScalarAdvanceStatsResponse was removed from /src/app/core/services/tasks.service.ts. However, this change is not reflected in the diff. Please confirm if this change was made.
  • Reasoning:
    The PR description mentions that an unused function mapScalarAdvanceStatsResponse from /src/app/core/services/tasks.service.ts was removed. However, the diff does not show this change. This could be an oversight or a mistake in the PR description.

Workflow ID: wflow_X3ympd4Mo8cXKtHd


Not what you expected? You can customize the content of the reviews using rules. Learn more here.

⌛ You have 3 days remaining in your trial. Upgrade here.

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me!

  • Performed an incremental review on f341538
  • Looked at 262 lines of code in 2 files
  • Took 1 minute and 41 seconds to review
More info
  • Skipped 0 files when reviewing.
  • Skipped posting 1 additional comments because they didn't meet confidence threshold of 50%.
1. /src/app/core/mock-data/extended-advance-request.data.ts:595:
  • Assessed confidence : 0%
  • Comment:
    Good use of lodash's cloneDeep function to reduce redundancy in mock data.
  • Reasoning:
    The changes in the mock data files are mostly about removing redundant data and using the cloneDeep function from lodash to clone the base object and then modify the necessary properties. This is a good practice as it reduces redundancy and makes the code cleaner and easier to maintain.

Workflow ID: wflow_IIYwzzwr6Akh9iJ4


Not what you expected? You can customize the content of the reviews using rules. Learn more here.

⌛ You have 3 days remaining in your trial. Upgrade here.

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me!

  • Performed an incremental review on 6fb25ca
  • Looked at 13 lines of code in 1 files
  • Took 1 minute and 7 seconds to review
More info
  • Skipped 0 files when reviewing.
  • Skipped posting 1 additional comments because they didn't meet confidence threshold of 50%.
1. /src/app/core/mock-data/advance-platform.data.ts:84:
  • Assessed confidence : 33%
  • Comment:
    Please add a comment explaining why the 'last_approved_at' date was changed. If this change has any significance in the tests, it should be documented.
  • Reasoning:
    The change in this PR is a modification of the 'last_approved_at' date in the mock data. This change seems to be harmless as it's just a change in the test data. However, it's important to understand why this change was made. If the change in date has any significance in the tests, it should be documented in the PR or in the code comments.

Workflow ID: wflow_WlVnbydD80rfSrc6


Not what you expected? You can customize the content of the reviews using rules. Learn more here.

⌛ You have 2 days remaining in your trial. Upgrade here.

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me!

  • Performed an incremental review on 57c98f6
  • Looked at 14 lines of code in 1 files
  • Took 1 minute and 32 seconds to review
More info
  • Skipped 0 files when reviewing.
  • Skipped posting 1 additional comments because they didn't meet confidence threshold of 50%.
1. /src/app/fyle/my-advances/my-advances.page.ts:197:
  • Assessed confidence : 50%
  • Comment:
    Please confirm if the 'areq_state' can indeed be 'INQUIRY' and if this condition is necessary.
  • Reasoning:
    The changes in the PR seem to be about adding a new condition for the 'sentBackAdvance' variable. The new condition checks if the 'areq_state' is 'INQUIRY'. This seems to be a logical change and doesn't appear to introduce any bugs. However, I would like to confirm if the 'areq_state' can indeed be 'INQUIRY' and if this condition is necessary.

Workflow ID: wflow_TZOH6DbdgpR57UTR


Not what you expected? You can customize the content of the reviews using rules. Learn more here.

⌛ You have 2 days remaining in your trial. Upgrade here.

@bistaastha bistaastha changed the title test: Add branching fixes for advance request test: Add branching fixes and other fixes for advance request Apr 16, 2024
Copy link

Unit Test Coverage % values
Statements 96% ( 18476 / 19245 )
Branches 91.11% ( 9788 / 10743 )
Functions 94.47% ( 5577 / 5903 )
Lines 96.03% ( 17635 / 18364 )

@bistaastha bistaastha merged commit 25ec0ca into FYLE-86cuxuafw-2 Apr 16, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/L Large PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants