Skip to content

Commit 41eccbb

Browse files
authored
Merge pull request DSpace#2750 from 4Science/DURACOM-191
Migration to standalone components
2 parents a8f3194 + 6704a39 commit 41eccbb

1,782 files changed

Lines changed: 18638 additions & 12294 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.

.eslintrc.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@
152152
}
153153
],
154154
"@angular-eslint/no-attribute-decorator": "error",
155-
"@angular-eslint/no-forward-ref": "error",
156155
"@angular-eslint/no-output-native": "warn",
157156
"@angular-eslint/no-output-on-prefix": "warn",
158157
"@angular-eslint/no-conflicting-lifecycle": "warn",

cypress/e2e/admin-sidebar.cy.ts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
import { Options } from 'cypress-axe';
21
import { testA11y } from 'cypress/support/utils';
2+
import { Options } from 'cypress-axe';
33

44
describe('Admin Sidebar', () => {
5-
beforeEach(() => {
6-
// Must login as an Admin for sidebar to appear
7-
cy.visit('/login');
8-
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
9-
});
5+
beforeEach(() => {
6+
// Must login as an Admin for sidebar to appear
7+
cy.visit('/login');
8+
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
9+
});
1010

11-
it('should be pinnable and pass accessibility tests', () => {
12-
// Pin the sidebar open
13-
cy.get('#sidebar-collapse-toggle').click();
11+
it('should be pinnable and pass accessibility tests', () => {
12+
// Pin the sidebar open
13+
cy.get('#sidebar-collapse-toggle').click();
1414

15-
// Click on every expandable section to open all menus
16-
cy.get('ds-expandable-admin-sidebar-section').click({multiple: true});
15+
// Click on every expandable section to open all menus
16+
cy.get('ds-expandable-admin-sidebar-section').click({ multiple: true });
1717

18-
// Analyze <ds-admin-sidebar> for accessibility
19-
testA11y('ds-admin-sidebar',
18+
// Analyze <ds-admin-sidebar> for accessibility
19+
testA11y('ds-admin-sidebar',
2020
{
21-
rules: {
22-
// Currently all expandable sections have nested interactive elements
23-
// See https://github.com/DSpace/dspace-angular/issues/2178
24-
'nested-interactive': { enabled: false },
25-
}
21+
rules: {
22+
// Currently all expandable sections have nested interactive elements
23+
// See https://github.com/DSpace/dspace-angular/issues/2178
24+
'nested-interactive': { enabled: false },
25+
},
2626
} as Options);
27-
});
27+
});
2828
});

cypress/e2e/breadcrumbs.cy.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import { testA11y } from 'cypress/support/utils';
22

33
describe('Breadcrumbs', () => {
4-
it('should pass accessibility tests', () => {
5-
// Visit an Item, as those have more breadcrumbs
6-
cy.visit('/entities/publication/'.concat(Cypress.env('DSPACE_TEST_ENTITY_PUBLICATION')));
4+
it('should pass accessibility tests', () => {
5+
// Visit an Item, as those have more breadcrumbs
6+
cy.visit('/entities/publication/'.concat(Cypress.env('DSPACE_TEST_ENTITY_PUBLICATION')));
77

8-
// Wait for breadcrumbs to be visible
9-
cy.get('ds-breadcrumbs').should('be.visible');
8+
// Wait for breadcrumbs to be visible
9+
cy.get('ds-breadcrumbs').should('be.visible');
1010

11-
// Analyze <ds-breadcrumbs> for accessibility
12-
testA11y('ds-breadcrumbs');
13-
});
11+
// Analyze <ds-breadcrumbs> for accessibility
12+
testA11y('ds-breadcrumbs');
13+
});
1414
});

cypress/e2e/browse-by-author.cy.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { testA11y } from 'cypress/support/utils';
22

33
describe('Browse By Author', () => {
4-
it('should pass accessibility tests', () => {
5-
cy.visit('/browse/author');
4+
it('should pass accessibility tests', () => {
5+
cy.visit('/browse/author');
66

7-
// Wait for <ds-browse-by-metadata-page> to be visible
8-
cy.get('ds-browse-by-metadata').should('be.visible');
7+
// Wait for <ds-browse-by-metadata-page> to be visible
8+
cy.get('ds-browse-by-metadata').should('be.visible');
99

10-
// Analyze <ds-browse-by-metadata-page> for accessibility
11-
testA11y('ds-browse-by-metadata');
12-
});
10+
// Analyze <ds-browse-by-metadata-page> for accessibility
11+
testA11y('ds-browse-by-metadata');
12+
});
1313
});
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { testA11y } from 'cypress/support/utils';
22

33
describe('Browse By Date Issued', () => {
4-
it('should pass accessibility tests', () => {
5-
cy.visit('/browse/dateissued');
4+
it('should pass accessibility tests', () => {
5+
cy.visit('/browse/dateissued');
66

7-
// Wait for <ds-browse-by-date-page> to be visible
8-
cy.get('ds-browse-by-date').should('be.visible');
7+
// Wait for <ds-browse-by-date-page> to be visible
8+
cy.get('ds-browse-by-date').should('be.visible');
99

10-
// Analyze <ds-browse-by-date-page> for accessibility
11-
testA11y('ds-browse-by-date');
12-
});
10+
// Analyze <ds-browse-by-date-page> for accessibility
11+
testA11y('ds-browse-by-date');
12+
});
1313
});
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { testA11y } from 'cypress/support/utils';
22

33
describe('Browse By Subject', () => {
4-
it('should pass accessibility tests', () => {
5-
cy.visit('/browse/subject');
4+
it('should pass accessibility tests', () => {
5+
cy.visit('/browse/subject');
66

7-
// Wait for <ds-browse-by-metadata-page> to be visible
8-
cy.get('ds-browse-by-metadata').should('be.visible');
7+
// Wait for <ds-browse-by-metadata-page> to be visible
8+
cy.get('ds-browse-by-metadata').should('be.visible');
99

10-
// Analyze <ds-browse-by-metadata-page> for accessibility
11-
testA11y('ds-browse-by-metadata');
12-
});
10+
// Analyze <ds-browse-by-metadata-page> for accessibility
11+
testA11y('ds-browse-by-metadata');
12+
});
1313
});

cypress/e2e/browse-by-title.cy.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { testA11y } from 'cypress/support/utils';
22

33
describe('Browse By Title', () => {
4-
it('should pass accessibility tests', () => {
5-
cy.visit('/browse/title');
4+
it('should pass accessibility tests', () => {
5+
cy.visit('/browse/title');
66

7-
// Wait for <ds-browse-by-title-page> to be visible
8-
cy.get('ds-browse-by-title').should('be.visible');
7+
// Wait for <ds-browse-by-title-page> to be visible
8+
cy.get('ds-browse-by-title').should('be.visible');
99

10-
// Analyze <ds-browse-by-title-page> for accessibility
11-
testA11y('ds-browse-by-title');
12-
});
10+
// Analyze <ds-browse-by-title-page> for accessibility
11+
testA11y('ds-browse-by-title');
12+
});
1313
});

cypress/e2e/collection-edit.cy.ts

Lines changed: 69 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -3,126 +3,126 @@ import { testA11y } from 'cypress/support/utils';
33
const COLLECTION_EDIT_PAGE = '/collections/'.concat(Cypress.env('DSPACE_TEST_COLLECTION')).concat('/edit');
44

55
beforeEach(() => {
6-
// All tests start with visiting the Edit Collection Page
7-
cy.visit(COLLECTION_EDIT_PAGE);
6+
// All tests start with visiting the Edit Collection Page
7+
cy.visit(COLLECTION_EDIT_PAGE);
88

9-
// This page is restricted, so we will be shown the login form. Fill it out & submit.
10-
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
9+
// This page is restricted, so we will be shown the login form. Fill it out & submit.
10+
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
1111
});
1212

1313
describe('Edit Collection > Edit Metadata tab', () => {
14-
it('should pass accessibility tests', () => {
15-
// <ds-edit-collection> tag must be loaded
16-
cy.get('ds-edit-collection').should('be.visible');
14+
it('should pass accessibility tests', () => {
15+
// <ds-edit-collection> tag must be loaded
16+
cy.get('ds-edit-collection').should('be.visible');
1717

18-
// Analyze <ds-edit-collection> for accessibility issues
19-
testA11y('ds-edit-collection');
20-
});
18+
// Analyze <ds-edit-collection> for accessibility issues
19+
testA11y('ds-edit-collection');
20+
});
2121
});
2222

2323
describe('Edit Collection > Assign Roles tab', () => {
2424

25-
it('should pass accessibility tests', () => {
26-
cy.get('a[data-test="roles"]').click();
25+
it('should pass accessibility tests', () => {
26+
cy.get('a[data-test="roles"]').click();
2727

28-
// <ds-collection-roles> tag must be loaded
29-
cy.get('ds-collection-roles').should('be.visible');
28+
// <ds-collection-roles> tag must be loaded
29+
cy.get('ds-collection-roles').should('be.visible');
3030

31-
// Analyze for accessibility issues
32-
testA11y('ds-collection-roles');
33-
});
31+
// Analyze for accessibility issues
32+
testA11y('ds-collection-roles');
33+
});
3434
});
3535

3636
describe('Edit Collection > Content Source tab', () => {
3737

38-
it('should pass accessibility tests', () => {
39-
cy.get('a[data-test="source"]').click();
38+
it('should pass accessibility tests', () => {
39+
cy.get('a[data-test="source"]').click();
4040

41-
// <ds-collection-source> tag must be loaded
42-
cy.get('ds-collection-source').should('be.visible');
41+
// <ds-collection-source> tag must be loaded
42+
cy.get('ds-collection-source').should('be.visible');
4343

44-
// Check the external source checkbox (to display all fields on the page)
45-
cy.get('#externalSourceCheck').check();
44+
// Check the external source checkbox (to display all fields on the page)
45+
cy.get('#externalSourceCheck').check();
4646

47-
// Wait for the source controls to appear
48-
// cy.get('ds-collection-source-controls').should('be.visible');
47+
// Wait for the source controls to appear
48+
// cy.get('ds-collection-source-controls').should('be.visible');
4949

50-
// Analyze entire page for accessibility issues
51-
testA11y('ds-collection-source');
52-
});
50+
// Analyze entire page for accessibility issues
51+
testA11y('ds-collection-source');
52+
});
5353
});
5454

5555
describe('Edit Collection > Curate tab', () => {
5656

57-
it('should pass accessibility tests', () => {
58-
cy.get('a[data-test="curate"]').click();
57+
it('should pass accessibility tests', () => {
58+
cy.get('a[data-test="curate"]').click();
5959

60-
// <ds-collection-curate> tag must be loaded
61-
cy.get('ds-collection-curate').should('be.visible');
60+
// <ds-collection-curate> tag must be loaded
61+
cy.get('ds-collection-curate').should('be.visible');
6262

63-
// Analyze for accessibility issues
64-
testA11y('ds-collection-curate');
65-
});
63+
// Analyze for accessibility issues
64+
testA11y('ds-collection-curate');
65+
});
6666
});
6767

6868
describe('Edit Collection > Access Control tab', () => {
6969

70-
it('should pass accessibility tests', () => {
71-
cy.get('a[data-test="access-control"]').click();
70+
it('should pass accessibility tests', () => {
71+
cy.get('a[data-test="access-control"]').click();
7272

73-
// <ds-collection-access-control> tag must be loaded
74-
cy.get('ds-collection-access-control').should('be.visible');
73+
// <ds-collection-access-control> tag must be loaded
74+
cy.get('ds-collection-access-control').should('be.visible');
7575

76-
// Analyze for accessibility issues
77-
testA11y('ds-collection-access-control');
78-
});
76+
// Analyze for accessibility issues
77+
testA11y('ds-collection-access-control');
78+
});
7979
});
8080

8181
describe('Edit Collection > Authorizations tab', () => {
8282

83-
it('should pass accessibility tests', () => {
84-
cy.get('a[data-test="authorizations"]').click();
83+
it('should pass accessibility tests', () => {
84+
cy.get('a[data-test="authorizations"]').click();
8585

86-
// <ds-collection-authorizations> tag must be loaded
87-
cy.get('ds-collection-authorizations').should('be.visible');
86+
// <ds-collection-authorizations> tag must be loaded
87+
cy.get('ds-collection-authorizations').should('be.visible');
8888

89-
// Analyze for accessibility issues
90-
testA11y('ds-collection-authorizations');
91-
});
89+
// Analyze for accessibility issues
90+
testA11y('ds-collection-authorizations');
91+
});
9292
});
9393

9494
describe('Edit Collection > Item Mapper tab', () => {
9595

96-
it('should pass accessibility tests', () => {
97-
cy.get('a[data-test="mapper"]').click();
96+
it('should pass accessibility tests', () => {
97+
cy.get('a[data-test="mapper"]').click();
9898

99-
// <ds-collection-item-mapper> tag must be loaded
100-
cy.get('ds-collection-item-mapper').should('be.visible');
99+
// <ds-collection-item-mapper> tag must be loaded
100+
cy.get('ds-collection-item-mapper').should('be.visible');
101101

102-
// Analyze entire page for accessibility issues
103-
testA11y('ds-collection-item-mapper');
102+
// Analyze entire page for accessibility issues
103+
testA11y('ds-collection-item-mapper');
104104

105-
// Click on the "Map new Items" tab
106-
cy.get('li[data-test="mapTab"] a').click();
105+
// Click on the "Map new Items" tab
106+
cy.get('li[data-test="mapTab"] a').click();
107107

108-
// Make sure search form is now visible
109-
cy.get('ds-search-form').should('be.visible');
108+
// Make sure search form is now visible
109+
cy.get('ds-search-form').should('be.visible');
110110

111-
// Analyze entire page (again) for accessibility issues
112-
testA11y('ds-collection-item-mapper');
113-
});
111+
// Analyze entire page (again) for accessibility issues
112+
testA11y('ds-collection-item-mapper');
113+
});
114114
});
115115

116116

117117
describe('Edit Collection > Delete page', () => {
118118

119-
it('should pass accessibility tests', () => {
120-
cy.get('a[data-test="delete-button"]').click();
119+
it('should pass accessibility tests', () => {
120+
cy.get('a[data-test="delete-button"]').click();
121121

122-
// <ds-delete-collection> tag must be loaded
123-
cy.get('ds-delete-collection').should('be.visible');
122+
// <ds-delete-collection> tag must be loaded
123+
cy.get('ds-delete-collection').should('be.visible');
124124

125-
// Analyze for accessibility issues
126-
testA11y('ds-delete-collection');
127-
});
125+
// Analyze for accessibility issues
126+
testA11y('ds-delete-collection');
127+
});
128128
});

cypress/e2e/collection-page.cy.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ import { testA11y } from 'cypress/support/utils';
22

33
describe('Collection Page', () => {
44

5-
it('should pass accessibility tests', () => {
6-
cy.visit('/collections/'.concat(Cypress.env('DSPACE_TEST_COLLECTION')));
5+
it('should pass accessibility tests', () => {
6+
cy.visit('/collections/'.concat(Cypress.env('DSPACE_TEST_COLLECTION')));
77

8-
// <ds-collection-page> tag must be loaded
9-
cy.get('ds-collection-page').should('be.visible');
8+
// <ds-collection-page> tag must be loaded
9+
cy.get('ds-collection-page').should('be.visible');
1010

11-
// Analyze <ds-collection-page> for accessibility issues
12-
testA11y('ds-collection-page');
13-
});
11+
// Analyze <ds-collection-page> for accessibility issues
12+
testA11y('ds-collection-page');
13+
});
1414
});

0 commit comments

Comments
 (0)