Skip to content

Commit 3442888

Browse files
committed
Add assertions for OSFI affiliations in test_edit_preprint
1 parent 00a9048 commit 3442888

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/test_preprints.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,9 @@ def test_edit_preprint(self, session, driver, preprint_detail_page):
312312
WebDriverWait(driver, 5).until(
313313
EC.visibility_of_element_located((By.CSS_SELECTOR, '[data-test-title]'))
314314
)
315+
affiliated_institutions_names_metadata_page = (
316+
edit_page.get_affiliated_institutions()
317+
)
315318
edit_page.select_top_level_subject('Business')
316319
# Add another Tag and click the Save and continue button
317320
edit_page.basics_tags_input.send_keys(os.environ['PYTEST_CURRENT_TEST'])
@@ -345,6 +348,17 @@ def test_edit_preprint(self, session, driver, preprint_detail_page):
345348
# Verify Title and Abstract
346349
assert detail_page.title.text == 'Selenium Preprint Edit'
347350
assert detail_page.abstract.text == 'Testing Selenium Abstract edit'
351+
affiliated_institutions_names_detail_page = (
352+
edit_page.get_preprint_institution_list_detail()
353+
)
354+
assert (
355+
affiliated_institutions_names_metadata_page
356+
== affiliated_institutions_names_detail_page
357+
), (
358+
f'Affiliated institutions on the Preprint Detail Page do not match expected values.\n'
359+
f'Expected: {affiliated_institutions_names_metadata_page}\n'
360+
f'Actual: {affiliated_institutions_names_detail_page}'
361+
)
348362
# Verify new Subject appears on the page
349363
subjects = detail_page.subjects
350364
subject_found = False

0 commit comments

Comments
 (0)