mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
Test stability fixes. Ensure Item Edit tests wait on tabs to load by testing if tab is active. Fix small bug in login-modal test.
This commit is contained in:
@@ -20,6 +20,9 @@ describe('Edit Item > Edit Metadata tab', () => {
|
||||
it('should pass accessibility tests', () => {
|
||||
cy.get('a[data-test="metadata"]').click();
|
||||
|
||||
// Our selected tab should be active
|
||||
cy.get('a[data-test="metadata"]').should('have.class', 'active');
|
||||
|
||||
// <ds-edit-item-page> tag must be loaded
|
||||
cy.get('ds-edit-item-page').should('be.visible');
|
||||
|
||||
@@ -38,6 +41,9 @@ describe('Edit Item > Status tab', () => {
|
||||
it('should pass accessibility tests', () => {
|
||||
cy.get('a[data-test="status"]').click();
|
||||
|
||||
// Our selected tab should be active
|
||||
cy.get('a[data-test="status"]').should('have.class', 'active');
|
||||
|
||||
// <ds-item-status> tag must be loaded
|
||||
cy.get('ds-item-status').should('be.visible');
|
||||
|
||||
@@ -51,6 +57,9 @@ describe('Edit Item > Bitstreams tab', () => {
|
||||
it('should pass accessibility tests', () => {
|
||||
cy.get('a[data-test="bitstreams"]').click();
|
||||
|
||||
// Our selected tab should be active
|
||||
cy.get('a[data-test="bitstreams"]').should('have.class', 'active');
|
||||
|
||||
// <ds-item-bitstreams> tag must be loaded
|
||||
cy.get('ds-item-bitstreams').should('be.visible');
|
||||
|
||||
@@ -75,6 +84,9 @@ describe('Edit Item > Curate tab', () => {
|
||||
it('should pass accessibility tests', () => {
|
||||
cy.get('a[data-test="curate"]').click();
|
||||
|
||||
// Our selected tab should be active
|
||||
cy.get('a[data-test="curate"]').should('have.class', 'active');
|
||||
|
||||
// <ds-item-curate> tag must be loaded
|
||||
cy.get('ds-item-curate').should('be.visible');
|
||||
|
||||
@@ -88,6 +100,9 @@ describe('Edit Item > Relationships tab', () => {
|
||||
it('should pass accessibility tests', () => {
|
||||
cy.get('a[data-test="relationships"]').click();
|
||||
|
||||
// Our selected tab should be active
|
||||
cy.get('a[data-test="relationships"]').should('have.class', 'active');
|
||||
|
||||
// <ds-item-relationships> tag must be loaded
|
||||
cy.get('ds-item-relationships').should('be.visible');
|
||||
|
||||
@@ -101,6 +116,9 @@ describe('Edit Item > Version History tab', () => {
|
||||
it('should pass accessibility tests', () => {
|
||||
cy.get('a[data-test="versionhistory"]').click();
|
||||
|
||||
// Our selected tab should be active
|
||||
cy.get('a[data-test="versionhistory"]').should('have.class', 'active');
|
||||
|
||||
// <ds-item-version-history> tag must be loaded
|
||||
cy.get('ds-item-version-history').should('be.visible');
|
||||
|
||||
@@ -114,6 +132,9 @@ describe('Edit Item > Access Control tab', () => {
|
||||
it('should pass accessibility tests', () => {
|
||||
cy.get('a[data-test="access-control"]').click();
|
||||
|
||||
// Our selected tab should be active
|
||||
cy.get('a[data-test="access-control"]').should('have.class', 'active');
|
||||
|
||||
// <ds-item-access-control> tag must be loaded
|
||||
cy.get('ds-item-access-control').should('be.visible');
|
||||
|
||||
@@ -127,6 +148,9 @@ describe('Edit Item > Collection Mapper tab', () => {
|
||||
it('should pass accessibility tests', () => {
|
||||
cy.get('a[data-test="mapper"]').click();
|
||||
|
||||
// Our selected tab should be active
|
||||
cy.get('a[data-test="mapper"]').should('have.class', 'active');
|
||||
|
||||
// <ds-item-collection-mapper> tag must be loaded
|
||||
cy.get('ds-item-collection-mapper').should('be.visible');
|
||||
|
||||
|
@@ -67,7 +67,7 @@ describe('Login Modal', () => {
|
||||
|
||||
// Login, and the <ds-log-in> tag should no longer exist
|
||||
page.submitLoginAndPasswordByPressingEnter(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
|
||||
cy.get('.form-login').should('not.exist');
|
||||
cy.get('ds-log-in').should('not.exist');
|
||||
|
||||
// Verify we are still on homepage
|
||||
cy.url().should('include', '/home');
|
||||
|
Reference in New Issue
Block a user