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

Filterable job result list #351

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

Filterable job result list #351

wants to merge 14 commits into from

Conversation

DanielSteger
Copy link
Contributor

No description provided.

@DanielSteger DanielSteger linked an issue Jun 22, 2020 that may be closed by this pull request
Copy link
Member

@BennyLi BennyLi left a comment

Choose a reason for hiding this comment

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

Good code. Only little comments here. Thank you!

import {OsmLangService} from '../../services/osm-lang.service';
import {GrailsBridgeService} from '../../services/grails-bridge.service';

describe('JobResultComponent', () => {
Copy link
Member

Choose a reason for hiding this comment

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

Add tests or remove unused .spec.ts file

Comment on lines +215 to +225
job: this.selectedJob ? encodeURIComponent(this.selectedJob.id.toString(10)) : null,
from: this.selectedJob && this.filter.dateTimeRange[0] && !isNaN(this.filter.dateTimeRange[0].valueOf()) ?
encodeURIComponent(this.filter.dateTimeRange[0].toISOString()) :
null,
to: this.selectedJob && this.filter.dateTimeRange[1] && !isNaN(this.filter.dateTimeRange[1].valueOf()) ?
encodeURIComponent(this.filter.dateTimeRange[1].toISOString()) :
null,
testAgent: this.selectedJob && this.filter.testAgent !== '' ? encodeURIComponent(this.filter.testAgent) : null,
status: this.statusService.writeStatusAsQueryParam(this.filter.jobResultStatus, JobResultStatus, !!this.selectedJob),
wptStatus: this.statusService.writeStatusAsQueryParam(this.filter.wptStatus, WptStatus, !!this.selectedJob),
description: this.selectedJob && this.filter.description !== '' ? encodeURIComponent(this.filter.description) : null
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 refactor this? Some functions for the fields would be nice to understand was is happening with the blink of an eye.

import {JobResultDataService} from './job-result-data.service';
import {HttpClientTestingModule} from '@angular/common/http/testing';

describe('JobResultDataService', () => {
Copy link
Member

Choose a reason for hiding this comment

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

Add test or remove

import {StatusService} from './status.service';
import {SharedMocksModule} from '../../../testing/shared-mocks.module';

describe('StatusService', () => {
Copy link
Member

Choose a reason for hiding this comment

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

Add tests or remove

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

Successfully merging this pull request may close these issues.

Filterable list with JobResults (not only failed)
2 participants