Fixed test failing due to redirect changes

- Also set APP_THEME param during testing to avoid local conflicts
This commit is contained in:
Dan Brown 2019-12-21 13:48:44 +00:00
parent ceeb9d35a0
commit 5491bd62a2
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9
2 changed files with 5 additions and 4 deletions

View File

@ -22,6 +22,7 @@
<server name="APP_ENV" value="testing"/>
<server name="APP_DEBUG" value="false"/>
<server name="APP_LANG" value="en"/>
<server name="APP_THEME" value="none"/>
<server name="APP_AUTO_LANG_PUBLIC" value="true"/>
<server name="CACHE_DRIVER" value="array"/>
<server name="SESSION_DRIVER" value="array"/>

View File

@ -637,14 +637,14 @@ class RolesTest extends BrowserKitTest
$ownPage->getUrl() => 'Delete'
]);
$bookUrl = $ownPage->book->getUrl();
$parent = $ownPage->chapter ?? $ownPage->book;
$this->visit($otherPage->getUrl())
->dontSeeInElement('.action-buttons', 'Delete')
->visit($otherPage->getUrl() . '/delete')
->seePageIs('/');
$this->visit($ownPage->getUrl())->visit($ownPage->getUrl() . '/delete')
->press('Confirm')
->seePageIs($bookUrl)
->seePageIs($parent->getUrl())
->dontSeeInElement('.book-content', $ownPage->name);
}
@ -658,10 +658,10 @@ class RolesTest extends BrowserKitTest
$otherPage->getUrl() => 'Delete'
]);
$bookUrl = $otherPage->book->getUrl();
$parent = $otherPage->chapter ?? $otherPage->book;
$this->visit($otherPage->getUrl())->visit($otherPage->getUrl() . '/delete')
->press('Confirm')
->seePageIs($bookUrl)
->seePageIs($parent->getUrl())
->dontSeeInElement('.book-content', $otherPage->name);
}