forked from DSpace/dspace-angular
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged in DSC-283-align-with-7.1 (pull request #41)
DSC-283 align with 7.1
- Loading branch information
Showing
349 changed files
with
19,662 additions
and
9,533 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"integrationFolder": "cypress/integration", | ||
"supportFile": "cypress/support/index.ts", | ||
"videosFolder": "cypress/videos", | ||
"screenshotsFolder": "cypress/screenshots", | ||
"pluginsFile": "cypress/plugins/index.ts", | ||
"fixturesFolder": "cypress/fixtures", | ||
"baseUrl": "http://localhost:4000" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"name": "Using fixtures to represent data", | ||
"email": "[email protected]", | ||
"body": "Fixtures are a great way to mock data for responses to routes" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { TEST_ENTITY_PUBLICATION } from 'cypress/support'; | ||
import { testA11y } from 'cypress/support/utils'; | ||
import { Options } from 'cypress-axe'; | ||
|
||
xdescribe('Breadcrumbs', () => { | ||
it('should pass accessibility tests', () => { | ||
// Visit an Item, as those have more breadcrumbs | ||
cy.visit('/entities/publication/' + TEST_ENTITY_PUBLICATION); | ||
|
||
// Wait for breadcrumbs to be visible | ||
cy.get('ds-breadcrumbs').should('be.visible'); | ||
|
||
// Analyze <ds-breadcrumbs> for accessibility | ||
testA11y('ds-breadcrumbs', | ||
{ | ||
rules: { | ||
'heading-order': { enabled: false } | ||
} | ||
} as Options | ||
); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { testA11y } from 'cypress/support/utils'; | ||
|
||
describe('Browse By 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-page').should('be.visible'); | ||
|
||
// Analyze <ds-browse-by-metadata-page> for accessibility | ||
testA11y('ds-browse-by-metadata-page'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { testA11y } from 'cypress/support/utils'; | ||
|
||
describe('Browse By Date Issued', () => { | ||
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-page').should('be.visible'); | ||
|
||
// Analyze <ds-browse-by-date-page> for accessibility | ||
testA11y('ds-browse-by-date-page'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { testA11y } from 'cypress/support/utils'; | ||
|
||
describe('Browse By 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-page').should('be.visible'); | ||
|
||
// Analyze <ds-browse-by-metadata-page> for accessibility | ||
testA11y('ds-browse-by-metadata-page'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { testA11y } from 'cypress/support/utils'; | ||
|
||
describe('Browse By 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-page').should('be.visible'); | ||
|
||
// Analyze <ds-browse-by-title-page> for accessibility | ||
testA11y('ds-browse-by-title-page'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { TEST_COLLECTION } from 'cypress/support'; | ||
import { testA11y } from 'cypress/support/utils'; | ||
|
||
describe('Collection Page', () => { | ||
|
||
it('should pass accessibility tests', () => { | ||
cy.visit('/collections/' + TEST_COLLECTION); | ||
|
||
// <ds-collection-page> tag must be loaded | ||
cy.get('ds-collection-page').should('exist'); | ||
|
||
// Analyze <ds-collection-page> for accessibility issues | ||
testA11y('ds-collection-page'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { TEST_COLLECTION } from 'cypress/support'; | ||
import { testA11y } from 'cypress/support/utils'; | ||
|
||
xdescribe('Collection Statistics Page', () => { | ||
const COLLECTIONSTATISTICSPAGE = '/statistics/collections/' + TEST_COLLECTION; | ||
|
||
it('should load if you click on "Statistics" from a Collection page', () => { | ||
cy.visit('/collections/' + TEST_COLLECTION); | ||
cy.get('ds-navbar ds-link-menu-item a[title="Statistics"]').click(); | ||
cy.location('pathname').should('eq', COLLECTIONSTATISTICSPAGE); | ||
}); | ||
|
||
it('should contain a "Total visits" section', () => { | ||
cy.visit(COLLECTIONSTATISTICSPAGE); | ||
cy.get('.' + TEST_COLLECTION + '_TotalVisits').should('exist'); | ||
}); | ||
|
||
it('should contain a "Total visits per month" section', () => { | ||
cy.visit(COLLECTIONSTATISTICSPAGE); | ||
cy.get('.' + TEST_COLLECTION + '_TotalVisitsPerMonth').should('exist'); | ||
}); | ||
|
||
it('should pass accessibility tests', () => { | ||
cy.visit(COLLECTIONSTATISTICSPAGE); | ||
|
||
// <ds-collection-statistics-page> tag must be loaded | ||
cy.get('ds-collection-statistics-page').should('exist'); | ||
|
||
// Analyze <ds-collection-statistics-page> for accessibility issues | ||
testA11y('ds-collection-statistics-page'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { Options } from 'cypress-axe'; | ||
import { testA11y } from 'cypress/support/utils'; | ||
|
||
describe('Community List Page', () => { | ||
|
||
it('should pass accessibility tests', () => { | ||
cy.visit('/community-list'); | ||
|
||
// <ds-community-list-page> tag must be loaded | ||
cy.get('ds-community-list-page').should('exist'); | ||
|
||
// Open first Community (to show Collections)...that way we scan sub-elements as well | ||
cy.get('ds-community-list :nth-child(1) > .btn-group > .btn').click(); | ||
|
||
// Analyze <ds-community-list-page> for accessibility issues | ||
// Disable heading-order checks until it is fixed | ||
testA11y('ds-community-list-page', | ||
{ | ||
rules: { | ||
'heading-order': { enabled: false }, | ||
'button-name': { enabled: false }, | ||
} | ||
} as Options | ||
); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { TEST_COMMUNITY } from 'cypress/support'; | ||
import { testA11y } from 'cypress/support/utils'; | ||
import { Options } from 'cypress-axe'; | ||
|
||
describe('Community Page', () => { | ||
|
||
it('should pass accessibility tests', () => { | ||
cy.visit('/communities/' + TEST_COMMUNITY); | ||
|
||
// <ds-community-page> tag must be loaded | ||
cy.get('ds-community-page').should('exist'); | ||
|
||
// Analyze <ds-community-page> for accessibility issues | ||
testA11y('ds-community-page', | ||
{ | ||
rules: { | ||
'heading-order': { enabled: false } | ||
} | ||
} as Options | ||
); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { TEST_COMMUNITY } from 'cypress/support'; | ||
import { testA11y } from 'cypress/support/utils'; | ||
|
||
xdescribe('Community Statistics Page', () => { | ||
const COMMUNITYSTATISTICSPAGE = '/statistics/communities/' + TEST_COMMUNITY; | ||
|
||
it('should load if you click on "Statistics" from a Community page', () => { | ||
cy.visit('/communities/' + TEST_COMMUNITY); | ||
cy.get('ds-navbar ds-link-menu-item a[title="Statistics"]').click(); | ||
cy.location('pathname').should('eq', COMMUNITYSTATISTICSPAGE); | ||
}); | ||
|
||
it('should contain a "Total visits" section', () => { | ||
cy.visit(COMMUNITYSTATISTICSPAGE); | ||
cy.get('.' + TEST_COMMUNITY + '_TotalVisits').should('exist'); | ||
}); | ||
|
||
it('should contain a "Total visits per month" section', () => { | ||
cy.visit(COMMUNITYSTATISTICSPAGE); | ||
cy.get('.' + TEST_COMMUNITY + '_TotalVisitsPerMonth').should('exist'); | ||
}); | ||
|
||
it('should pass accessibility tests', () => { | ||
cy.visit(COMMUNITYSTATISTICSPAGE); | ||
|
||
// <ds-community-statistics-page> tag must be loaded | ||
cy.get('ds-community-statistics-page').should('exist'); | ||
|
||
// Analyze <ds-community-statistics-page> for accessibility issues | ||
testA11y('ds-community-statistics-page'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { testA11y } from 'cypress/support/utils'; | ||
import { Options } from 'cypress-axe'; | ||
|
||
describe('Footer', () => { | ||
it('should pass accessibility tests', () => { | ||
cy.visit('/'); | ||
|
||
// Footer must first be visible | ||
cy.get('ds-footer').should('be.visible'); | ||
|
||
// Analyze <ds-footer> for accessibility | ||
testA11y('ds-footer', | ||
{ | ||
rules: { | ||
'heading-order': { enabled: false } | ||
} | ||
} as Options | ||
); | ||
}); | ||
}); |
Oops, something went wrong.