Skip to content

Commit 0232370

Browse files
Merge remote-tracking branch 'refs/remotes/origin/dspace-cris-2023_02_x' into DSC-1482
# Conflicts: # src/app/item-page/full/field-components/file-section/full-file-section.component.spec.ts
2 parents bc2ffeb + bcc5ff5 commit 0232370

236 files changed

Lines changed: 3464 additions & 9193 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

bitbucket-pipelines.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
options:
2-
runs-on: ubuntu-latest
2+
runs-on: self.hosted
33

44
definitions:
55
steps:
@@ -15,7 +15,7 @@ definitions:
1515
- yarn install --frozen-lockfile
1616
- yarn run lint --quiet
1717
- yarn run check-circ-deps
18-
- yarn run build:prod
18+
- yarn run build:prod:ci
1919
- yarn run test:headless
2020

2121
pipelines:

config/config.example.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,10 @@ item:
308308
# Rounded to the nearest size in the list of selectable sizes on the
309309
# settings menu. See pageSizeOptions in 'pagination-component-options.model.ts'.
310310
pageSize: 5
311+
# The maximum number of metadata values to add to the metatag list of the item page
312+
metatagLimit: 20
313+
# The maximum number of values for repeatable metadata to show in the full item
314+
metadataLimit: 20
311315

312316
# When the search results are retrieved, for each item type the metadata with a valid authority value are inspected.
313317
# Referenced items will be fetched with a find all by id strategy to avoid individual rest requests

cypress/e2e/search-navbar.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const page = {
1515
}
1616
};
1717

