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

fix: Fix tests for tasks page stats changes [2] #2928

Merged
merged 21 commits into from
May 13, 2024

Conversation

bistaastha
Copy link
Contributor

@bistaastha bistaastha commented Apr 30, 2024

  • Fixes test for task page service

@github-actions github-actions bot added the size/M Medium PR label Apr 30, 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 title Fyle 86cuqn6db tasks tests fix: Fix tests for tasks page changes Apr 30, 2024
Copy link

PR description must contain a link to a clickup

@bistaastha bistaastha marked this pull request as ready for review April 30, 2024 11:54
Copy link

ellipsis-dev bot commented Apr 30, 2024

Your free trial has expired. To continue using Ellipsis, sign up at https://app.ellipsis.dev for $20/developer/month. If you have any questions, reach us at [email protected]

@suyashpatil78
Copy link
Contributor

@bistaastha code coverage is falling below the threshold, will this be fixed in later PRs?

Copy link
Contributor

@suyashpatil78 suyashpatil78 left a comment

Choose a reason for hiding this comment

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

One comment

@@ -1,17 +1,18 @@
import { ReportsStatsResponsePlatform } from '../models/platform/v1/report-stats-response.model';
Copy link
Contributor

Choose a reason for hiding this comment

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

Prefix the word Platform. Reason - We prefix the word in case of file names. So helps in maintaining consistency.

@@ -58,6 +58,15 @@ describe('ApproverReportsService', () => {
});
});

it('generateStatsQueryParams(): should generate stats query params', () => {
const queryParams = {
state: 'eq.DRAFT',
Copy link
Contributor

Choose a reason for hiding this comment

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

Use enum.

@@ -44,7 +44,7 @@ export class ApproverReportsService {
return this.getReportsByParams(params).pipe(map((res) => res.count));
}

getReportsByParams(queryParams: ReportsQueryParams = {}): Observable<PlatformApiResponse<Report>> {
getReportsByParams(queryParams: ReportsQueryParams): Observable<PlatformApiResponse<Report>> {
Copy link
Contributor

Choose a reason for hiding this comment

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

I have updated the PlatformApiResponse model recently. If the response data contains an array you will have to pass Report[] instead of just Report.

Copy link
Contributor

@Chethan-Fyle Chethan-Fyle left a comment

Choose a reason for hiding this comment

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

Minor comments.

@bistaastha bistaastha requested a review from Chethan-Fyle May 7, 2024 15:46
@github-actions github-actions bot added size/L Large PR and removed size/M Medium PR labels May 7, 2024
@bistaastha bistaastha requested a review from suyashpatil78 May 8, 2024 02:39
@bistaastha bistaastha changed the title fix: Fix tests for tasks page changes fix: Fix tests for tasks page stats changes May 8, 2024
Copy link
Contributor

@Chethan-Fyle Chethan-Fyle left a comment

Choose a reason for hiding this comment

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

One minor question.

@bistaastha bistaastha changed the title fix: Fix tests for tasks page stats changes fix: Fix tests for tasks page stats changes [2] May 9, 2024
Copy link

github-actions bot commented May 9, 2024

Unit Test Coverage % values
Statements 95.91% ( 18609 / 19402 )
Branches 91.08% ( 9774 / 10731 )
Functions 94.16% ( 5614 / 5962 )
Lines 95.95% ( 17760 / 18509 )

@bistaastha bistaastha requested a review from Chethan-Fyle May 9, 2024 10:20
@mvaishnavi mvaishnavi removed the request for review from suyashpatil78 May 13, 2024 10:05
@bistaastha bistaastha merged commit 154c332 into FYLE-86cuqn6db-tasks May 13, 2024
5 of 6 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.

4 participants