diff --git a/tests/robot-tests/.env.example b/tests/robot-tests/.env.example index b045087d24..e2550e5e7b 100644 --- a/tests/robot-tests/.env.example +++ b/tests/robot-tests/.env.example @@ -12,6 +12,7 @@ EXPIRED_INVITE_USER_EMAIL= # Expired Invite user email EXPIRED_INVITE_USER_PASSWORD= # Expired Invite user password RELEASE_COMPLETE_WAIT=120 # Time to wait for a release to publish (in seconds) WAIT_CACHE_EXPIRY=2 # Time to wait for the environment's various caches to expire (in seconds. Local = 2, Dev = 10) +WAIT_NEXT_ISR=5 # Time for Next.js to perform Incremental Static Regeneration (generate a new version of a stale page in the background) WAIT_MEDIUM=120 # Variable used throughout tests (in seconds) WAIT_SMALL=45 # Variable used throughout tests (in seconds) WAIT_LONG=180 # Variable used throughout tests (in seconds) diff --git a/tests/robot-tests/run_tests.py b/tests/robot-tests/run_tests.py index 337edb6bda..e88f5dd4f1 100755 --- a/tests/robot-tests/run_tests.py +++ b/tests/robot-tests/run_tests.py @@ -179,6 +179,7 @@ "FAIL_TEST_SUITES_FAST", "IDENTITY_PROVIDER", "WAIT_CACHE_EXPIRY", + "WAIT_NEXT_ISR", "EXPIRED_INVITE_USER_EMAIL", "PUBLISHER_FUNCTIONS_URL", ] diff --git a/tests/robot-tests/tests/libs/public-common.robot b/tests/robot-tests/tests/libs/public-common.robot index 3912d0a6eb..6b27e0c610 100644 --- a/tests/robot-tests/tests/libs/public-common.robot +++ b/tests/robot-tests/tests/libs/public-common.robot @@ -61,9 +61,8 @@ user checks methodology note user waits until element contains css:#methodologyNotes li:nth-of-type(${number}) time ${displayDate} user waits until element contains css:#methodologyNotes li:nth-of-type(${number}) p ${content} -# Next.js will have returned a stale cached page for the last request and will have created a new cached page in -# the background in the meantime, so request the page again. - user reloads the stale cached page - sleep 3 + # Next.js will have returned a stale cached page for the last request and will have created a new cached page in + # the background in the meantime using Incremental Static Regeneration, so request the page again. + sleep %{WAIT_NEXT_ISR} user reloads page