18-
xdescribe('Search from Navigation Bar', () => {
18+
describe('Search from Navigation Bar', () => {
1919
// NOTE: these tests currently assume this query will return results!
2020
const query = TEST_SEARCH_TERM;
2121

nohup.out

Lines changed: 0 additions & 7948 deletions
This file was deleted.

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dspace-angular",
3-
"version": "2023.02.03-SNAPSHOT",
3+
"version": "2023.02.04-SNAPSHOT",
44
"scripts": {
55
"ng": "ng",
66
"config:watch": "nodemon",
@@ -17,8 +17,11 @@
1717
"build:stats": "ng build --stats-json",
1818
"build:ci": "ng config cli.cache.environment ci && yarn run build:ssr",
1919
"build:prod": "cross-env NODE_ENV=production yarn run build:ssr",
20+
"build:prod:ci": "cross-env NODE_ENV=production yarn run build:ssr:ci",
2021
"build:ssr": "npm run ng-high-memory -- build --configuration production && npm run ng-high-memory -- run dspace-angular:server:production",
22+
"build:ssr:ci": "npm run ng-mid-memory -- build --configuration production && npm run ng-mid-memory -- run dspace-angular:server:production",
2123
"ng-high-memory": "node --max-old-space-size=8192 node_modules/@angular/cli/bin/ng",
24+
"ng-mid-memory": "node --max-old-space-size=4096 node_modules/@angular/cli/bin/ng",
2225
"test": "npm run ng-high-memory -- test --source-map=true --watch=false --configuration test",
2326
"test:watch": "nodemon --exec \"npm run ng-high-memory -- test --source-map=true --watch=true --configuration test\"",
2427
"test:headless": "npm run ng-high-memory -- test --source-map=true --watch=false --configuration test --browsers=ChromeHeadless --code-coverage",
@@ -140,7 +143,6 @@
140143
"ng2-nouislider": "^2.0.0",
141144
"ngx-infinite-scroll": "^15.0.0",
142145
"ngx-pagination": "6.0.3",
143-
"ngx-sortablejs": "^11.1.0",
144146
"ngx-ui-switch": "^14.0.3",
145147
"nouislider": "^15.7.1",
146148
"pem": "1.14.7",
@@ -149,7 +151,6 @@
149151
"reflect-metadata": "^0.1.13",
150152
"rxjs": "^7.8.0",
151153
"sanitize-html": "^2.10.0",
152-
"sortablejs": "1.15.0",
153154
"uuid": "^8.3.2",
154155
"webfontloader": "1.6.28",
155156
"zone.js": "~0.11.5"

src/app/access-control/bulk-access/bulk-access.component.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66
<hr>
77

88
<div class="d-flex justify-content-end">
9-
<button class="btn btn-outline-primary mr-3" (click)="reset()">
10-
{{ 'access-control-cancel' | translate }}
11-
</button>
9+
<a routerLink="/home" class="btn btn-outline-primary mr-3">
10+
<i class="fas fa-arrow-left mr-1"></i>
11+
{{ 'access-control-back' | translate }}
12+
</a>
1213
<button class="btn btn-primary" [disabled]="!canExport()" (click)="submit()">
14+
<i class="fas fa-cogs mr-1"></i>
1315
{{ 'access-control-execute' | translate }}
1416
</button>
1517
</div>

src/app/access-control/bulk-access/bulk-access.component.spec.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { Process } from '../../process-page/processes/process.model';
1313
import { RouterTestingModule } from '@angular/router/testing';
1414
import { NotificationsService } from '../../shared/notifications/notifications.service';
1515
import { NotificationsServiceStub } from '../../shared/testing/notifications-service.stub';
16+
import { By } from '@angular/platform-browser';
1617

1718
describe('BulkAccessComponent', () => {
1819
let component: BulkAccessComponent;
@@ -141,11 +142,6 @@ describe('BulkAccessComponent', () => {
141142
expect(component.canExport()).toBe(true);
142143
});
143144

144-
it('should call the settings reset method when reset is called', () => {
145-
component.reset();
146-
expect(component.settings.reset).toHaveBeenCalled();
147-
});
148-
149145
it('should call the bulkAccessControlService executeScript method when submit is called', () => {
150146
(component.settings as any).getValue.and.returnValue(mockFormState);
151147
bulkAccessControlService.createPayloadFile.and.returnValue(mockFile);
@@ -154,5 +150,11 @@ describe('BulkAccessComponent', () => {
154150
component.submit();
155151
expect(bulkAccessControlService.executeScript).toHaveBeenCalled();
156152
});
153+
154+
it('should have a link to /home', () => {
155+
const link = fixture.debugElement.query(By.css('a.btn-outline-primary'));
156+
expect(link).toBeTruthy();
157+
expect(link.properties.href).toContain('/home');
158+
});
157159
});
158160
});

src/app/access-control/bulk-access/bulk-access.component.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,6 @@ export class BulkAccessComponent implements OnInit {
5454
return this.objectsSelected$.value?.length > 0;
5555
}
5656

57-
/**
58-
* Reset the form to its initial state
59-
* This will also reset the state of the child components (bitstream and item access)
60-
*/
61-
reset(): void {
62-
this.settings.reset();
63-
}
64-
6557
/**
6658
* Submit the form
6759
* This will create a payload file and execute the script

src/app/access-control/bulk-access/settings/bulk-access-settings.component.spec.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ describe('BulkAccessSettingsComponent', () => {
3636

3737
const mockControl: any = jasmine.createSpyObj('AccessControlFormContainerComponent', {
3838
getFormValue: jasmine.createSpy('getFormValue'),
39-
reset: jasmine.createSpy('reset')
4039
});
4140

4241
beforeEach(async () => {
@@ -62,20 +61,11 @@ describe('BulkAccessSettingsComponent', () => {
6261
expect(component.getValue).toBeDefined();
6362
});
6463

65-
it('should have a method to reset the form', () => {
66-
expect(component.reset).toBeDefined();
67-
});
68-
6964
it('should return the correct form value', () => {
7065
const expectedValue = mockFormState;
7166
(component.controlForm as any).getFormValue.and.returnValue(mockFormState);
7267
const actualValue = component.getValue();
7368
// @ts-ignore
7469
expect(actualValue).toEqual(expectedValue);
7570
});
76-
77-
it('should call reset on the control form', () => {
78-
component.reset();
79-
expect(component.controlForm.reset).toHaveBeenCalled();
80-
});
8171
});

src/app/access-control/bulk-access/settings/bulk-access-settings.component.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,4 @@ export class BulkAccessSettingsComponent {
2222
getValue() {
2323
return this.controlForm.getFormValue();
2424
}
25-
26-
/**
27-
* Reset the form to its initial state
28-
* This will also reset the state of the child components (bitstream and item access)
29-
*/
30-
reset() {
31-
this.controlForm.reset();
32-
}
33-
3425
}

0 commit comments

Comments
 (0)