Skip to content

Commit f5ce79f

Browse files
Merge branch 'use-applied-filter-to-display-label-on-search_contribute-main' into advanced-search_contribute-main
# Conflicts: # src/app/shared/search/search-sidebar/search-sidebar.component.html # src/app/shared/search/search.component.html
2 parents 561ccc3 + b75f589 commit f5ce79f

737 files changed

Lines changed: 5697 additions & 1648 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

angular.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,8 @@
266266
"options": {
267267
"lintFilePatterns": [
268268
"src/**/*.ts",
269+
"cypress/**/*.ts",
270+
"lint/**/*.ts",
269271
"src/**/*.html",
270272
"src/**/*.json5"
271273
]
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/login-modal.cy.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,31 @@ import { testA11y } from 'cypress/support/utils';
33
const page = {
44
openLoginMenu() {
55
// Click the "Log In" dropdown menu in header
6-
cy.get('ds-themed-header [data-test="login-menu"]').click();
6+
cy.get('ds-header [data-test="login-menu"]').click();
77
},
88
openUserMenu() {
99
// Once logged in, click the User menu in header
10-
cy.get('ds-themed-header [data-test="user-menu"]').click();
10+
cy.get('ds-header [data-test="user-menu"]').click();
1111
},
1212
submitLoginAndPasswordByPressingButton(email, password) {
1313
// Enter email
14-
cy.get('ds-themed-header [data-test="email"]').type(email);
14+
cy.get('ds-header [data-test="email"]').type(email);
1515
// Enter password
16-
cy.get('ds-themed-header [data-test="password"]').type(password);
16+
cy.get('ds-header [data-test="password"]').type(password);
1717
// Click login button
18-
cy.get('ds-themed-header [data-test="login-button"]').click();
18+
cy.get('ds-header [data-test="login-button"]').click();
1919
},
2020
submitLoginAndPasswordByPressingEnter(email, password) {
2121
// In opened Login modal, fill out email & password, then click Enter
22-
cy.get('ds-themed-header [data-test="email"]').type(email);
23-
cy.get('ds-themed-header [data-test="password"]').type(password);
24-
cy.get('ds-themed-header [data-test="password"]').type('{enter}');
22+
cy.get('ds-header [data-test="email"]').type(email);
23+
cy.get('ds-header [data-test="password"]').type(password);
24+
cy.get('ds-header [data-test="password"]').type('{enter}');
2525
},
2626
submitLogoutByPressingButton() {
2727
// This is the POST command that will actually log us out
2828
cy.intercept('POST', '/server/api/authn/logout').as('logout');
2929
// Click logout button
30-
cy.get('ds-themed-header [data-test="logout-button"]').click();
30+
cy.get('ds-header [data-test="logout-button"]').click();
3131
// Wait until above POST command responds before continuing
3232
// (This ensures next action waits until logout completes)
3333
cy.wait('@logout');
@@ -102,10 +102,10 @@ describe('Login Modal', () => {
102102
page.openLoginMenu();
103103

104104
// Registration link should be visible
105-
cy.get('ds-themed-header [data-test="register"]').should('be.visible');
105+
cy.get('ds-header [data-test="register"]').should('be.visible');
106106

107107
// Click registration link & you should go to registration page
108-
cy.get('ds-themed-header [data-test="register"]').click();
108+
cy.get('ds-header [data-test="register"]').click();
109109
cy.location('pathname').should('eq', '/register');
110110
cy.get('ds-register-email').should('exist');
111111

@@ -119,10 +119,10 @@ describe('Login Modal', () => {
119119
page.openLoginMenu();
120120

121121
// Forgot password link should be visible
122-
cy.get('ds-themed-header [data-test="forgot"]').should('be.visible');
122+
cy.get('ds-header [data-test="forgot"]').should('be.visible');
123123

124124
// Click link & you should go to Forgot Password page
125-
cy.get('ds-themed-header [data-test="forgot"]').click();
125+
cy.get('ds-header [data-test="forgot"]').click();
126126
cy.location('pathname').should('eq', '/forgot');
127127
cy.get('ds-forgot-email').should('exist');
128128

cypress/e2e/search-navbar.cy.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
const page = {
22
fillOutQueryInNavBar(query) {
33
// Click the magnifying glass
4-
cy.get('ds-themed-header [data-test="header-search-icon"]').click();
4+
cy.get('ds-header [data-test="header-search-icon"]').click();
55
// Fill out a query in input that appears
6-
cy.get('ds-themed-header [data-test="header-search-box"]').type(query);
6+
cy.get('ds-header [data-test="header-search-box"]').type(query);
77
},
88
submitQueryByPressingEnter() {
9-
cy.get('ds-themed-header [data-test="header-search-box"]').type('{enter}');
9+
cy.get('ds-header [data-test="header-search-box"]').type('{enter}');
1010
},
1111
submitQueryByPressingIcon() {
12-
cy.get('ds-themed-header [data-test="header-search-icon"]').click();
12+
cy.get('ds-header [data-test="header-search-icon"]').click();
1313
},
1414
};
1515

docker/cli.assetstore.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
# https://github.com/DSpace/DSpace/blob/main/dspace/src/main/docker-compose/cli.assetstore.yml
1313
#
1414
# Therefore, it should be kept in sync with that file
15-
version: "3.7"
16-
1715
services:
1816
dspace-cli:
1917
environment:

docker/cli.ingest.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
# https://github.com/DSpace/DSpace/blob/main/dspace/src/main/docker-compose/cli.ingest.yml
1313
#
1414
# Therefore, it should be kept in sync with that file
15-
version: "3.7"
16-
1715
services:
1816
dspace-cli:
1917
environment:

0 commit comments

Comments
 (0)