From 78ba5482666ba99fcd9d25f30782bc2a4abafa8d Mon Sep 17 00:00:00 2001 From: Ryan Koch Date: Fri, 17 Jan 2025 13:34:00 -0600 Subject: [PATCH] Moves page load to individual tests so testRecentFormsList can load it after creating test node. --- .../functional/content-pages/HomeTest.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/va_gov_form_builder/functional/content-pages/HomeTest.php b/tests/phpunit/va_gov_form_builder/functional/content-pages/HomeTest.php index 58c0ceb93a..5f00ef132a 100644 --- a/tests/phpunit/va_gov_form_builder/functional/content-pages/HomeTest.php +++ b/tests/phpunit/va_gov_form_builder/functional/content-pages/HomeTest.php @@ -33,13 +33,13 @@ public function setUp(): void { parent::setUp(); $this->loginFormBuilderUser(); - $this->drupalGet($this->getPageUrl()); } /** * Test that the page is accessible to a user with the correct privilege. */ public function testPageLoads() { + $this->drupalGet($this->getPageUrl()); $this->sharedTestPageLoads($this->getPageUrl(), 'Start a new form, or select a previous form to work with'); } @@ -47,6 +47,7 @@ public function testPageLoads() { * Test that the page is not accessible to a user without privilege. */ public function testPageDoesNotLoad() { + $this->drupalGet($this->getPageUrl()); $this->sharedTestPageDoesNotLoad($this->getPageUrl()); } @@ -54,6 +55,7 @@ public function testPageDoesNotLoad() { * Test the 'Build a form' button. */ public function testButton() { + $this->drupalGet($this->getPageUrl()); $this->click('a#form-builder-build-form-button'); $this->assertSession()->addressEquals('/form-builder/start-conversion'); } @@ -73,7 +75,7 @@ public function testRecentFormsList() { 'field_va_form_number' => $formNumber, ]); - // Refresh page. + // Load page. $this->drupalGet($this->getPageUrl()); // Ensure a link to the form appears on the page