Skip to content

Commit 280795d

Browse files
Merge remote-tracking branch 'refs/remotes/upstream/main' into w2p-113901_edit-item-relationships-does-not-display-tilted-relationships_contribute-main
# Conflicts: # src/app/item-page/edit-item-page/item-relationships/edit-relationship-list/edit-relationship-list.component.ts
2 parents 484546e + b0a8a50 commit 280795d

1,167 files changed

Lines changed: 32443 additions & 18018 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: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@
1111
"eslint-plugin-jsonc",
1212
"eslint-plugin-rxjs",
1313
"eslint-plugin-simple-import-sort",
14-
"eslint-plugin-import-newlines"
14+
"eslint-plugin-import-newlines",
15+
"eslint-plugin-jsonc",
16+
"dspace-angular-ts",
17+
"dspace-angular-html"
18+
],
19+
"ignorePatterns": [
20+
"lint/test/fixture"
1521
],
1622
"overrides": [
1723
{
@@ -21,7 +27,8 @@
2127
"parserOptions": {
2228
"project": [
2329
"./tsconfig.json",
24-
"./cypress/tsconfig.json"
30+
"./cypress/tsconfig.json",
31+
"./lint/tsconfig.json"
2532
],
2633
"createDefaultProgram": true
2734
},
@@ -38,7 +45,10 @@
3845
"error",
3946
2,
4047
{
41-
"SwitchCase": 1
48+
"SwitchCase": 1,
49+
"ignoredNodes": [
50+
"ClassBody.body > PropertyDefinition[decorators.length > 0] > .key"
51+
]
4252
}
4353
],
4454
"max-classes-per-file": [
@@ -212,6 +222,15 @@
212222
"@typescript-eslint/no-unsafe-return": "off",
213223
"@typescript-eslint/restrict-template-expressions": "off",
214224
"@typescript-eslint/require-await": "off",
225+
"@typescript-eslint/no-base-to-string": [
226+
"error",
227+
{
228+
"ignoredTypeNames": [
229+
"ResourceType",
230+
"Error"
231+
]
232+
}
233+
],
215234

216235
"deprecation/deprecation": "warn",
217236

@@ -238,7 +257,12 @@
238257
"method"
239258
],
240259

241-
"rxjs/no-nested-subscribe": "off" // todo: go over _all_ cases
260+
"rxjs/no-nested-subscribe": "off", // todo: go over _all_ cases
261+
262+
// Custom DSpace Angular rules
263+
"dspace-angular-ts/themed-component-classes": "error",
264+
"dspace-angular-ts/themed-component-selectors": "error",
265+
"dspace-angular-ts/themed-component-usages": "error"
242266
}
243267
},
244268
{
@@ -253,7 +277,10 @@
253277
"createDefaultProgram": true
254278
},
255279
"rules": {
256-
"prefer-const": "off"
280+
"prefer-const": "off",
281+
282+
// Custom DSpace Angular rules
283+
"dspace-angular-ts/themed-component-usages": "error"
257284
}
258285
},
259286
{
@@ -262,7 +289,11 @@
262289
],
263290
"extends": [
264291
"plugin:@angular-eslint/template/recommended"
265-
]
292+
],
293+
"rules": {
294+
// Custom DSpace Angular rules
295+
"dspace-angular-html/themed-component-usages": "error"
296+
}
266297
},
267298
{
268299
"files": [

.gitattributes

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,7 @@
1313
*.css eol=lf
1414
*.scss eol=lf
1515
*.html eol=lf
16-
*.svg eol=lf
16+
*.svg eol=lf
17+
18+
# Generated documentation should have LF line endings to reduce git noise
19+
docs/lint/**/*.md eol=lf

.github/workflows/build.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,14 @@ jobs:
8585
- name: Install Yarn dependencies
8686
run: yarn install --frozen-lockfile
8787

88+
- name: Build lint plugins
89+
run: yarn run build:lint
90+
91+
- name: Run lint plugin tests
92+
run: yarn run test:lint:nobuild
93+
8894
- name: Run lint
89-
run: yarn run lint --quiet
95+
run: yarn run lint:nobuild --quiet
9096

9197
- name: Check for circular dependencies
9298
run: yarn run check-circ-deps

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/.angular/cache
2+
/.nx
23
/__build__
34
/__server_build__
45
/node_modules

angular.json

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -109,22 +109,22 @@
109109
"serve": {
110110
"builder": "@angular-builders/custom-webpack:dev-server",
111111
"options": {
112-
"browserTarget": "dspace-angular:build",
112+
"buildTarget": "dspace-angular:build",
113113
"port": 4000
114114
},
115115
"configurations": {
116116
"development": {
117-
"browserTarget": "dspace-angular:build:development"
117+
"buildTarget": "dspace-angular:build:development"
118118
},
119119
"production": {
120-
"browserTarget": "dspace-angular:build:production"
120+
"buildTarget": "dspace-angular:build:production"
121121
}
122122
}
123123
},
124124
"extract-i18n": {
125125
"builder": "@angular-devkit/build-angular:extract-i18n",
126126
"options": {
127-
"browserTarget": "dspace-angular:build"
127+
"buildTarget": "dspace-angular:build"
128128
}
129129
},
130130
"test": {
@@ -217,23 +217,23 @@
217217
}
218218
},
219219
"serve-ssr": {
220-
"builder": "@nguniversal/builders:ssr-dev-server",
220+
"builder": "@angular-devkit/build-angular:ssr-dev-server",
221221
"options": {
222-
"browserTarget": "dspace-angular:build",
222+
"buildTarget": "dspace-angular:build",
223223
"serverTarget": "dspace-angular:server",
224224
"port": 4000
225225
},
226226
"configurations": {
227227
"production": {
228-
"browserTarget": "dspace-angular:build:production",
228+
"buildTarget": "dspace-angular:build:production",
229229
"serverTarget": "dspace-angular:server:production"
230230
}
231231
}
232232
},
233233
"prerender": {
234-
"builder": "@nguniversal/builders:prerender",
234+
"builder": "@angular-devkit/build-angular:prerender",
235235
"options": {
236-
"browserTarget": "dspace-angular:build:production",
236+
"buildTarget": "dspace-angular:build:production",
237237
"serverTarget": "dspace-angular:server:production",
238238
"routes": [
239239
"/"
@@ -266,6 +266,8 @@
266266
"options": {
267267
"lintFilePatterns": [
268268
"src/**/*.ts",
269+
"cypress/**/*.ts",
270+
"lint/**/*.ts",
269271
"src/**/*.html",
270272
"src/**/*.json5"
271273
]

config/config.example.yml

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,12 @@ languages:
202202
- code: en
203203
label: English
204204
active: true
205+
- code: ar
206+
label: العربية
207+
active: true
208+
- code: bn
209+
label: বাংলা
210+
active: true
205211
- code: ca
206212
label: Català
207213
active: true
@@ -211,24 +217,36 @@ languages:
211217
- code: de
212218
label: Deutsch
213219
active: true
220+
- code: el
221+
label: Ελληνικά
222+
active: true
214223
- code: es
215224
label: Español
216225
active: true
226+
- code: fi
227+
label: Suomi
228+
active: true
217229
- code: fr
218230
label: Français
219231
active: true
220232
- code: gd
221233
label: Gàidhlig
222234
active: true
235+
- code: hi
236+
label: हिंदी
237+
active: true
238+
- code: hu
239+
label: Magyar
240+
active: true
223241
- code: it
224242
label: Italiano
225243
active: true
244+
- code: kk
245+
label: Қазақ
246+
active: true
226247
- code: lv
227248
label: Latviešu
228249
active: true
229-
- code: hu
230-
label: Magyar
231-
active: true
232250
- code: nl
233251
label: Nederlands
234252
active: true
@@ -244,36 +262,21 @@ languages:
244262
- code: sr-lat
245263
label: Srpski (lat)
246264
active: true
247-
- code: fi
248-
label: Suomi
265+
- code: sr-cyr
266+
label: Српски
249267
active: true
250268
- code: sv
251269
label: Svenska
252270
active: true
253271
- code: tr
254272
label: Türkçe
255273
active: true
256-
- code: vi
257-
label: Tiếng Việt
258-
active: true
259-
- code: kk
260-
label: Қазақ
261-
active: true
262-
- code: bn
263-
label: বাংলা
264-
active: true
265-
- code: hi
266-
label: हिंदी
267-
active: true
268-
- code: el
269-
label: Ελληνικά
270-
active: true
271-
- code: sr-cyr
272-
label: Српски
273-
active: true
274274
- code: uk
275275
label: Yкраї́нська
276276
active: true
277+
- code: vi
278+
label: Tiếng Việt
279+
active: true
277280

278281

279282
# Browse-By Pages
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
beforeEach(() => {
2+
cy.visit('/collections/create?parent='.concat(Cypress.env('DSPACE_TEST_COMMUNITY')));
3+
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
4+
});
5+
6+
it('should show loading component while saving', () => {
7+
const title = 'Test Collection Title';
8+
cy.get('#title').type(title);
9+
10+
cy.get('button[type="submit"]').click();
11+
12+
cy.get('ds-loading').should('be.visible');
13+
});

cypress/e2e/community-create.cy.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
beforeEach(() => {
2+
cy.visit('/communities/create');
3+
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
4+
});
5+
6+
it('should show loading component while saving', () => {
7+
const title = 'Test Community Title';
8+
cy.get('#title').type(title);
9+
10+
cy.get('button[type="submit"]').click();
11+
12+
cy.get('ds-loading').should('be.visible');
13+
});

cypress/e2e/item-edit.cy.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ describe('Edit Item > Edit Metadata tab', () => {
1818
// <ds-edit-item-page> tag must be loaded
1919
cy.get('ds-edit-item-page').should('be.visible');
2020

21+
// wait for all the ds-dso-edit-metadata-value components to be rendered
22+
cy.get('ds-dso-edit-metadata-value div[role="row"]').each(($row: HTMLDivElement) => {
23+
cy.wrap($row).find('div[role="cell"]').should('be.visible');
24+
});
25+
2126
// Analyze <ds-edit-item-page> for accessibility issues
2227
testA11y('ds-edit-item-page');
2328
});

cypress/e2e/item-template.cy.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
const ADD_TEMPLATE_ITEM_PAGE = '/collections/'.concat(Cypress.env('DSPACE_TEST_COLLECTION')).concat('/itemtemplate');
2+
3+
describe('Item Template', () => {
4+
beforeEach(() => {
5+
cy.visit(ADD_TEMPLATE_ITEM_PAGE);
6+
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
7+
});
8+
9+
it('should load properly', () => {
10+
cy.contains('.ds-header-row .lbl-cell', 'Field', { timeout: 10000 }).should('exist').should('be.visible');
11+
cy.contains('.ds-header-row b', 'Value', { timeout: 10000 }).should('exist').should('be.visible');
12+
cy.contains('.ds-header-row b', 'Lang', { timeout: 10000 }).should('exist').should('be.visible');
13+
cy.contains('.ds-header-row b', 'Edit', { timeout: 10000 }).should('exist').should('be.visible');
14+
});
15+
});

0 commit comments

Comments
 (0)