Skip to content

Commit 0c7105e

Browse files
author
Gela
committed
Merge pull request #787 from /issues/776@v2
checkbox-group: Write tests on templates
2 parents c2046e6 + 8253f28 commit 0c7105e

File tree

5 files changed

+28
-1
lines changed

5 files changed

+28
-1
lines changed

common.blocks/checkbox-group/checkbox-group.deps.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,12 @@
55
{
66
tech : 'spec.js',
77
mustDeps : { tech : 'bemhtml', block : 'checkbox-group' }
8-
}]
8+
},
9+
{
10+
tech : 'tmpl-spec.js',
11+
mustDeps : [
12+
{ tech : 'bemhtml', block : 'checkbox-group', mods : { type : 'button' } },
13+
{ tech : 'bemhtml', block : 'icon' }
14+
]
15+
}
16+
]
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
({
2+
block : 'checkbox-group',
3+
mods : { theme : 'normal', size : 'm' },
4+
name : 'default',
5+
options : [
6+
{ val : 1, text : 'first' },
7+
{ val : 3, text : 'third', disabled : true, checked : true }
8+
]
9+
})
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
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>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
({
2+
block : 'checkbox-group',
3+
mods : { type : 'button', disabled : true },
4+
options : [
5+
{ text : 'first' },
6+
{ text : 'VK', icon : { block : 'icon', mods : { social : 'vk' } } }
7+
]
8+
})
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
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 commit comments

Comments
 (0)