Skip to content

Commit

Permalink
checkbox-group: Write tests on templates
Browse files Browse the repository at this point in the history
  • Loading branch information
lapinp authored and gela committed Jul 23, 2014
1 parent 00e9a97 commit 8253f28
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 1 deletion.
10 changes: 9 additions & 1 deletion common.blocks/checkbox-group/checkbox-group.deps.js
Expand Up @@ -5,4 +5,12 @@
{
tech : 'spec.js',
mustDeps : { tech : 'bemhtml', block : 'checkbox-group' }
}]
},
{
tech : 'tmpl-spec.js',
mustDeps : [
{ tech : 'bemhtml', block : 'checkbox-group', mods : { type : 'button' } },
{ tech : 'bemhtml', block : 'icon' }
]
}
]
@@ -0,0 +1,9 @@
({
block : 'checkbox-group',
mods : { theme : 'normal', size : 'm' },
name : 'default',
options : [
{ val : 1, text : 'first' },
{ val : 3, text : 'third', disabled : true, checked : true }
]
})
@@ -0,0 +1 @@
<span class="checkbox-group checkbox-group_theme_normal checkbox-group_size_m control-group i-bem" data-bem="{&quot;checkbox-group&quot;:{}}"><label class="checkbox checkbox_theme_normal checkbox_size_m i-bem" data-bem="{&quot;checkbox&quot;:{}}"><span class="checkbox__box"><input class="checkbox__control" type="checkbox" autocomplete="off" name="default" value="1"/></span>first</label><br/><label class="checkbox checkbox_theme_normal checkbox_size_m checkbox_checked checkbox_disabled i-bem" data-bem="{&quot;checkbox&quot;:{}}"><span class="checkbox__box"><input class="checkbox__control" type="checkbox" autocomplete="off" name="default" value="3" checked="checked" disabled="disabled"/></span>third</label></span>
@@ -0,0 +1,8 @@
({
block : 'checkbox-group',
mods : { type : 'button', disabled : true },
options : [
{ text : 'first' },
{ text : 'VK', icon : { block : 'icon', mods : { social : 'vk' } } }
]
})
@@ -0,0 +1 @@
<span class="checkbox-group checkbox-group_type_button checkbox-group_disabled control-group i-bem" data-bem="{&quot;checkbox-group&quot;:{}}"><button class="button button_togglable_check button_disabled button__control checkbox checkbox_type_button checkbox_disabled i-bem" data-bem="{&quot;button&quot;:{},&quot;checkbox&quot;:{}}" role="button" disabled="disabled"><input class="checkbox__control" type="checkbox" autocomplete="off" disabled="disabled"/><span class="button__text">first</span></button><button class="button button_togglable_check button_disabled button__control checkbox checkbox_type_button checkbox_disabled i-bem" data-bem="{&quot;button&quot;:{},&quot;checkbox&quot;:{}}" role="button" disabled="disabled"><input class="checkbox__control" type="checkbox" autocomplete="off" disabled="disabled"/><i class="icon icon_social_vk"></i><span class="button__text">VK</span></button></span>

0 comments on commit 8253f28

Please sign in to comment.