Inial implementation for folder opening

This commit is contained in:
2026-01-05 11:25:18 +01:00
parent 9a067eca16
commit c442c0df1e
3 changed files with 157 additions and 0 deletions

View File

@@ -213,4 +213,24 @@ class plugin_filetools_test extends DokuWikiTest
$this->assertStringContainsString('exampleimage.png', $xhtml);
}
/**
* This function checks that the open syntax renders an inline button.
*/
public function test_open_button()
{
$instructions = p_get_instructions('{{open>/tmp/somewhere|Open here}}');
$xhtml = p_render('xhtml', $instructions, $info);
$doc = new Document();
$doc->html($xhtml);
$structure = [
'button.filetools-open' => 1,
];
$this->structureCheck($doc, $structure);
$this->assertStringContainsString('Open here', $xhtml);
$this->assertStringContainsString('data-path="/tmp/somewhere"', $xhtml);
}
}