Skip to content

Commit

Permalink
Moves page load to individual tests so testRecentFormsList can load i…
Browse files Browse the repository at this point in the history
…t after creating test node.
  • Loading branch information
ryguyk committed Jan 17, 2025
1 parent 0b24bed commit 78ba548
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,27 +33,29 @@ 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');
}

/**
* Test that the page is not accessible to a user without privilege.
*/
public function testPageDoesNotLoad() {
$this->drupalGet($this->getPageUrl());
$this->sharedTestPageDoesNotLoad($this->getPageUrl());
}

/**
* 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');
}
Expand All @@ -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
Expand Down

0 comments on commit 78ba548

Please sign in to comment.