Keep the space of the line-break note under the image box.
An invisible copy of the note sits under the image box, so the page does not jump when the tabs change.
This commit is contained in:
@@ -28,6 +28,20 @@ class SubmitTest extends PageTestCase {
|
||||
$this->assertStringContainsString('<script type="text/javascript" src="../publish/editor.js"></script>', $page['body']);
|
||||
}
|
||||
|
||||
public function testTheImageTabKeepsTheSpaceOfTheNote(): void {
|
||||
$html = new \DOMDocument();
|
||||
$html->loadHTML($this->get('/publish')['body'], LIBXML_NOERROR);
|
||||
$xpath = new \DOMXPath($html);
|
||||
$note = $xpath->query('//div[@id="textparent"]/div[@class="note"]');
|
||||
$spacer = $xpath->query('//div[@id="uploadparent"]/div[@class="note spacer"][@aria-hidden="true"]');
|
||||
$this->assertCount(1, $note);
|
||||
$this->assertCount(1, $spacer);
|
||||
$this->assertSame($note[0]->textContent, $spacer[0]->textContent);
|
||||
$this->assertCount(1, $xpath->query('//div[@id="uploadparent"]/div[@class="upload"]//input[@id="upload"]'));
|
||||
// Both tabs sit in the same column
|
||||
$this->assertCount(2, $xpath->query('//div[@class="textarea rightcolumn"]/div[@id="textparent" or @id="uploadparent"]'));
|
||||
}
|
||||
|
||||
public function testEditorsGetNoCaptcha(): void {
|
||||
$this->loginAs();
|
||||
$body = $this->get('/publish')['body'];
|
||||
|
||||
Reference in New Issue
Block a user