@@ -113,8 +113,8 @@ describe('Data suite: Amwandenga', function() {
113
113
114
114
// Enter details
115
115
cy . get ( 'h2' ) . contains ( 'Submission Details' ) ;
116
- cy . setTinyMceContent ( 'titleAbstract-abstract-control-en_US ' , submission . abstract ) ;
117
- cy . get ( '#titleAbstract-title-control-en_US ' ) . click ( { force : true } ) ; // Ensure blur event is fired
116
+ cy . setTinyMceContent ( 'titleAbstract-abstract-control-en ' , submission . abstract ) ;
117
+ cy . get ( '#titleAbstract-title-control-en ' ) . click ( { force : true } ) ; // Ensure blur event is fired
118
118
119
119
cy . get ( '.submissionWizard__footer button' ) . contains ( 'Continue' ) . click ( ) ;
120
120
@@ -144,11 +144,11 @@ describe('Data suite: Amwandenga', function() {
144
144
cy . get ( '.listPanel__item:contains("Alan Mwandenga")' ) ;
145
145
cy . get ( 'button' ) . contains ( 'Add Contributor' ) . click ( ) ;
146
146
cy . get ( '.modal__panel:contains("Add Contributor")' ) . find ( 'button' ) . contains ( 'Save' ) . click ( ) ;
147
- cy . get ( '#contributor-givenName-error-en_US ' ) . contains ( 'This field is required.' ) ;
147
+ cy . get ( '#contributor-givenName-error-en ' ) . contains ( 'This field is required.' ) ;
148
148
cy . get ( '#contributor-email-error' ) . contains ( 'This field is required.' ) ;
149
149
cy . get ( '#contributor-country-error' ) . contains ( 'This field is required.' ) ;
150
- cy . get ( '.pkpFormField:contains("Given Name")' ) . find ( 'input[name*="en_US "]' ) . type ( submission . authors [ 0 ] . givenName ) ;
151
- cy . get ( '.pkpFormField:contains("Family Name")' ) . find ( 'input[name*="en_US "]' ) . type ( submission . authors [ 0 ] . familyName ) ;
150
+ cy . get ( '.pkpFormField:contains("Given Name")' ) . find ( 'input[name*="en "]' ) . type ( submission . authors [ 0 ] . givenName ) ;
151
+ cy . get ( '.pkpFormField:contains("Family Name")' ) . find ( 'input[name*="en "]' ) . type ( submission . authors [ 0 ] . familyName ) ;
152
152
cy . get ( '.pkpFormField:contains("Country")' ) . find ( 'select' ) . select ( submission . authors [ 0 ] . country )
153
153
cy . get ( '.pkpFormField:contains("Email")' ) . find ( 'input' ) . type ( 'notanemail' ) ;
154
154
cy . get ( '.modal__panel:contains("Add Contributor")' ) . find ( 'button' ) . contains ( 'Save' ) . click ( ) ;
@@ -174,7 +174,7 @@ describe('Data suite: Amwandenga', function() {
174
174
175
175
// Delete a contributor
176
176
cy . get ( '.listPanel:contains("Contributors")' ) . find ( 'button' ) . contains ( 'Add Contributor' ) . click ( ) ;
177
- cy . get ( '.pkpFormField:contains("Given Name")' ) . find ( 'input[name*="en_US "]' ) . type ( 'Fake Author Name' ) ;
177
+ cy . get ( '.pkpFormField:contains("Given Name")' ) . find ( 'input[name*="en "]' ) . type ( 'Fake Author Name' ) ;
178
178
cy . get ( '.pkpFormField:contains("Email")' ) . find ( 'input' ) . type ( 'delete@mailinator.com' ) ;
179
179
cy . get ( '.pkpFormField:contains("Country")' ) . find ( 'select' ) . select ( 'Barbados' ) ;
180
180
cy . get ( '.modal__panel:contains("Add Contributor")' ) . find ( 'button' ) . contains ( 'Save' ) . click ( ) ;
@@ -244,7 +244,7 @@ describe('Data suite: Amwandenga', function() {
244
244
// Submit
245
245
cy . contains ( 'Make a Submission: Review' ) ;
246
246
cy . get ( 'button:contains("Submit")' ) . click ( ) ;
247
- const message = 'The submission, ' + submission . title + ', will be submitted to ' + Cypress . env ( 'contextTitles' ) . en_US + ' for editorial review' ;
247
+ const message = 'The submission, ' + submission . title + ', will be submitted to ' + Cypress . env ( 'contextTitles' ) . en + ' for editorial review' ;
248
248
cy . get ( '.modal__panel:contains("' + message + '")' ) . find ( 'button' ) . contains ( 'Submit' ) . click ( ) ;
249
249
cy . contains ( 'Submission complete' ) ;
250
250
cy . get ( 'a' ) . contains ( 'Create a new submission' ) ;
@@ -281,35 +281,35 @@ describe('Data suite: Amwandenga', function() {
281
281
submission . prefix = 'The' ;
282
282
submission . title = 'Signalling Theory Dividends' ;
283
283
submission . subtitle = 'A Review Of The Literature And Empirical Evidence' ;
284
- cy . get ( '#titleAbstract input[name=prefix-en_US ]' ) . type ( submission . prefix , { delay : 0 } ) ;
285
- cy . setTinyMceContent ( 'titleAbstract-subtitle-control-en_US ' , submission . subtitle ) ;
286
- cy . setTinyMceContent ( 'titleAbstract-title-control-en_US ' , '' ) ;
287
- cy . setTinyMceContent ( 'titleAbstract-abstract-control-en_US ' , submission . abstract . repeat ( 10 ) ) ;
288
- cy . get ( '#titleAbstract-title-control-en_US ' ) . click ( { force :true } ) ; // Ensure blur event is fired
289
- cy . get ( '#titleAbstract-subtitle-control-en_US ' ) . click ( { force : true } ) ;
284
+ cy . get ( '#titleAbstract input[name=prefix-en ]' ) . type ( submission . prefix , { delay : 0 } ) ;
285
+ cy . setTinyMceContent ( 'titleAbstract-subtitle-control-en ' , submission . subtitle ) ;
286
+ cy . setTinyMceContent ( 'titleAbstract-title-control-en ' , '' ) ;
287
+ cy . setTinyMceContent ( 'titleAbstract-abstract-control-en ' , submission . abstract . repeat ( 10 ) ) ;
288
+ cy . get ( '#titleAbstract-title-control-en ' ) . click ( { force :true } ) ; // Ensure blur event is fired
289
+ cy . get ( '#titleAbstract-subtitle-control-en ' ) . click ( { force : true } ) ;
290
290
cy . get ( '#titleAbstract button' ) . contains ( 'Save' ) . click ( ) ;
291
291
292
- cy . get ( '#titleAbstract [id*=title-error-en_US ]' ) . find ( 'span' ) . contains ( 'This field is required.' ) ;
293
- cy . setTinyMceContent ( 'titleAbstract-title-control-en_US ' , submission . title ) ;
292
+ cy . get ( '#titleAbstract [id*=title-error-en ]' ) . find ( 'span' ) . contains ( 'This field is required.' ) ;
293
+ cy . setTinyMceContent ( 'titleAbstract-title-control-en ' , submission . title ) ;
294
294
cy . get ( '#titleAbstract button' ) . contains ( 'Save' ) . click ( ) ;
295
295
296
- cy . get ( '#titleAbstract [id*=abstract-error-en_US ]' ) . find ( 'span' ) . contains ( 'The abstract is too long.' ) ;
297
- cy . setTinyMceContent ( 'titleAbstract-abstract-control-en_US ' , submission . abstract ) ;
298
- cy . get ( '#titleAbstract-title-control-en_US ' ) . click ( { force :true } ) ; // Ensure blur event is fired
299
- cy . get ( '#titleAbstract-subtitle-control-en_US ' ) . click ( { force :true } ) ;
296
+ cy . get ( '#titleAbstract [id*=abstract-error-en ]' ) . find ( 'span' ) . contains ( 'The abstract is too long.' ) ;
297
+ cy . setTinyMceContent ( 'titleAbstract-abstract-control-en ' , submission . abstract ) ;
298
+ cy . get ( '#titleAbstract-title-control-en ' ) . click ( { force :true } ) ; // Ensure blur event is fired
299
+ cy . get ( '#titleAbstract-subtitle-control-en ' ) . click ( { force :true } ) ;
300
300
cy . get ( '#titleAbstract button' ) . contains ( 'Save' ) . click ( ) ;
301
301
cy . get ( '#titleAbstract [role="status"]' ) . contains ( 'Saved' ) ;
302
302
303
303
// Metadata
304
304
cy . get ( '#metadata-button' ) . click ( ) ;
305
- cy . get ( '#metadata-keywords-control-en_US ' ) . type ( 'Professional Development' , { delay : 0 } ) ;
305
+ cy . get ( '#metadata-keywords-control-en ' ) . type ( 'Professional Development' , { delay : 0 } ) ;
306
306
cy . get ( '.autosuggest__results-item' ) . contains ( 'Professional Development' ) ;
307
- cy . get ( '#metadata-keywords-control-en_US ' ) . type ( '{enter}' , { delay : 0 } ) ;
308
- cy . get ( '#metadata-keywords-selected-en_US ' ) . contains ( 'Professional Development' ) ;
309
- cy . get ( '#metadata-keywords-control-en_US ' ) . type ( 'Social Transformation' , { delay : 0 } ) ;
307
+ cy . get ( '#metadata-keywords-control-en ' ) . type ( '{enter}' , { delay : 0 } ) ;
308
+ cy . get ( '#metadata-keywords-selected-en ' ) . contains ( 'Professional Development' ) ;
309
+ cy . get ( '#metadata-keywords-control-en ' ) . type ( 'Social Transformation' , { delay : 0 } ) ;
310
310
cy . get ( '.autosuggest__results-item' ) . contains ( 'Social Transformation' ) ;
311
- cy . get ( '#metadata-keywords-control-en_US ' ) . type ( '{enter}' , { delay : 0 } ) ;
312
- cy . get ( '#metadata-keywords-selected-en_US ' ) . contains ( 'Social Transformation' ) ;
311
+ cy . get ( '#metadata-keywords-control-en ' ) . type ( '{enter}' , { delay : 0 } ) ;
312
+ cy . get ( '#metadata-keywords-selected-en ' ) . contains ( 'Social Transformation' ) ;
313
313
cy . get ( '#metadata button' ) . contains ( 'Save' ) . click ( ) ;
314
314
cy . get ( '#metadata [role="status"]' ) . contains ( 'Saved' ) ;
315
315
@@ -337,8 +337,8 @@ describe('Data suite: Amwandenga', function() {
337
337
338
338
cy . get ( '#contributors button' ) . contains ( 'Add Contributor' ) . click ( ) ;
339
339
340
- cy . get ( '#contributors [name="givenName-en_US "]' ) . type ( 'Nicolas' , { delay : 0 } ) ;
341
- cy . get ( '#contributors [name="familyName-en_US "]' ) . type ( 'Riouf' , { delay : 0 } ) ;
340
+ cy . get ( '#contributors [name="givenName-en "]' ) . type ( 'Nicolas' , { delay : 0 } ) ;
341
+ cy . get ( '#contributors [name="familyName-en "]' ) . type ( 'Riouf' , { delay : 0 } ) ;
342
342
cy . get ( '#contributors [name="email"]' ) . type ( 'nriouf@mailinator.com' , { delay : 0 } ) ;
343
343
cy . get ( '#contributors [name="country"]' ) . select ( 'South Africa' ) ;
344
344
cy . get ( '#contributors button' ) . contains ( 'Save' ) . click ( ) ;
@@ -469,7 +469,7 @@ describe('Data suite: Amwandenga', function() {
469
469
cy . contains ( 'This version has been published and can not be edited.' ) . should ( 'not.exist' ) ;
470
470
471
471
// Edit unpublished version's title
472
- cy . setTinyMceContent ( 'titleAbstract-title-control-en_US ' , 'The Signalling Theory Dividends Version 2' ) ;
472
+ cy . setTinyMceContent ( 'titleAbstract-title-control-en ' , 'The Signalling Theory Dividends Version 2' ) ;
473
473
cy . get ( '#titleAbstract button' ) . contains ( 'Save' ) . click ( ) ;
474
474
cy . get ( '#titleAbstract [role="status"]' ) . contains ( 'Saved' ) ;
475
475
@@ -478,7 +478,7 @@ describe('Data suite: Amwandenga', function() {
478
478
cy . get ( '#contributors-button' ) . click ( ) ;
479
479
480
480
cy . get ( '#contributors div' ) . contains ( 'Alan Mwandenga' ) . parent ( ) . parent ( ) . find ( 'button' ) . contains ( 'Edit' ) . click ( ) ;
481
- cy . get ( '#contributors [name="familyName-en_US "]' ) . type ( ' Version 2' , { delay : 0 } ) ;
481
+ cy . get ( '#contributors [name="familyName-en "]' ) . type ( ' Version 2' , { delay : 0 } ) ;
482
482
cy . get ( '#contributors button' ) . contains ( 'Save' ) . click ( ) ;
483
483
// cy.get('#contributors button').contains('Save').should("not.be.visible");
484
484
cy . wait ( 1500 ) ; // Wait for the grid to reload
0 commit comments