diff --git a/resources/views/partials/entity-selector-popup.blade.php b/resources/views/partials/entity-selector-popup.blade.php
new file mode 100644
index 000000000..b9166896a
--- /dev/null
+++ b/resources/views/partials/entity-selector-popup.blade.php
@@ -0,0 +1,14 @@
+
+
\ No newline at end of file
diff --git a/resources/views/partials/image-manager.blade.php b/resources/views/partials/image-manager.blade.php
index 69928e119..83625ad88 100644
--- a/resources/views/partials/image-manager.blade.php
+++ b/resources/views/partials/image-manager.blade.php
@@ -1,84 +1,94 @@
+
+
+
+
+
+ @include('partials/entity-selector', ['name' => 'entity-selector'])
+ Entity Select
+
+
+
+
+
-
-
+
+
-
-
-
-
All
- Book
- Page
+
+
+
+ Image Select
+
+
+
+
\ No newline at end of file
diff --git a/tests/Entity/EntitySearchTest.php b/tests/Entity/EntitySearchTest.php
index a9d9bc047..8adfd35a3 100644
--- a/tests/Entity/EntitySearchTest.php
+++ b/tests/Entity/EntitySearchTest.php
@@ -76,6 +76,14 @@ class EntitySearchTest extends TestCase
->see('Chapter Search Results')->seeInElement('.entity-list', $chapter->name);
}
+ public function test_search_quote_term_preparation()
+ {
+ $termString = '"192" cat "dog hat"';
+ $repo = $this->app[\BookStack\Repos\EntityRepo::class];
+ $preparedTerms = $repo->prepareSearchTerms($termString);
+ $this->assertTrue($preparedTerms === ['"192"','"dog hat"', 'cat']);
+ }
+
public function test_books_search_listing()
{
$book = \BookStack\Book::all()->last();
diff --git a/tests/Entity/EntityTest.php b/tests/Entity/EntityTest.php
index 71d83dd47..296aa72ed 100644
--- a/tests/Entity/EntityTest.php
+++ b/tests/Entity/EntityTest.php
@@ -218,13 +218,24 @@ class EntityTest extends TestCase
public function test_old_page_slugs_redirect_to_new_pages()
{
- $page = \BookStack\Page::all()->first();
+ $page = \BookStack\Page::first();
$pageUrl = $page->getUrl();
$newPageUrl = '/books/' . $page->book->slug . '/page/super-test-page';
+ // Need to save twice since revisions are not generated in seeder.
$this->asAdmin()->visit($pageUrl)
+ ->clickInElement('#content', 'Edit')
+ ->type('super test', '#name')
+ ->press('Save Page');
+
+ $page = \BookStack\Page::first();
+ $pageUrl = $page->getUrl();
+
+ // Second Save
+ $this->visit($pageUrl)
->clickInElement('#content', 'Edit')
->type('super test page', '#name')
->press('Save Page')
+ // Check redirect
->seePageIs($newPageUrl)
->visit($pageUrl)
->seePageIs($newPageUrl);
+
-
+
-
+
All
+ Book
+ Page
+
-
-
-
-
-
-
-
-
-
-
-
- Uploaded @{{ getDate(image.created_at) | date:'mediumDate' }}
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+ Uploaded @{{ getDate(image.created_at) }}
+
Load More
Load More