Skip to content

Commit

Permalink
Merge branch 'main' into fix-home-page-issues
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/app/home-page/home-page.component.ts
  • Loading branch information
alexandrevryghem committed Mar 24, 2024
2 parents 2123c3b + 41eccbb commit 7312ee1
Show file tree
Hide file tree
Showing 1,782 changed files with 18,652 additions and 12,298 deletions.
1 change: 0 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@
}
],
"@angular-eslint/no-attribute-decorator": "error",
"@angular-eslint/no-forward-ref": "error",
"@angular-eslint/no-output-native": "warn",
"@angular-eslint/no-output-on-prefix": "warn",
"@angular-eslint/no-conflicting-lifecycle": "warn",
Expand Down
38 changes: 19 additions & 19 deletions cypress/e2e/admin-sidebar.cy.ts
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
import { Options } from 'cypress-axe';
import { testA11y } from 'cypress/support/utils';
import { Options } from 'cypress-axe';

describe('Admin Sidebar', () => {
beforeEach(() => {
// Must login as an Admin for sidebar to appear
cy.visit('/login');
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
});
beforeEach(() => {
// Must login as an Admin for sidebar to appear
cy.visit('/login');
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
});

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

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

// Analyze <ds-admin-sidebar> for accessibility
testA11y('ds-admin-sidebar',
// Analyze <ds-admin-sidebar> for accessibility
testA11y('ds-admin-sidebar',
{
rules: {
// Currently all expandable sections have nested interactive elements
// See https://github.com/DSpace/dspace-angular/issues/2178
'nested-interactive': { enabled: false },
}
rules: {
// Currently all expandable sections have nested interactive elements
// See https://github.com/DSpace/dspace-angular/issues/2178
'nested-interactive': { enabled: false },
},
} as Options);
});
});
});
16 changes: 8 additions & 8 deletions cypress/e2e/breadcrumbs.cy.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { testA11y } from 'cypress/support/utils';

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

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

// Analyze <ds-breadcrumbs> for accessibility
testA11y('ds-breadcrumbs');
});
// Analyze <ds-breadcrumbs> for accessibility
testA11y('ds-breadcrumbs');
});
});
14 changes: 7 additions & 7 deletions cypress/e2e/browse-by-author.cy.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { testA11y } from 'cypress/support/utils';

describe('Browse By Author', () => {
it('should pass accessibility tests', () => {
cy.visit('/browse/author');
it('should pass accessibility tests', () => {
cy.visit('/browse/author');

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

// Analyze <ds-browse-by-metadata-page> for accessibility
testA11y('ds-browse-by-metadata');
});
// Analyze <ds-browse-by-metadata-page> for accessibility
testA11y('ds-browse-by-metadata');
});
});
14 changes: 7 additions & 7 deletions cypress/e2e/browse-by-dateissued.cy.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { testA11y } from 'cypress/support/utils';

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

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

// Analyze <ds-browse-by-date-page> for accessibility
testA11y('ds-browse-by-date');
});
// Analyze <ds-browse-by-date-page> for accessibility
testA11y('ds-browse-by-date');
});
});
14 changes: 7 additions & 7 deletions cypress/e2e/browse-by-subject.cy.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { testA11y } from 'cypress/support/utils';

describe('Browse By Subject', () => {
it('should pass accessibility tests', () => {
cy.visit('/browse/subject');
it('should pass accessibility tests', () => {
cy.visit('/browse/subject');

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

// Analyze <ds-browse-by-metadata-page> for accessibility
testA11y('ds-browse-by-metadata');
});
// Analyze <ds-browse-by-metadata-page> for accessibility
testA11y('ds-browse-by-metadata');
});
});
14 changes: 7 additions & 7 deletions cypress/e2e/browse-by-title.cy.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { testA11y } from 'cypress/support/utils';

describe('Browse By Title', () => {
it('should pass accessibility tests', () => {
cy.visit('/browse/title');
it('should pass accessibility tests', () => {
cy.visit('/browse/title');

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

// Analyze <ds-browse-by-title-page> for accessibility
testA11y('ds-browse-by-title');
});
// Analyze <ds-browse-by-title-page> for accessibility
testA11y('ds-browse-by-title');
});
});
138 changes: 69 additions & 69 deletions cypress/e2e/collection-edit.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,126 +3,126 @@ import { testA11y } from 'cypress/support/utils';
const COLLECTION_EDIT_PAGE = '/collections/'.concat(Cypress.env('DSPACE_TEST_COLLECTION')).concat('/edit');

beforeEach(() => {
// All tests start with visiting the Edit Collection Page
cy.visit(COLLECTION_EDIT_PAGE);
// All tests start with visiting the Edit Collection Page
cy.visit(COLLECTION_EDIT_PAGE);

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

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

// Analyze <ds-edit-collection> for accessibility issues
testA11y('ds-edit-collection');
});
// Analyze <ds-edit-collection> for accessibility issues
testA11y('ds-edit-collection');
});
});

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

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

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

// Analyze for accessibility issues
testA11y('ds-collection-roles');
});
// Analyze for accessibility issues
testA11y('ds-collection-roles');
});
});

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

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

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

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

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

// Analyze entire page for accessibility issues
testA11y('ds-collection-source');
});
// Analyze entire page for accessibility issues
testA11y('ds-collection-source');
});
});

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

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

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

// Analyze for accessibility issues
testA11y('ds-collection-curate');
});
// Analyze for accessibility issues
testA11y('ds-collection-curate');
});
});

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

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

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

// Analyze for accessibility issues
testA11y('ds-collection-access-control');
});
// Analyze for accessibility issues
testA11y('ds-collection-access-control');
});
});

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

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

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

// Analyze for accessibility issues
testA11y('ds-collection-authorizations');
});
// Analyze for accessibility issues
testA11y('ds-collection-authorizations');
});
});

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

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

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

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

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

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

// Analyze entire page (again) for accessibility issues
testA11y('ds-collection-item-mapper');
});
// Analyze entire page (again) for accessibility issues
testA11y('ds-collection-item-mapper');
});
});


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

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

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

// Analyze for accessibility issues
testA11y('ds-delete-collection');
});
// Analyze for accessibility issues
testA11y('ds-delete-collection');
});
});
14 changes: 7 additions & 7 deletions cypress/e2e/collection-page.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import { testA11y } from 'cypress/support/utils';

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

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

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

// Analyze <ds-collection-page> for accessibility issues
testA11y('ds-collection-page');
});
// Analyze <ds-collection-page> for accessibility issues
testA11y('ds-collection-page');
});
});
Loading

0 comments on commit 7312ee1

Please sign in to comment.