mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-11-25 09:42:10 +08:00
Fixed test failing due to redirect changes
- Also set APP_THEME param during testing to avoid local conflicts
This commit is contained in:
parent
ceeb9d35a0
commit
5491bd62a2
|
@ -22,6 +22,7 @@
|
||||||
<server name="APP_ENV" value="testing"/>
|
<server name="APP_ENV" value="testing"/>
|
||||||
<server name="APP_DEBUG" value="false"/>
|
<server name="APP_DEBUG" value="false"/>
|
||||||
<server name="APP_LANG" value="en"/>
|
<server name="APP_LANG" value="en"/>
|
||||||
|
<server name="APP_THEME" value="none"/>
|
||||||
<server name="APP_AUTO_LANG_PUBLIC" value="true"/>
|
<server name="APP_AUTO_LANG_PUBLIC" value="true"/>
|
||||||
<server name="CACHE_DRIVER" value="array"/>
|
<server name="CACHE_DRIVER" value="array"/>
|
||||||
<server name="SESSION_DRIVER" value="array"/>
|
<server name="SESSION_DRIVER" value="array"/>
|
||||||
|
|
|
@ -637,14 +637,14 @@ class RolesTest extends BrowserKitTest
|
||||||
$ownPage->getUrl() => 'Delete'
|
$ownPage->getUrl() => 'Delete'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$bookUrl = $ownPage->book->getUrl();
|
$parent = $ownPage->chapter ?? $ownPage->book;
|
||||||
$this->visit($otherPage->getUrl())
|
$this->visit($otherPage->getUrl())
|
||||||
->dontSeeInElement('.action-buttons', 'Delete')
|
->dontSeeInElement('.action-buttons', 'Delete')
|
||||||
->visit($otherPage->getUrl() . '/delete')
|
->visit($otherPage->getUrl() . '/delete')
|
||||||
->seePageIs('/');
|
->seePageIs('/');
|
||||||
$this->visit($ownPage->getUrl())->visit($ownPage->getUrl() . '/delete')
|
$this->visit($ownPage->getUrl())->visit($ownPage->getUrl() . '/delete')
|
||||||
->press('Confirm')
|
->press('Confirm')
|
||||||
->seePageIs($bookUrl)
|
->seePageIs($parent->getUrl())
|
||||||
->dontSeeInElement('.book-content', $ownPage->name);
|
->dontSeeInElement('.book-content', $ownPage->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -658,10 +658,10 @@ class RolesTest extends BrowserKitTest
|
||||||
$otherPage->getUrl() => 'Delete'
|
$otherPage->getUrl() => 'Delete'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$bookUrl = $otherPage->book->getUrl();
|
$parent = $otherPage->chapter ?? $otherPage->book;
|
||||||
$this->visit($otherPage->getUrl())->visit($otherPage->getUrl() . '/delete')
|
$this->visit($otherPage->getUrl())->visit($otherPage->getUrl() . '/delete')
|
||||||
->press('Confirm')
|
->press('Confirm')
|
||||||
->seePageIs($bookUrl)
|
->seePageIs($parent->getUrl())
|
||||||
->dontSeeInElement('.book-content', $otherPage->name);
|
->dontSeeInElement('.book-content', $otherPage->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user