Commit 787d1dbb authored by Carsten  Rose's avatar Carsten Rose
Browse files

Add Test copyToClipboard

parent f920fc54
Pipeline #5105 passed with stages
in 4 minutes and 25 seconds
......@@ -747,7 +747,7 @@ class LinkTest extends TestCase {
* @throws \UserFormException
* @throws \UserReportException
*/
public function testIcons() {
public function testGlypicon() {
$link = new Link($this->sip, DB_INDEX_DEFAULT, true);
$result = $link->renderLink('u:http://example.com|E');
......@@ -772,6 +772,25 @@ class LinkTest extends TestCase {
$this->assertEquals('<a href="http://example.com" class="btn btn-default" title="specific" ><span class="glyphicon glyphicon-pencil" ></span></a>', $result);
}
/**
* @throws \UserReportException
*
* @throws \CodeException
* @throws \UserFormException
* @throws \UserReportException
*/
public function testGlyphiconCopyToClipboard() {
$link = new Link($this->sip, DB_INDEX_DEFAULT, true);
$result = $link->renderLink('y:some content');
$this->assertEquals('<span title="Copy to clipboard" ><button class="btn btn-default" onClick=\'new QfqNS.Clipboard({"text":"some content"});\'><span class="glyphicon glyphicon-copy" ></span></button></span>', $result);
// broken: #12327
// $result = $link->renderLink('y:some content|N');
// $this->assertEquals('<span title="Copy to clipboard" ><button class="btn btn-default" onClick=\'new QfqNS.Clipboard({"text":"some content"});\'><span class="glyphicon glyphicon-plus" ></span></button></span>', $result);
}
/**
* @throws \UserReportException
*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment