Skip to content

Commit aad1eab

Browse files
committed
Ensure Item Edit page tab is visible before clicking it.
1 parent 5623cc9 commit aad1eab

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

cypress/e2e/item-edit.cy.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ beforeEach(() => {
1313

1414
describe('Edit Item > Edit Metadata tab', () => {
1515
it('should pass accessibility tests', () => {
16+
cy.get('a[data-test="metadata"]').should('be.visible');
1617
cy.get('a[data-test="metadata"]').click();
1718

1819
// Our selected tab should be active
@@ -34,6 +35,7 @@ describe('Edit Item > Edit Metadata tab', () => {
3435
describe('Edit Item > Status tab', () => {
3536

3637
it('should pass accessibility tests', () => {
38+
cy.get('a[data-test="status"]').should('be.visible');
3739
cy.get('a[data-test="status"]').click();
3840

3941
// Our selected tab should be active
@@ -50,6 +52,7 @@ describe('Edit Item > Status tab', () => {
5052
describe('Edit Item > Bitstreams tab', () => {
5153

5254
it('should pass accessibility tests', () => {
55+
cy.get('a[data-test="bitstreams"]').should('be.visible');
5356
cy.get('a[data-test="bitstreams"]').click();
5457

5558
// Our selected tab should be active
@@ -77,6 +80,7 @@ describe('Edit Item > Bitstreams tab', () => {
7780
describe('Edit Item > Curate tab', () => {
7881

7982
it('should pass accessibility tests', () => {
83+
cy.get('a[data-test="curate"]').should('be.visible');
8084
cy.get('a[data-test="curate"]').click();
8185

8286
// Our selected tab should be active
@@ -93,6 +97,7 @@ describe('Edit Item > Curate tab', () => {
9397
describe('Edit Item > Relationships tab', () => {
9498

9599
it('should pass accessibility tests', () => {
100+
cy.get('a[data-test="relationships"]').should('be.visible');
96101
cy.get('a[data-test="relationships"]').click();
97102

98103
// Our selected tab should be active
@@ -109,6 +114,7 @@ describe('Edit Item > Relationships tab', () => {
109114
describe('Edit Item > Version History tab', () => {
110115

111116
it('should pass accessibility tests', () => {
117+
cy.get('a[data-test="versionhistory"]').should('be.visible');
112118
cy.get('a[data-test="versionhistory"]').click();
113119

114120
// Our selected tab should be active
@@ -125,6 +131,7 @@ describe('Edit Item > Version History tab', () => {
125131
describe('Edit Item > Access Control tab', () => {
126132

127133
it('should pass accessibility tests', () => {
134+
cy.get('a[data-test="access-control"]').should('be.visible');
128135
cy.get('a[data-test="access-control"]').click();
129136

130137
// Our selected tab should be active
@@ -141,6 +148,7 @@ describe('Edit Item > Access Control tab', () => {
141148
describe('Edit Item > Collection Mapper tab', () => {
142149

143150
it('should pass accessibility tests', () => {
151+
cy.get('a[data-test="mapper"]').should('be.visible');
144152
cy.get('a[data-test="mapper"]').click();
145153

146154
// Our selected tab should be active

0 commit comments

Comments
 (0)