Add maxheight for listings
Some checks failed
DokuWiki Default Tasks / all (push) Has been cancelled
Some checks failed
DokuWiki Default Tasks / all (push) Has been cancelled
This commit is contained in:
@@ -193,6 +193,33 @@ class plugin_luxtools_test extends DokuWikiTest
|
||||
$this->structureCheck($doc, $structure);
|
||||
}
|
||||
|
||||
public function test_default_maxheight_applies_scroll()
|
||||
{
|
||||
$instructions = p_get_instructions('{{files>' . TMP_DIR . '/filelistdata/*&style=list&direct=1&recursive=1}}');
|
||||
$xhtml = p_render('xhtml', $instructions, $info);
|
||||
|
||||
$doc = new Document();
|
||||
$doc->html($xhtml);
|
||||
|
||||
$style = (string)$doc->find('div.filetools-plugin')->attr('style');
|
||||
|
||||
$this->assertStringContainsString('max-height: 500px', $style);
|
||||
$this->assertStringContainsString('overflow-y: auto', $style);
|
||||
}
|
||||
|
||||
public function test_maxheight_can_be_disabled()
|
||||
{
|
||||
$instructions = p_get_instructions('{{files>' . TMP_DIR . '/filelistdata/*&style=table&direct=1&recursive=1&maxheight=-1}}');
|
||||
$xhtml = p_render('xhtml', $instructions, $info);
|
||||
|
||||
$doc = new Document();
|
||||
$doc->html($xhtml);
|
||||
|
||||
$style = $doc->find('div.filetools-plugin')->attr('style');
|
||||
|
||||
$this->assertTrue($style === null || $style === '');
|
||||
}
|
||||
|
||||
/**
|
||||
* This function checks that the images syntax renders a thumbnail gallery.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user