Skip to content
Snippets Groups Projects
Commit c3497013 authored by Ghislain Loas's avatar Ghislain Loas
Browse files

dev #14482 add coverage on add custom field form

parent 5484a25e
Branches
Tags
5 merge requests!321Dev#12992 custom fields,!302Dev#12992 Custom Fields,!235Dev#12992 Custom Fields,!223Dev#12992 Custom Fields,!216Dev#12992 Custom Fields
......@@ -75,6 +75,32 @@ class CustomFieldsControllerAddIndexTest extends AbstractControllerTestCase {
public function formShouldBeDisplay() {
$this->assertXpath('//form[@id="custom_field"]');
}
/** @test */
public function labelInputShouldBeDisplay() {
$this->assertXPath('//form//input[@name="label"]');
}
/** @test */
public function selectFieldTypeShouldBeDisplay() {
$this->assertXPath('//form//select[@name="field_type"]');
}
public function getFieldTypeValues() {
return [ ['text', 'champ texte'],
['text-area', 'champ zone de texte'],
['select', "liste d'options"]];
}
/** @test
* @dataProvider getFieldTypeValues
*/
public function fieldTypeValueShouldBeAsExpected($value, $label) {
$this->assertXpathContentContains('//form//select/option[@value="'.$value.'"]', $label);
}
}
?>
\ No newline at end of file
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