Skip to content

Commit d4c240a

Browse files
authored
Merge pull request #29 from CenterForOpenScience/testFix/preprints-engrxiv
[ENG-3642] - Fix A11y Production Test Failure with engrxiv
2 parents 5c5d4f2 + e5334b8 commit d4c240a

File tree

1 file changed

+21
-11
lines changed

1 file changed

+21
-11
lines changed

tests/test_a11y_preprints.py

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -184,17 +184,27 @@ def provider(self, request):
184184
def test_accessibility(
185185
self, session, driver, provider, write_files, exclude_best_practice
186186
):
187-
landing_page = PreprintLandingPage(driver, provider=provider)
188-
landing_page.goto()
189-
assert PreprintLandingPage(driver, verify=True)
190-
page_name = 'bp_' + provider['id']
191-
a11y.run_axe(
192-
driver,
193-
session,
194-
page_name,
195-
write_files=write_files,
196-
exclude_best_practice=exclude_best_practice,
197-
)
187+
# As of January 24, 2022, the Engineering Archive ('engrxiv') preprint provider
188+
# has switched away from using OSF as their preprint service. Therefore the
189+
# web page that OSF automatically redirects to is no longer based on the OSF
190+
# Preprints landing/discover page design. However, they remain in our active
191+
# preprint provider list in the OSF api due to legal issues that are still being
192+
# worked out. The best guess is that the transition will be completed (and
193+
# engrxiv removed from the api list) by the end of the first quarter of 2022
194+
# (i.e. end of March). So to prevent this test from failing in Production
195+
# for 'engrxiv' we are going to skip the following steps for this provider.
196+
if 'engrxiv' not in provider['id']:
197+
landing_page = PreprintLandingPage(driver, provider=provider)
198+
landing_page.goto()
199+
assert PreprintLandingPage(driver, verify=True)
200+
page_name = 'bp_' + provider['id']
201+
a11y.run_axe(
202+
driver,
203+
session,
204+
page_name,
205+
write_files=write_files,
206+
exclude_best_practice=exclude_best_practice,
207+
)
198208

199209

200210
# We do not currently have a user setup as an administrator or noderator for any of the

0 commit comments

Comments
 (0)