@@ -99,6 +99,14 @@ def test_create_preprint_from_landing(
99
99
submit_page .next_button .click ()
100
100
101
101
# Metadata page
102
+ WebDriverWait (driver , 5 ).until (
103
+ EC .visibility_of_element_located (
104
+ (By .CSS_SELECTOR , '[data-test-institution]' )
105
+ )
106
+ )
107
+ affiliated_institutions_names_metadata_page = (
108
+ submit_page .get_affiliated_institutions ()
109
+ )
102
110
WebDriverWait (driver , 5 ).until (
103
111
EC .element_to_be_clickable (
104
112
(By .CSS_SELECTOR , '[data-test-power-select-dropdown]' )
@@ -195,11 +203,38 @@ def test_create_preprint_from_landing(
195
203
submit_page .supplemental_project_create_button .click ()
196
204
submit_page .info_toast .here_then_gone ()
197
205
submit_page .next_button .click ()
206
+ WebDriverWait (driver , 5 ).until (
207
+ EC .visibility_of_element_located (
208
+ (By .CSS_SELECTOR , 'img[data-test-preprint-institution-list]' )
209
+ )
210
+ )
211
+ affiliated_institutions_names_review_page = (
212
+ submit_page .get_preprint_institution_list_review ()
213
+ )
214
+ assert (
215
+ affiliated_institutions_names_metadata_page
216
+ == affiliated_institutions_names_review_page
217
+ ), (
218
+ f'Affiliated institutions on the Review Page do not match expected values.\n '
219
+ f'Expected: { affiliated_institutions_names_metadata_page } \n '
220
+ f'Actual: { affiliated_institutions_names_review_page } '
221
+ )
198
222
submit_page .info_toast .here_then_gone ()
199
223
submit_page .create_preprint_button .click ()
200
224
preprint_detail = PreprintDetailPage (driver , verify = True )
201
225
WebDriverWait (driver , 10 ).until (EC .visibility_of (preprint_detail .title ))
202
226
assert preprint_detail .title .text == 'Selenium Test Preprint'
227
+ affiliated_institutions_names_detail_page = (
228
+ submit_page .get_preprint_institution_list_detail ()
229
+ )
230
+ assert (
231
+ affiliated_institutions_names_metadata_page
232
+ == affiliated_institutions_names_detail_page
233
+ ), (
234
+ f'Affiliated institutions on the Preprint Detail Page do not match expected values.\n '
235
+ f'Expected: { affiliated_institutions_names_metadata_page } \n '
236
+ f'Actual: { affiliated_institutions_names_detail_page } '
237
+ )
203
238
# Capture guid of supplemental materials project created during workflow
204
239
supplemental_url = preprint_detail .view_page .get_attribute ('href' )
205
240
supplemental_guid = utils .get_guid_from_url (supplemental_url , 3 )
0 commit comments