@@ -20,6 +20,9 @@ describe('Edit Item > Edit Metadata tab', () => {
2020 it ( 'should pass accessibility tests' , ( ) => {
2121 cy . get ( 'a[data-test="metadata"]' ) . click ( ) ;
2222
23+ // Our selected tab should be active
24+ cy . get ( 'a[data-test="metadata"]' ) . should ( 'have.class' , 'active' ) ;
25+
2326 // <ds-edit-item-page> tag must be loaded
2427 cy . get ( 'ds-edit-item-page' ) . should ( 'be.visible' ) ;
2528
@@ -38,6 +41,9 @@ describe('Edit Item > Status tab', () => {
3841 it ( 'should pass accessibility tests' , ( ) => {
3942 cy . get ( 'a[data-test="status"]' ) . click ( ) ;
4043
44+ // Our selected tab should be active
45+ cy . get ( 'a[data-test="status"]' ) . should ( 'have.class' , 'active' ) ;
46+
4147 // <ds-item-status> tag must be loaded
4248 cy . get ( 'ds-item-status' ) . should ( 'be.visible' ) ;
4349
@@ -51,6 +57,9 @@ describe('Edit Item > Bitstreams tab', () => {
5157 it ( 'should pass accessibility tests' , ( ) => {
5258 cy . get ( 'a[data-test="bitstreams"]' ) . click ( ) ;
5359
60+ // Our selected tab should be active
61+ cy . get ( 'a[data-test="bitstreams"]' ) . should ( 'have.class' , 'active' ) ;
62+
5463 // <ds-item-bitstreams> tag must be loaded
5564 cy . get ( 'ds-item-bitstreams' ) . should ( 'be.visible' ) ;
5665
@@ -75,6 +84,9 @@ describe('Edit Item > Curate tab', () => {
7584 it ( 'should pass accessibility tests' , ( ) => {
7685 cy . get ( 'a[data-test="curate"]' ) . click ( ) ;
7786
87+ // Our selected tab should be active
88+ cy . get ( 'a[data-test="curate"]' ) . should ( 'have.class' , 'active' ) ;
89+
7890 // <ds-item-curate> tag must be loaded
7991 cy . get ( 'ds-item-curate' ) . should ( 'be.visible' ) ;
8092
@@ -88,6 +100,9 @@ describe('Edit Item > Relationships tab', () => {
88100 it ( 'should pass accessibility tests' , ( ) => {
89101 cy . get ( 'a[data-test="relationships"]' ) . click ( ) ;
90102
103+ // Our selected tab should be active
104+ cy . get ( 'a[data-test="relationships"]' ) . should ( 'have.class' , 'active' ) ;
105+
91106 // <ds-item-relationships> tag must be loaded
92107 cy . get ( 'ds-item-relationships' ) . should ( 'be.visible' ) ;
93108
@@ -101,6 +116,9 @@ describe('Edit Item > Version History tab', () => {
101116 it ( 'should pass accessibility tests' , ( ) => {
102117 cy . get ( 'a[data-test="versionhistory"]' ) . click ( ) ;
103118
119+ // Our selected tab should be active
120+ cy . get ( 'a[data-test="versionhistory"]' ) . should ( 'have.class' , 'active' ) ;
121+
104122 // <ds-item-version-history> tag must be loaded
105123 cy . get ( 'ds-item-version-history' ) . should ( 'be.visible' ) ;
106124
@@ -114,6 +132,9 @@ describe('Edit Item > Access Control tab', () => {
114132 it ( 'should pass accessibility tests' , ( ) => {
115133 cy . get ( 'a[data-test="access-control"]' ) . click ( ) ;
116134
135+ // Our selected tab should be active
136+ cy . get ( 'a[data-test="access-control"]' ) . should ( 'have.class' , 'active' ) ;
137+
117138 // <ds-item-access-control> tag must be loaded
118139 cy . get ( 'ds-item-access-control' ) . should ( 'be.visible' ) ;
119140
@@ -127,6 +148,9 @@ describe('Edit Item > Collection Mapper tab', () => {
127148 it ( 'should pass accessibility tests' , ( ) => {
128149 cy . get ( 'a[data-test="mapper"]' ) . click ( ) ;
129150
151+ // Our selected tab should be active
152+ cy . get ( 'a[data-test="mapper"]' ) . should ( 'have.class' , 'active' ) ;
153+
130154 // <ds-item-collection-mapper> tag must be loaded
131155 cy . get ( 'ds-item-collection-mapper' ) . should ( 'be.visible' ) ;
132156
0 commit comments