mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-10-29 23:22:34 +01:00
Updated test to align with image manager HTML changes
This commit is contained in:
parent
cd4b612019
commit
948e95e1ad
@ -532,15 +532,15 @@ class ImageTest extends TestCase
|
|||||||
$image = Image::first();
|
$image = Image::first();
|
||||||
|
|
||||||
$resp = $this->get("/images/edit/{$image->id}");
|
$resp = $this->get("/images/edit/{$image->id}");
|
||||||
$this->withHtml($resp)->assertElementExists('button#image-manager-delete[title="Delete"]');
|
$this->withHtml($resp)->assertElementExists('button#image-manager-delete');
|
||||||
|
|
||||||
$resp = $this->actingAs($viewer)->get("/images/edit/{$image->id}");
|
$resp = $this->actingAs($viewer)->get("/images/edit/{$image->id}");
|
||||||
$this->withHtml($resp)->assertElementNotExists('button#image-manager-delete[title="Delete"]');
|
$this->withHtml($resp)->assertElementNotExists('button#image-manager-delete');
|
||||||
|
|
||||||
$this->permissions->grantUserRolePermissions($viewer, ['image-delete-all']);
|
$this->permissions->grantUserRolePermissions($viewer, ['image-delete-all']);
|
||||||
|
|
||||||
$resp = $this->actingAs($viewer)->get("/images/edit/{$image->id}");
|
$resp = $this->actingAs($viewer)->get("/images/edit/{$image->id}");
|
||||||
$this->withHtml($resp)->assertElementExists('button#image-manager-delete[title="Delete"]');
|
$this->withHtml($resp)->assertElementExists('button#image-manager-delete');
|
||||||
|
|
||||||
$this->files->deleteAtRelativePath($relPath);
|
$this->files->deleteAtRelativePath($relPath);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user