1
0

[CST-15592] add accessibility tests for following pages:

Metadata Import
Batch Import
Processes Overview
New Process
Quality Assurance Sources
This commit is contained in:
FrancescoMolinaro
2024-07-19 17:41:12 +02:00
parent b9c712c72f
commit e6a7fb852a
7 changed files with 87 additions and 2 deletions

View File

@@ -0,0 +1,17 @@
import { testA11y } from 'cypress/support/utils';
describe('Batch Import Page', () => {
// NOTE: these tests currently assume this query will return results!
beforeEach(() => {
// Must login as an Admin to see processes
cy.visit('/admin/batch-import');
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
});
it('should pass accessibility tests', () => {
// Batch import form must first be visible
cy.get('ds-batch-import-page').should('be.visible');
// Analyze <ds-batch-import-page> for accessibility issues
testA11y('ds-batch-import-page');
});
});

View File

@@ -0,0 +1,17 @@
import { testA11y } from 'cypress/support/utils';
describe('Metadata Import Page', () => {
// NOTE: these tests currently assume this query will return results!
beforeEach(() => {
// Must login as an Admin to see processes
cy.visit('/admin/metadata-import');
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
});
it('should pass accessibility tests', () => {
// Metadata import form must first be visible
cy.get('ds-metadata-import-page').should('be.visible');
// Analyze <ds-metadata-import-page> for accessibility issues
testA11y('ds-metadata-import-page');
});
});

View File

@@ -0,0 +1,17 @@
import { testA11y } from 'cypress/support/utils';
describe('New Process', () => {
// NOTE: these tests currently assume this query will return results!
beforeEach(() => {
// Must login as an Admin to see processes
cy.visit('/processes/new');
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
});
it('should pass accessibility tests', () => {
// Process form must first be visible
cy.get('ds-new-process').should('be.visible');
// Analyze <ds-new-process> for accessibility issues
testA11y('ds-new-process');
});
});

View File

@@ -0,0 +1,18 @@
import { testA11y } from 'cypress/support/utils';
describe('Processes Overview', () => {
// NOTE: these tests currently assume this query will return results!
beforeEach(() => {
// Must login as an Admin to see processes
cy.visit('/processes');
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
});
it('should pass accessibility tests', () => {
// Process overview must first be visible
cy.get('ds-process-overview').should('be.visible');
// Analyze <ds-process-overview> for accessibility issues
testA11y('ds-process-overview');
});
});

View File

@@ -0,0 +1,17 @@
import { testA11y } from 'cypress/support/utils';
describe('Quality Assurance Source Page', () => {
// NOTE: these tests currently assume this query will return results!
beforeEach(() => {
// Must login as an Admin to see processes
cy.visit('/notifications/quality-assurance');
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
});
it('should pass accessibility tests', () => {
// Source page must first be visible
cy.get('ds-quality-assurance-source-page-component').should('be.visible');
// Analyze <ds-quality-assurance-source-page-component> for accessibility issues
testA11y('ds-quality-assurance-source-page-component');
});
});

View File

@@ -7,7 +7,7 @@
</div>
<div class="row">
<div class="col-12">
<h4 class="border-bottom pb-2">{{'quality-assurance.source'| translate}}</h4>
<h3 class="h4 border-bottom pb-2">{{'quality-assurance.source'| translate}}</h3>
<ds-loading class="container" *ngIf="(isSourceLoading() | async)" message="{{'quality-assurance.loading' | translate}}"></ds-loading>
<ds-pagination *ngIf="(isSourceLoading() | async) !== true"

View File

@@ -44,7 +44,6 @@
<td>{{tableEntry.info}}</td>
<td>
<button [attr.aria-label]="'process.overview.delete-process' | translate"
aria-hidden="true"
(click)="processBulkDeleteService.toggleDelete(tableEntry.process.processId)"
class="btn btn-outline-danger">
<i class="fas fa-trash"></i>