Skip to content

Commit

Permalink
dropdown: Write tests on templates
Browse files Browse the repository at this point in the history
  • Loading branch information
DimaChervan committed Jul 8, 2014
1 parent a4dad39 commit d171bab
Show file tree
Hide file tree
Showing 16 changed files with 56 additions and 0 deletions.
@@ -0,0 +1,6 @@
({
block : 'dropdown',
mods : { switcher : 'link', theme : 'normal', disabled : true },
switcher : 'link',
popup : 'bemjson'
});
1 change: 1 addition & 0 deletions common.blocks/dropdown/dropdown.tmpl-specs/10-simple.html
@@ -0,0 +1 @@
<div class="dropdown dropdown_switcher_link dropdown_theme_normal dropdown_disabled i-bem" data-bem="{&quot;dropdown&quot;:{}}"><span class="link link_pseudo link_theme_normal link_disabled link__control i-bem" data-bem="{&quot;link&quot;:{}}">link</span><div class="popup popup_theme_normal popup_autoclosable i-bem" data-bem="{&quot;popup&quot;:{}}">bemjson</div></div>
@@ -0,0 +1,6 @@
({
block : 'dropdown',
mods : { switcher : 'button', theme : 'normal', size : 'm', disabled : true },
switcher : 'button',
popup : 'bemjson'
});
1 change: 1 addition & 0 deletions common.blocks/dropdown/dropdown.tmpl-specs/20-simple.html
@@ -0,0 +1 @@
<div class="dropdown dropdown_switcher_button dropdown_theme_normal dropdown_size_m dropdown_disabled i-bem" data-bem="{&quot;dropdown&quot;:{}}"><button class="button button_size_m button_theme_normal button_disabled button__control i-bem" data-bem="{&quot;button&quot;:{}}" role="button" disabled="disabled"><span class="button__text">button</span></button><div class="popup popup_theme_normal popup_autoclosable i-bem" data-bem="{&quot;popup&quot;:{}}">bemjson</div></div>
@@ -0,0 +1,6 @@
({
block : 'dropdown',
mods : { switcher : 'link' },
switcher : { block : 'link', mods : { pseudo : true, theme : 'normal' }, content : 'link' },
popup : { block : 'link', mods : { pseudo : true, theme : 'normal' }, content : 'link' }
});
1 change: 1 addition & 0 deletions common.blocks/dropdown/dropdown.tmpl-specs/30-simple.html
@@ -0,0 +1 @@
<div class="dropdown dropdown_switcher_link i-bem" data-bem="{&quot;dropdown&quot;:{}}"><span class="link link_pseudo link_theme_normal link__control i-bem" data-bem="{&quot;link&quot;:{}}" tabindex="0">link</span><div class="popup popup_autoclosable i-bem" data-bem="{&quot;popup&quot;:{}}"><span class="link link_pseudo link_theme_normal link__control i-bem" data-bem="{&quot;link&quot;:{}}" tabindex="0">link</span></div></div>
@@ -0,0 +1,6 @@
({
block : 'dropdown',
mods : { switcher : 'button' },
switcher : { block : 'button', mods : { theme : 'normal', size : 'm' }, text : 'button' },
popup : { block : 'link', mods : { pseudo : true, theme : 'normal' }, content : 'custom link' }
});
1 change: 1 addition & 0 deletions common.blocks/dropdown/dropdown.tmpl-specs/40-simple.html
@@ -0,0 +1 @@
<div class="dropdown dropdown_switcher_button i-bem" data-bem="{&quot;dropdown&quot;:{}}"><button class="button button_theme_normal button_size_m button__control i-bem" data-bem="{&quot;button&quot;:{}}" role="button"><span class="button__text">button</span></button><div class="popup popup_autoclosable i-bem" data-bem="{&quot;popup&quot;:{}}"><span class="link link_pseudo link_theme_normal link__control i-bem" data-bem="{&quot;link&quot;:{}}" tabindex="0">custom link</span></div></div>
@@ -0,0 +1,6 @@
({
block : 'dropdown',
mods : { switcher : 'button' },
switcher : [{ block : 'button', text : 'button' }, { block : 'button', text : 'button' }],
popup : { block : 'link', mods : { pseudo : true, theme : 'normal' }, content : 'custom link' }
});
1 change: 1 addition & 0 deletions common.blocks/dropdown/dropdown.tmpl-specs/50-simple.html
@@ -0,0 +1 @@
<div class="dropdown dropdown_switcher_button i-bem" data-bem="{&quot;dropdown&quot;:{}}"><button class="button button__control i-bem" data-bem="{&quot;button&quot;:{}}" role="button"><span class="button__text">button</span></button><button class="button button__control i-bem" data-bem="{&quot;button&quot;:{}}" role="button"><span class="button__text">button</span></button><div class="popup popup_autoclosable i-bem" data-bem="{&quot;popup&quot;:{}}"><span class="link link_pseudo link_theme_normal link__control i-bem" data-bem="{&quot;link&quot;:{}}" tabindex="0">custom link</span></div></div>
@@ -0,0 +1,6 @@
({
block : 'dropdown',
mods : { switcher : 'link' },
switcher : [{ block : 'link', content : 'link' }, { block : 'link', content : 'link' }],
popup : { block : 'link', mods : { pseudo : true, theme : 'normal' }, content : 'link' }
});
1 change: 1 addition & 0 deletions common.blocks/dropdown/dropdown.tmpl-specs/60-simple.html
@@ -0,0 +1 @@
<div class="dropdown dropdown_switcher_link i-bem" data-bem="{&quot;dropdown&quot;:{}}"><a class="link link__control i-bem" data-bem="{&quot;link&quot;:{}}" tabindex="0">link</a><a class="link link__control i-bem" data-bem="{&quot;link&quot;:{}}" tabindex="0">link</a><div class="popup popup_autoclosable i-bem" data-bem="{&quot;popup&quot;:{}}"><span class="link link_pseudo link_theme_normal link__control i-bem" data-bem="{&quot;link&quot;:{}}" tabindex="0">link</span></div></div>
@@ -0,0 +1,6 @@
({
block : 'dropdown',
mods : { switcher : 'link' },
switcher : { tag : 'p', content : 'switcher' },
popup : 'popup'
});
1 change: 1 addition & 0 deletions common.blocks/dropdown/dropdown.tmpl-specs/70-simple.html
@@ -0,0 +1 @@
<div class="dropdown dropdown_switcher_link i-bem" data-bem="{&quot;dropdown&quot;:{}}"><p>switcher</p><div class="popup popup_autoclosable i-bem" data-bem="{&quot;popup&quot;:{}}">popup</div></div>
@@ -0,0 +1,6 @@
({
block : 'dropdown',
mods : { switcher : 'button' },
switcher : { tag : 'p', content : 'switcher' },
popup : 'popup'
});
1 change: 1 addition & 0 deletions common.blocks/dropdown/dropdown.tmpl-specs/80-simple.html
@@ -0,0 +1 @@
<div class="dropdown dropdown_switcher_button i-bem" data-bem="{&quot;dropdown&quot;:{}}"><p>switcher</p><div class="popup popup_autoclosable i-bem" data-bem="{&quot;popup&quot;:{}}">popup</div></div>

0 comments on commit d171bab

Please sign in to comment.