From aad1eabaaed3bbf580436c4c31610ca7aa7e45d0 Mon Sep 17 00:00:00 2001 From: Tim Donohue Date: Wed, 15 Jan 2025 10:31:10 -0600 Subject: [PATCH] Ensure Item Edit page tab is visible before clicking it. --- cypress/e2e/item-edit.cy.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cypress/e2e/item-edit.cy.ts b/cypress/e2e/item-edit.cy.ts index 604aab9d042..ebd6db19b14 100644 --- a/cypress/e2e/item-edit.cy.ts +++ b/cypress/e2e/item-edit.cy.ts @@ -13,6 +13,7 @@ beforeEach(() => { describe('Edit Item > Edit Metadata tab', () => { it('should pass accessibility tests', () => { + cy.get('a[data-test="metadata"]').should('be.visible'); cy.get('a[data-test="metadata"]').click(); // Our selected tab should be active @@ -34,6 +35,7 @@ describe('Edit Item > Edit Metadata tab', () => { describe('Edit Item > Status tab', () => { it('should pass accessibility tests', () => { + cy.get('a[data-test="status"]').should('be.visible'); cy.get('a[data-test="status"]').click(); // Our selected tab should be active @@ -50,6 +52,7 @@ describe('Edit Item > Status tab', () => { describe('Edit Item > Bitstreams tab', () => { it('should pass accessibility tests', () => { + cy.get('a[data-test="bitstreams"]').should('be.visible'); cy.get('a[data-test="bitstreams"]').click(); // Our selected tab should be active @@ -77,6 +80,7 @@ describe('Edit Item > Bitstreams tab', () => { describe('Edit Item > Curate tab', () => { it('should pass accessibility tests', () => { + cy.get('a[data-test="curate"]').should('be.visible'); cy.get('a[data-test="curate"]').click(); // Our selected tab should be active @@ -93,6 +97,7 @@ describe('Edit Item > Curate tab', () => { describe('Edit Item > Relationships tab', () => { it('should pass accessibility tests', () => { + cy.get('a[data-test="relationships"]').should('be.visible'); cy.get('a[data-test="relationships"]').click(); // Our selected tab should be active @@ -109,6 +114,7 @@ describe('Edit Item > Relationships tab', () => { describe('Edit Item > Version History tab', () => { it('should pass accessibility tests', () => { + cy.get('a[data-test="versionhistory"]').should('be.visible'); cy.get('a[data-test="versionhistory"]').click(); // Our selected tab should be active @@ -125,6 +131,7 @@ describe('Edit Item > Version History tab', () => { describe('Edit Item > Access Control tab', () => { it('should pass accessibility tests', () => { + cy.get('a[data-test="access-control"]').should('be.visible'); cy.get('a[data-test="access-control"]').click(); // Our selected tab should be active @@ -141,6 +148,7 @@ describe('Edit Item > Access Control tab', () => { describe('Edit Item > Collection Mapper tab', () => { it('should pass accessibility tests', () => { + cy.get('a[data-test="mapper"]').should('be.visible'); cy.get('a[data-test="mapper"]').click(); // Our selected tab should be active