Update snapshot tests for form generation

This commit is contained in:
Timothy Warren 2020-03-17 15:39:33 -04:00
parent ae8df3e6d6
commit 9158d01fdf
26 changed files with 84 additions and 1 deletions

View File

@ -270,7 +270,7 @@ class FormGeneratorTest extends AnimeClientTestCase {
foreach ($fields as $name => $config)
{
$html = $this->generator->generate($name, $config);
$this->assertMatchesHtmlSnapshot($html);
$this->assertMatchesSnapshot($html);
}
}
}

View File

@ -0,0 +1,3 @@
<?php return '<label><input type="radio" name="enabled" value="1" /> Yes</label>
<label><input type="radio" name="enabled" value="0" checked /> No</label>
';

View File

@ -0,0 +1,2 @@
<?php return '<input id="connection" type="text" name="connection" value="" />
';

View File

@ -0,0 +1,2 @@
<?php return '<input id="kitsu_username" type="text" name="kitsu_username" value="" />
';

View File

@ -0,0 +1,2 @@
<?php return '<input id="whose_list" type="text" name="whose_list" value="" />
';

View File

@ -0,0 +1,6 @@
<?php return '<select id="theme" name="theme">
<option value="auto">Automatically match OS theme</option>
<option value="light">Original Light Theme</option>
<option value="dark">Dark Theme</option>
</select>
';

View File

@ -0,0 +1,3 @@
<?php return '<label><input type="radio" name="show_anime_collection" value="1" /> Yes</label>
<label><input type="radio" name="show_anime_collection" value="0" checked /> No</label>
';

View File

@ -0,0 +1,3 @@
<?php return '<label><input type="radio" name="show_manga_collection" value="1" /> Yes</label>
<label><input type="radio" name="show_manga_collection" value="0" checked /> No</label>
';

View File

@ -0,0 +1,5 @@
<?php return '<select id="default_list" name="default_list">
<option value="anime">Anime</option>
<option value="manga">Manga</option>
</select>
';

View File

@ -0,0 +1,9 @@
<?php return '<select id="default_anime_list_path" name="default_anime_list_path">
<option value="watching">Watching</option>
<option value="plan_to_watch">Plan to Watch</option>
<option value="on_hold">On Hold</option>
<option value="dropped">Dropped</option>
<option value="completed">Completed</option>
<option value="all">All</option>
</select>
';

View File

@ -0,0 +1,9 @@
<?php return '<select id="default_manga_list_path" name="default_manga_list_path">
<option value="reading">Reading</option>
<option value="plan_to_read">Plan to Read</option>
<option value="on_hold">On Hold</option>
<option value="dropped">Dropped</option>
<option value="completed">Completed</option>
<option value="all">All</option>
</select>
';

View File

@ -0,0 +1,6 @@
<?php return '<select id="type" name="type">
<option value="mysql">MySQL</option>
<option value="pgsql">PostgreSQL</option>
<option value="sqlite">SQLite</option>
</select>
';

View File

@ -0,0 +1,2 @@
<?php return '<input id="client_id" type="text" name="client_id" value="" />
';

View File

@ -0,0 +1,2 @@
<?php return '<input id="host" type="text" name="host" value="" />
';

View File

@ -0,0 +1,2 @@
<?php return '<input id="user" type="text" name="user" value="" />
';

View File

@ -0,0 +1,2 @@
<?php return '<input id="pass" type="text" name="pass" value="" />
';

View File

@ -0,0 +1,2 @@
<?php return '<input id="port" type="text" name="port" value="" />
';

View File

@ -0,0 +1,2 @@
<?php return '<input id="database" type="text" name="database" value="" />
';

View File

@ -0,0 +1,2 @@
<?php return '<input id="file" type="text" name="file" value="" />
';

View File

@ -0,0 +1,2 @@
<?php return '<input id="client_secret" type="text" name="client_secret" value="" />
';

View File

@ -0,0 +1,2 @@
<?php return '<input id="username" type="text" name="username" value="" />
';

View File

@ -0,0 +1,2 @@
<?php return '<input id="access_token" type="text" name="access_token" readonly value="" />
';

View File

@ -0,0 +1,2 @@
<?php return '<input id="access_token_expires" type="text" name="access_token_expires" readonly value="" />
';

View File

@ -0,0 +1,2 @@
<?php return '<input id="refresh_token" type="text" name="refresh_token" readonly value="" />
';

View File

@ -0,0 +1,2 @@
<?php return '<input type="hidden" name="special_hidden_flag" value="foo_bar" />
';

View File

@ -0,0 +1,7 @@
<?php return '<select id="driver" name="driver">
<option value="apcu">APCu</option>
<option value="memcached">Memcached</option>
<option value="redis">Redis</option>
<option value="null">No Cache</option>
</select>
';