mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
Add accessibility tests (and minor fixes) for Edit Collection's Content Source tab and Item Mapper tab
(cherry picked from commit 00cb2f9e8a
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
16a10548b8
commit
9a7277065f
@@ -33,6 +33,25 @@ describe('Edit Collection > Assign Roles tab', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('Edit Collection > Content Source tab', () => {
|
||||
|
||||
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');
|
||||
|
||||
// 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');
|
||||
|
||||
// Analyze entire page for accessibility issues
|
||||
testA11y('ds-collection-source');
|
||||
});
|
||||
});
|
||||
|
||||
describe('Edit Collection > Curate tab', () => {
|
||||
|
||||
it('should pass accessibility tests', () => {
|
||||
@@ -72,6 +91,29 @@ describe('Edit Collection > Authorizations tab', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('Edit Collection > Item Mapper tab', () => {
|
||||
|
||||
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');
|
||||
|
||||
// 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();
|
||||
|
||||
// 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');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
describe('Edit Collection > Delete page', () => {
|
||||
|
||||
it('should pass accessibility tests', () => {
|
||||
|
@@ -6,7 +6,7 @@
|
||||
<p>{{'collection.edit.item-mapper.description' | translate}}</p>
|
||||
|
||||
<ul ngbNav (navChange)="tabChange($event)" [destroyOnHide]="true" #tabs="ngbNav" class="nav-tabs">
|
||||
<li [ngbNavItem]="'browseTab'" role="presentation">
|
||||
<li [ngbNavItem]="'browseTab'" role="presentation" data-test="browseTab">
|
||||
<a ngbNavLink>{{'collection.edit.item-mapper.tabs.browse' | translate}}</a>
|
||||
<ng-template ngbNavContent>
|
||||
<div class="mt-2">
|
||||
@@ -23,7 +23,7 @@
|
||||
</div>
|
||||
</ng-template>
|
||||
</li>
|
||||
<li [ngbNavItem]="'mapTab'" role="presentation">
|
||||
<li [ngbNavItem]="'mapTab'" role="presentation" data-test="mapTab">
|
||||
<a ngbNavLink>{{'collection.edit.item-mapper.tabs.map' | translate}}</a>
|
||||
<ng-template ngbNavContent>
|
||||
<div class="row mt-2">
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<div *ngVar="(contentSource$ |async) as contentSource">
|
||||
<div class="container-fluid space-children-mr" *ngIf="shouldShow">
|
||||
<h4>{{ 'collection.source.controls.head' | translate }}</h4>
|
||||
<h3>{{ 'collection.source.controls.head' | translate }}</h3>
|
||||
<div>
|
||||
<span class="font-weight-bold">{{'collection.source.controls.harvest.status' | translate}}</span>
|
||||
<span>{{contentSource?.harvestStatus}}</span>
|
||||
|
@@ -26,7 +26,7 @@
|
||||
for="externalSourceCheck">{{ 'collection.edit.tabs.source.external' | translate }}</label>
|
||||
</div>
|
||||
<ds-themed-loading *ngIf="!contentSource" [message]="'loading.content-source' | translate"></ds-themed-loading>
|
||||
<h4 *ngIf="contentSource && (contentSource?.harvestType !== harvestTypeNone)">{{ 'collection.edit.tabs.source.form.head' | translate }}</h4>
|
||||
<h3 *ngIf="contentSource && (contentSource?.harvestType !== harvestTypeNone)">{{ 'collection.edit.tabs.source.form.head' | translate }}</h3>
|
||||
</div>
|
||||
<div class="row">
|
||||
<ds-form *ngIf="formGroup && contentSource && (contentSource?.harvestType !== harvestTypeNone)"
|
||||
|
Reference in New Issue
Block a user