Skip to content

Commit

Permalink
Merge pull request #439 from europeana/release/v1.8.0
Browse files Browse the repository at this point in the history
Release/v1.8.0
  • Loading branch information
andyjmaclean authored Apr 1, 2020
2 parents faf6b6f + 4689966 commit 7c5f2fd
Show file tree
Hide file tree
Showing 70 changed files with 893 additions and 399 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@
/coverage
/dist
/node_modules
/test-data
/src/environments/apisettings.ts
/tmp
2 changes: 1 addition & 1 deletion cypress/fixtures/report.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Report } from '../../src/app/_models/report';

export const report: Report = {
id: -3184946032335434000,
id: '-3184946032335434000',
errors: [
{
errorType: '030c19d0-ebdb-11e8-b0f8-fa163eab778a',
Expand Down
2 changes: 1 addition & 1 deletion cypress/integration/dashboard.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ context('metis-ui', () => {

it('should show the last executions to have run', () => {
cy.get('.executions-grid .grid-header').should('have.length', expectedHeaderCount);
cy.get('.executions-grid .row-start').contains('Dataset 1');
cy.get('.executions-grid .row-start').contains('Dataset_1');
cy.get('.executions-grid .row-start').should('have.length', expectedRowCount);
cy.get('.executions-grid .grid-cell').should(
'have.length',
Expand Down
9 changes: 6 additions & 3 deletions cypress/integration/dataset.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,11 @@ context('metis-ui', () => {
cy.get('.search-form').should('have.length', 1);
});

it('should show the dataset, general info, status, history', () => {
cy.get('.dataset-name').contains('Dataset 1');
it('should show the dataset, general info, status, history and redirection ids', () => {
cy.get('.dataset-name').contains('Dataset_1');

cy.get('.redirection-ids').contains('0');
cy.get('.redirection-ids').contains('1');

cy.get('.metis-dataset-info-block dd').as('dd');
cy.get('@dd').contains('Europeana');
Expand Down Expand Up @@ -88,7 +91,7 @@ context('metis-ui', () => {
});

it('should show the fields', () => {
checkFormField('Dataset Name', 'Dataset 1');
checkFormField('Dataset Name', 'Dataset_1');
checkFormField('Provider', 'Europeana Provider');
checkStaticField('Date Created', '19/02/2019 - 08:36');
checkStaticField('Created by', '123');
Expand Down
1 change: 1 addition & 0 deletions src/app/_mocked/mockeddatasets.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export const mockDataset: Dataset = {
organizationId: '1',
organizationName: 'mockedOrganization',
provider: 'mockedProvider',
datasetIdsToRedirectFrom: ['123', '321'],
replacedBy: 'mocked',
replaces: 'mocked',
updatedDate: '2018-04-03T07:49:42.275Z',
Expand Down
2 changes: 1 addition & 1 deletion src/app/_mocked/mockedworkflow.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ export const mockStatisticsDetail: NodePathStatistics = {
};

export const mockReport: Report = {
id: 123,
id: '123',
errors: [
{
errorType: 'errorType',
Expand Down
1 change: 1 addition & 0 deletions src/app/_models/dataset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export interface Dataset {
datasetId: string;
ecloudDatasetId: string;
datasetName: string;
datasetIdsToRedirectFrom?: Array<string>;
organizationId: string;
organizationName: string;
provider?: string;
Expand Down
2 changes: 1 addition & 1 deletion src/app/_models/report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export interface ReportError {
// Java name: TaskErrorsInfo

export interface Report {
id: number;
id: string;
errors: ReportError[];
}

Expand Down
14 changes: 5 additions & 9 deletions src/app/_services/workflow.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,7 @@ describe('workflow service', () => {

it('should get dataset execution summaries per page', () => {
service.getCompletedDatasetOverviewsUptoPage(0).subscribe((results) => {
expect(results).toEqual({
results: mockDatasetOverviewResults.results,
more: false
});
expect(results.results).toEqual(mockDatasetOverviewResults.results);
});
mockHttp
.expect('GET', '/orchestrator/workflows/executions/overview' + '?nextPage=0')
Expand All @@ -201,10 +198,9 @@ describe('workflow service', () => {

it('should get multiple pages of completed executions for a dataset', () => {
service.getCompletedDatasetExecutionsUptoPage('543452', 1).subscribe((results) => {
expect(results).toEqual({
results: mockWorkflowExecutionResults.results.concat(mockWorkflowExecutionResults.results),
more: false
});
expect(results.results).toEqual(
mockWorkflowExecutionResults.results.concat(mockWorkflowExecutionResults.results)
);
});
mockHttp
.expect(
Expand All @@ -224,7 +220,7 @@ describe('workflow service', () => {
.send(mockWorkflowExecutionResults);

service.getCompletedDatasetExecutionsUptoPage('543452', 0).subscribe((results) => {
expect(results).toEqual({ results: mockWorkflowExecutionResults.results, more: true });
expect(results.results).toEqual(mockWorkflowExecutionResults.results);
});
mockHttp
.expect(
Expand Down
2 changes: 1 addition & 1 deletion src/app/_services/workflow.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ export class WorkflowService {
const cancelledBy = workflow.cancelledBy;
if (workflow.workflowStatus === WorkflowStatus.CANCELLED && cancelledBy) {
if (cancelledBy === 'SYSTEM_MINUTE_CAP_EXPIRE') {
return of(this.translate.instant('system time-out'));
return of(this.translate.instant('systemTimeout'));
} else {
return this.authenticationServer.getUserByUserId(cancelledBy).pipe(
map((user) => {
Expand Down
Loading

0 comments on commit 7c5f2fd

Please sign in to comment.