-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
gela
authored and
lapinp
committed
Jul 1, 2014
1 parent
0c9bee1
commit 97b1256
Showing
97 changed files
with
267 additions
and
0 deletions.
There are no files selected for viewing
153 changes: 153 additions & 0 deletions
153
common.blocks/radio-group/radio-group.tests/gemini.bemjson.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
({ | ||
block : 'page', | ||
title : 'bem-components: radio-group', | ||
mods : { theme : 'normal' }, | ||
head : [ | ||
{ elem : 'css', url : '_gemini.css' }, | ||
{ elem : 'js', url : '_gemini.js' } | ||
], | ||
content : [ | ||
|
||
{ tag : 'h3', content : 'default enabled' }, | ||
{ block : 'test', cls : 'default-enabled', content : { | ||
block : 'radio-group', | ||
name : 'default1', | ||
options : [ | ||
{ val : 1, text : 'first' }, | ||
{ val : 2, text : 'second', checked : true } | ||
] | ||
} }, | ||
|
||
{ tag : 'h3', content : 'default disabled' }, | ||
{ block : 'test', cls : 'default-disabled', content : { | ||
block : 'radio-group', | ||
name : 'default2', | ||
options : [ | ||
{ val : 3, text : 'third', disabled : true }, | ||
{ val : 4, text : 'four', checked : true, disabled : true } | ||
] | ||
} }, | ||
{ tag : 'hr' }, | ||
|
||
['m', 'l'].map(function(size) { | ||
return [ | ||
{ tag : 'h2', content : 'size ' + size }, | ||
|
||
{ tag : 'h3', content : 'normal-enabled' }, | ||
{ block : 'test', cls : 'normal-' + size + '-enabled', content : { | ||
block : 'radio-group', | ||
name : 'normal1', | ||
mods : { theme : 'normal', size : size }, | ||
options : [ | ||
{ val : 1, text : 'first' }, | ||
{ val : 2, text : 'second', checked : true } | ||
] | ||
} }, | ||
|
||
{ tag : 'h3', content : 'normal-disabled' }, | ||
{ block : 'test', cls : 'normal-' + size + '-disabled', content : { | ||
block : 'radio-group', | ||
name : 'normal2', | ||
mods : { theme : 'normal', size : size }, | ||
options : [ | ||
{ val : 3, text : 'third', disabled : true }, | ||
{ val : 4, text : 'four', checked : true, disabled : true } | ||
] | ||
} }, | ||
|
||
{ tag : 'h3', content : 'line-enabled' }, | ||
{ block : 'test', cls : 'line-normal-' + size + '-enabled', content : { | ||
block : 'radio-group', | ||
name : 'normal-line1', | ||
mods : { theme : 'normal', size : size, type : 'line' }, | ||
options : [ | ||
{ val : 1, text : 'first' }, | ||
{ val : 2, text : 'second', checked : true } | ||
] | ||
} }, | ||
|
||
{ tag : 'h3', content : 'line-disabled' }, | ||
{ block : 'test', cls : 'line-normal-' + size + '-disabled', content : { | ||
block : 'radio-group', | ||
name : 'normal-line2', | ||
mods : { theme : 'normal', size : size, type : 'line' }, | ||
options : [ | ||
{ val : 3, text : 'third', disabled : true }, | ||
{ val : 4, text : 'fourth', checked : true, disabled : true } | ||
] | ||
} }, | ||
|
||
{ tag : 'h3', content : 'button-enabled' }, | ||
{ | ||
block : 'radio-group', | ||
name : 'normal-button1', | ||
mods : { theme : 'normal', size : size, type : 'button' }, | ||
options : [ | ||
{ val : 1, text : 'first' }, | ||
{ val : 2, text : 'second', checked : true } | ||
], | ||
cls : 'button-normal-' + size + '-enabled' | ||
|
||
}, | ||
|
||
{ tag : 'h3', content : 'button-disabled' }, | ||
{ | ||
block : 'radio-group', | ||
name : 'normal-button2', | ||
mods : { theme : 'normal', size : size, type : 'button' }, | ||
options : [ | ||
{ val : 3, text : 'third', disabled : true }, | ||
{ val : 4, text : 'fourth', checked : true, disabled : true } | ||
], | ||
cls : 'button-normal-' + size + '-disabled' | ||
}, | ||
|
||
{ tag : 'h3', content : 'button-icon-enabled' }, | ||
{ | ||
block : 'radio-group', | ||
name : 'normal-button3', | ||
mods : { theme : 'normal', size : size, type : 'button' }, | ||
cls : 'button-normal-' + size + '-icon-enabled', | ||
options : [ | ||
{ | ||
val : 'vk', | ||
text : 'VK', | ||
icon : { block : 'icon', mods : { social : 'vk' } } | ||
}, | ||
{ | ||
val : 'twitter', | ||
text : 'Twitter', | ||
icon : { block : 'icon', mods : { social : 'twitter' } }, | ||
checked : true | ||
} | ||
] | ||
}, | ||
|
||
{ tag : 'h3', content : 'button-icon-disabled' }, | ||
{ | ||
block : 'radio-group', | ||
name : 'normal-button4', | ||
mods : { theme : 'normal', size : size, type : 'button' }, | ||
cls : 'button-normal-' + size + '-icon-disabled', | ||
options : [ | ||
{ | ||
val : 'vk', | ||
text : 'VK', | ||
disabled : true, | ||
icon : { block : 'icon', mods : { social : 'vk' } } | ||
}, | ||
{ | ||
val : 'twitter', | ||
text : 'Twitter', | ||
disabled : true, | ||
checked : true, | ||
icon : { block : 'icon', mods : { social : 'twitter' } } | ||
} | ||
] | ||
}, | ||
{ tag : 'hr' } | ||
] | ||
}) | ||
|
||
] | ||
}); |
1 change: 1 addition & 0 deletions
1
common.blocks/radio-group/radio-group.tests/gemini.blocks/.bem/level.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
exports.baseLevelPath = require.resolve('../../../../../.bem/levels/blocks'); |
5 changes: 5 additions & 0 deletions
5
common.blocks/radio-group/radio-group.tests/gemini.blocks/test/test.roo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.test | ||
{ | ||
display: inline-block; | ||
padding-top: 5px; | ||
} |
5 changes: 5 additions & 0 deletions
5
common.blocks/radio-group/radio-group.tests/gemini.blocks/test/test.styl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.test | ||
{ | ||
display: inline-block; | ||
padding-top: 5px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
var gemini = require('gemini'); | ||
|
||
gemini.suite('radio-group', function(root) { | ||
var testChecker; | ||
|
||
root.setUrl('desktop.tests/radio-group/gemini/gemini.html'); | ||
|
||
testChecker = { | ||
blocksWithMouseDown : { | ||
|
||
checkers : [ | ||
'default', | ||
'button-normal-m', | ||
'button-normal-l', | ||
'button-normal-m-icon', | ||
'button-normal-l-icon' | ||
], | ||
|
||
testing : function() { | ||
this.checkers.forEach(function(test) { | ||
var radioItemSelector = '.' + test, | ||
radioItemSelectorEnabled = radioItemSelector + '-enabled', | ||
radioItemSelectorDisabled = radioItemSelector + '-disabled', | ||
captureArea = !!~test.indexOf('button')? | ||
radioItemSelectorEnabled + ' .button' : | ||
radioItemSelectorEnabled + ' .radio__box'; | ||
|
||
gemini.suite(test + '-enabled', function(suite) { | ||
suite | ||
.setCaptureElements(radioItemSelectorEnabled, captureArea) | ||
.before(function(actions, find) { | ||
this.radioItem = find(radioItemSelectorEnabled + ' .radio'); | ||
}) | ||
.capture('plain') | ||
.capture('hovered', function(actions) { | ||
actions.mouseMove(this.radioItem); | ||
}) | ||
.capture('down', function(actions) { | ||
actions.mouseDown(this.radioItem); | ||
}) | ||
.capture('up', function(actions) { | ||
actions.mouseUp(this.radioItem); | ||
}) | ||
}); | ||
|
||
gemini.suite(test + '-disabled', function(suite) { | ||
suite | ||
.setCaptureElements(radioItemSelectorDisabled) | ||
.capture('plain'); | ||
}); | ||
}); | ||
} | ||
|
||
}, | ||
|
||
blocksWithClick : { | ||
|
||
checkers : [ | ||
'normal-m', | ||
'normal-l', | ||
'line-normal-m', | ||
'line-normal-l' | ||
], | ||
|
||
testing : function() { | ||
this.checkers.forEach(function(test) { | ||
var radioItemSelector = '.' + test, | ||
radioItemSelectorEnabled = radioItemSelector + '-enabled', | ||
radioItemSelectorDisabled = radioItemSelector + '-disabled', | ||
captureArea = radioItemSelectorEnabled + ' .radio__box'; | ||
|
||
gemini.suite(test + '-enabled', function(suite) { | ||
suite | ||
.setCaptureElements(radioItemSelectorEnabled, captureArea) | ||
.before(function(actions, find) { | ||
this.radioItem = find(radioItemSelectorEnabled + ' .radio'); | ||
}) | ||
.capture('plain') | ||
.capture('hovered', function(actions) { | ||
actions.mouseMove(this.radioItem); | ||
}) | ||
.capture('click', function(actions) { | ||
actions.click(this.radioItem); | ||
}) | ||
}); | ||
|
||
gemini.suite(test + '-disabled', function(suite) { | ||
suite | ||
.setCaptureElements(radioItemSelectorDisabled) | ||
.capture('plain'); | ||
}); | ||
}); | ||
} | ||
|
||
} | ||
} | ||
|
||
Object.keys(testChecker) | ||
.forEach(function(test) { | ||
testChecker[test]['testing'](); | ||
}); | ||
|
||
}); |
Binary file added
BIN
+863 Bytes
gemini/screens/radio-group/button-normal-l-disabled/plain/chrome-v35.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+873 Bytes
gemini/screens/radio-group/button-normal-l-disabled/plain/firefox-v30.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.3 KB
gemini/screens/radio-group/button-normal-l-enabled/down/chrome-v35.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.34 KB
gemini/screens/radio-group/button-normal-l-enabled/down/firefox-v30.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.29 KB
gemini/screens/radio-group/button-normal-l-enabled/hovered/chrome-v35.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.34 KB
gemini/screens/radio-group/button-normal-l-enabled/hovered/firefox-v30.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.29 KB
gemini/screens/radio-group/button-normal-l-enabled/plain/chrome-v35.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.33 KB
gemini/screens/radio-group/button-normal-l-enabled/plain/firefox-v30.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.3 KB
gemini/screens/radio-group/button-normal-l-enabled/pressed/chrome-v35.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.34 KB
gemini/screens/radio-group/button-normal-l-enabled/pressed/firefox-v30.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.59 KB
gemini/screens/radio-group/button-normal-l-enabled/up/firefox-v30.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.2 KB
gemini/screens/radio-group/button-normal-l-icon-disabled/plain/chrome-v35.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.24 KB
gemini/screens/radio-group/button-normal-l-icon-disabled/plain/firefox-v30.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.49 KB
gemini/screens/radio-group/button-normal-l-icon-enabled/down/chrome-v35.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.54 KB
gemini/screens/radio-group/button-normal-l-icon-enabled/down/firefox-v30.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.49 KB
gemini/screens/radio-group/button-normal-l-icon-enabled/hovered/chrome-v35.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.53 KB
gemini/screens/radio-group/button-normal-l-icon-enabled/hovered/firefox-v30.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.49 KB
gemini/screens/radio-group/button-normal-l-icon-enabled/plain/chrome-v35.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.53 KB
gemini/screens/radio-group/button-normal-l-icon-enabled/plain/firefox-v30.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.49 KB
gemini/screens/radio-group/button-normal-l-icon-enabled/pressed/chrome-v35.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.54 KB
gemini/screens/radio-group/button-normal-l-icon-enabled/pressed/firefox-v30.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.26 KB
gemini/screens/radio-group/button-normal-l-icon-enabled/up/chrome-v35.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.78 KB
gemini/screens/radio-group/button-normal-l-icon-enabled/up/firefox-v30.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+743 Bytes
gemini/screens/radio-group/button-normal-m-disabled/plain/chrome-v35.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+740 Bytes
gemini/screens/radio-group/button-normal-m-disabled/plain/firefox-v30.png
Oops, something went wrong.
Binary file added
BIN
+1.13 KB
gemini/screens/radio-group/button-normal-m-enabled/down/chrome-v35.png
Oops, something went wrong.
Binary file added
BIN
+1.15 KB
gemini/screens/radio-group/button-normal-m-enabled/down/firefox-v30.png
Oops, something went wrong.
Binary file added
BIN
+1.12 KB
gemini/screens/radio-group/button-normal-m-enabled/hovered/chrome-v35.png
Oops, something went wrong.
Binary file added
BIN
+1.14 KB
gemini/screens/radio-group/button-normal-m-enabled/hovered/firefox-v30.png
Oops, something went wrong.
Binary file added
BIN
+1.12 KB
gemini/screens/radio-group/button-normal-m-enabled/plain/chrome-v35.png
Oops, something went wrong.
Binary file added
BIN
+1.14 KB
gemini/screens/radio-group/button-normal-m-enabled/plain/firefox-v30.png
Oops, something went wrong.
Binary file added
BIN
+1.13 KB
gemini/screens/radio-group/button-normal-m-enabled/pressed/chrome-v35.png
Oops, something went wrong.
Binary file added
BIN
+1.15 KB
gemini/screens/radio-group/button-normal-m-enabled/pressed/firefox-v30.png
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+2.32 KB
gemini/screens/radio-group/button-normal-m-enabled/up/firefox-v30.png
Oops, something went wrong.
Binary file added
BIN
+1.1 KB
gemini/screens/radio-group/button-normal-m-icon-disabled/plain/chrome-v35.png
Oops, something went wrong.
Binary file added
BIN
+1.1 KB
gemini/screens/radio-group/button-normal-m-icon-disabled/plain/firefox-v30.png
Oops, something went wrong.
Binary file added
BIN
+1.36 KB
gemini/screens/radio-group/button-normal-m-icon-enabled/down/chrome-v35.png
Oops, something went wrong.
Binary file added
BIN
+1.38 KB
gemini/screens/radio-group/button-normal-m-icon-enabled/down/firefox-v30.png
Oops, something went wrong.
Binary file added
BIN
+1.35 KB
gemini/screens/radio-group/button-normal-m-icon-enabled/hovered/chrome-v35.png
Oops, something went wrong.
Binary file added
BIN
+1.37 KB
gemini/screens/radio-group/button-normal-m-icon-enabled/hovered/firefox-v30.png
Oops, something went wrong.
Binary file added
BIN
+1.35 KB
gemini/screens/radio-group/button-normal-m-icon-enabled/plain/chrome-v35.png
Oops, something went wrong.
Binary file added
BIN
+1.37 KB
gemini/screens/radio-group/button-normal-m-icon-enabled/plain/firefox-v30.png
Oops, something went wrong.
Binary file added
BIN
+1.36 KB
gemini/screens/radio-group/button-normal-m-icon-enabled/pressed/chrome-v35.png
Oops, something went wrong.
Binary file added
BIN
+1.38 KB
gemini/screens/radio-group/button-normal-m-icon-enabled/pressed/firefox-v30.png
Oops, something went wrong.
Binary file added
BIN
+2.09 KB
gemini/screens/radio-group/button-normal-m-icon-enabled/up/chrome-v35.png
Oops, something went wrong.
Binary file added
BIN
+2.55 KB
gemini/screens/radio-group/button-normal-m-icon-enabled/up/firefox-v30.png
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+525 Bytes
gemini/screens/radio-group/line-normal-l-disabled/plain/chrome-v35.png
Oops, something went wrong.
Binary file added
BIN
+587 Bytes
gemini/screens/radio-group/line-normal-l-disabled/plain/firefox-v30.png
Oops, something went wrong.
Binary file added
BIN
+1.81 KB
gemini/screens/radio-group/line-normal-l-enabled/click/chrome-v35.png
Oops, something went wrong.
Binary file added
BIN
+2.46 KB
gemini/screens/radio-group/line-normal-l-enabled/click/firefox-v30.png
Oops, something went wrong.
Binary file added
BIN
+1.25 KB
gemini/screens/radio-group/line-normal-l-enabled/hovered/chrome-v35.png
Oops, something went wrong.
Binary file added
BIN
+1.7 KB
gemini/screens/radio-group/line-normal-l-enabled/hovered/firefox-v30.png
Oops, something went wrong.
Binary file added
BIN
+1.25 KB
gemini/screens/radio-group/line-normal-l-enabled/plain/chrome-v35.png
Oops, something went wrong.
Binary file added
BIN
+1.7 KB
gemini/screens/radio-group/line-normal-l-enabled/plain/firefox-v30.png
Oops, something went wrong.
Binary file added
BIN
+459 Bytes
gemini/screens/radio-group/line-normal-m-disabled/plain/chrome-v35.png
Oops, something went wrong.
Binary file added
BIN
+481 Bytes
gemini/screens/radio-group/line-normal-m-disabled/plain/firefox-v30.png
Oops, something went wrong.
Binary file added
BIN
+1.63 KB
gemini/screens/radio-group/line-normal-m-enabled/click/chrome-v35.png
Oops, something went wrong.
Binary file added
BIN
+1.97 KB
gemini/screens/radio-group/line-normal-m-enabled/click/firefox-v30.png
Oops, something went wrong.
Binary file added
BIN
+1.12 KB
gemini/screens/radio-group/line-normal-m-enabled/hovered/chrome-v35.png
Oops, something went wrong.
Binary file added
BIN
+1.29 KB
gemini/screens/radio-group/line-normal-m-enabled/hovered/firefox-v30.png
Oops, something went wrong.
Binary file added
BIN
+1.12 KB
gemini/screens/radio-group/line-normal-m-enabled/plain/chrome-v35.png
Oops, something went wrong.
Binary file added
BIN
+1.29 KB
gemini/screens/radio-group/line-normal-m-enabled/plain/firefox-v30.png
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.