Skip to content

Commit

Permalink
Update tests & pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Angelina Konstantinova committed May 24, 2016
1 parent 1cc3fb6 commit 7764dac
Show file tree
Hide file tree
Showing 27 changed files with 81 additions and 53 deletions.
7 changes: 7 additions & 0 deletions common.blocks/button/button.tests/gemini.bemjson.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@
mods : { theme : 'islands', size : 'm', view : 'action', disabled : true },
text : 'action',
cls : 'gemini-test-button-action-disabled'
},
'   |   ',
{
block : 'button',
mods : { theme : 'islands', size : 'm', togglable : 'radio', disabled : true, checked : true },
text : 'radio disabled checked',
cls : 'gemini-test-button-radio-checked-disabled'
}
] },

Expand Down
12 changes: 12 additions & 0 deletions common.blocks/button/button.tests/simple.bemjson.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,18 @@
text : 'radio'
},
' ',
{
block : 'button',
mods : { theme : 'islands', size : 'm', togglable : 'radio', disabled : true },
text : ' radio disabled'
},
' ',
{
block : 'button',
mods : { theme : 'islands', size : 'm', togglable : 'radio', disabled : true, checked : true },
text : 'radio disabled checked'
},
' ',
{
block : 'button',
mods : { theme : 'islands', size : 'm', togglable : 'check', view : 'pseudo' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
content : [
{ tag : 'h3', content : 'search form' },
{ tag : 'p', content : {
{ block : 'test', content : {
block : 'control-group',
content : [
{
Expand All @@ -34,7 +34,7 @@
} },

{ tag : 'h3', content : 'multiple form' },
{ tag : 'p', content : {
{ block : 'test', content : {
block : 'control-group',
content : [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.test
{
display:inline-block;
}
13 changes: 8 additions & 5 deletions common.blocks/link/link.tests/gemini.bemjson.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,25 @@
{ elem : 'css', url : 'gemini.css' },
{ elem : 'js', url : 'gemini.js' }
],
content : ['islands'].map(function(theme, i) {
content : ['islands'].map(function(theme) {
var content = [
{ block : 'link', content : 'with no url', cls : theme + '-no-url' },
{ block : 'link', url : '#', content : 'plain url', cls : theme + '-url' },
{ block : 'link', mods : { pseudo : true }, content : 'pseudo link', cls : theme + '-pseudo' }
{ block : 'link', mods : { pseudo : true }, content : 'pseudo link', cls : theme + '-pseudo' },
{ block : 'link', mods : { view : 'minor' }, url : '#', content : '_view_minor' },
{ block : 'link', mods : { view : 'external' }, url : '#', content : '_view_external' },
{ block : 'link', mods : { view : 'ghost' }, url : '#', content : '_view_ghost' },
{ block : 'link', mods : { view : 'text' }, url : '#', content : '_view_text' },
{ block : 'link', mods : { view : 'strong' }, url : '#', content : '_view_strong' }
].map(function(link, j) {
link.mods || (link.mods = {});
i && (link.mods.theme = theme);
(link.mods || (link.mods = {})).theme = theme;
return [
j > 0 && { block : 'separator' },
link
]
});

content.unshift({ tag : 'h2', content : theme });
i && content.unshift({ tag : 'hr' });

return content;
})
Expand Down
3 changes: 3 additions & 0 deletions common.blocks/link/link.tests/simple.bemjson.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
{ block : 'link', url : 'http://example.com/', content : 'plain url' },
{ block : 'link', mods : { view : 'minor' }, url : 'http://example.com/help/', content : 'minor' },
{ block : 'link', mods : { view : 'external' }, url : 'http://www.w3.org/', content : 'external' },
{ block : 'link', mods : { view : 'ghost' }, url : 'http://example.com/', content : 'ghost' },
{ block : 'link', mods : { view : 'text' }, url : 'http://example.com/', content : 'text' },
{ block : 'link', mods : { view : 'strong' }, url : 'http://example.com/', content : 'strong' },
{
block : 'link',
mods : { disabled : true },
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
.test
{
display: inline-block;

width: 20%;
width: 220px;
padding: 0 40px 150px 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ module.exports = {
head : [{ elem : 'css', url : '../../dist/desktop/desktop.css' }],
scripts : [{ elem : 'js', url : '../../dist/desktop/desktop.browser.js' }],
content : [
{
block: 'link',
mods: { theme: 'islands', size: 's' },
content: 'link'
},

[
{
block : 'button',
Expand Down
2 changes: 0 additions & 2 deletions gemini/attach.gemini.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
var gemini = require('gemini');

gemini.suite('attach', function(root) {
root.setUrl('desktop.tests/attach/gemini/gemini.html');
[
Expand Down
35 changes: 30 additions & 5 deletions gemini/button.gemini.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,31 @@
var gemini = require('gemini');

gemini.suite('button', function(root) {

root.setUrl('desktop.tests/button/gemini/gemini.html');

[
'islands',
'plain',
'pseudo',
'islands-link',
'islands-icon'
]
.forEach(function(test) {
var buttonSelector = '.gemini-test-button-' + test,
buttonEnabledSelector = buttonSelector + '-enabled';

// tests for enabled focused button, excluding button_view_action
gemini.suite(test + '-focused', function(suite) {
suite
.setCaptureElements(buttonEnabledSelector)
.before(function(actions, find) {
this.button = find(buttonEnabledSelector);
})
.capture('focused-hard', function(actions) {
actions.focus(this.button);
});
});
});

[
'islands',
'plain',
Expand All @@ -28,9 +50,6 @@ gemini.suite('button', function(root) {
.capture('hovered', function(actions) {
actions.mouseMove(this.button);
})
.capture('focused-hard', function(actions) {
actions.focus(this.button);
})
.capture('pressed', function(actions) {
actions.mouseDown(this.button);
})
Expand All @@ -47,6 +66,12 @@ gemini.suite('button', function(root) {
});
});

gemini.suite('radio-checked-disabled', function(suite) {
suite
.setCaptureElements('.gemini-test-button-radio-checked-disabled')
.capture('plain');
});

[
'islands',
'plain'
Expand Down
2 changes: 0 additions & 2 deletions gemini/checkbox-group.gemini.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
var gemini = require('gemini');

gemini.suite('checkbox-group', function(root) {

root.setUrl('desktop.tests/checkbox-group/gemini/gemini.html');
Expand Down
2 changes: 0 additions & 2 deletions gemini/checkbox.gemini.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
var gemini = require('gemini');

gemini.suite('checkbox', function(root) {

root.setUrl('desktop.tests/checkbox/gemini/gemini.html');
Expand Down
2 changes: 0 additions & 2 deletions gemini/control-group.gemini.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
var gemini = require('gemini');

gemini.suite('control-group', function(root) {
root.setUrl('desktop.tests/control-group/gemini/gemini.html');

Expand Down
2 changes: 0 additions & 2 deletions gemini/dropdown.gemini.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
var gemini = require('gemini');

gemini.suite('dropdown', function(root) {

root.setUrl('desktop.tests/dropdown/gemini/gemini.html');
Expand Down
2 changes: 0 additions & 2 deletions gemini/icon.gemini.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
var gemini = require('gemini');

gemini.suite('icon', function(root) {

root.setUrl('desktop.tests/icon/gemini/gemini.html');
Expand Down
2 changes: 0 additions & 2 deletions gemini/image.gemini.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
var gemini = require('gemini');

gemini.suite('image', function(root) {

root.setUrl('desktop.tests/image/gemini/gemini.html');
Expand Down
2 changes: 0 additions & 2 deletions gemini/input.gemini.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
var gemini = require('gemini');

gemini.suite('input', function(root) {

root.setUrl('desktop.tests/input/gemini/gemini.html');
Expand Down
11 changes: 7 additions & 4 deletions gemini/link.gemini.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
var gemini = require('gemini');

gemini.suite('link', function(root) {

root.setUrl('desktop.tests/link/gemini/gemini.html');

[
'islands-no-url',
'islands-url',
'islands-pseudo'
'islands-pseudo',

'link_view_minor',
'link_view_external',
'link_view_ghost',
'link_view_text',
'link_view_strong'
]
.forEach(function(test) {
var linkSelector = '.' + test;
Expand Down Expand Up @@ -35,5 +39,4 @@ gemini.suite('link', function(root) {
});
});
});

});
2 changes: 0 additions & 2 deletions gemini/menu.gemini.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
var gemini = require('gemini');

gemini.suite('menu', function(root) {

root.setUrl('desktop.tests/menu/gemini/gemini.html');
Expand Down
2 changes: 0 additions & 2 deletions gemini/modal.gemini.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
var gemini = require('gemini');

gemini.suite('modal', function(root) {

root.setUrl('desktop.tests/modal/gemini/gemini.html');
Expand Down
2 changes: 0 additions & 2 deletions gemini/popup.gemini.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
var gemini = require('gemini');

gemini.suite('popup', function(root) {

root.setUrl('desktop.tests/popup/gemini/gemini.html');
Expand Down
2 changes: 0 additions & 2 deletions gemini/progressbar.gemini.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
var gemini = require('gemini');

gemini.suite('progressbar', function(root) {

root.setUrl('desktop.tests/progressbar/gemini/gemini.html');
Expand Down
2 changes: 0 additions & 2 deletions gemini/radio-group.gemini.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
var gemini = require('gemini');

gemini.suite('radio-group', function(root) {

root.setUrl('desktop.tests/radio-group/gemini/gemini.html');
Expand Down
3 changes: 1 addition & 2 deletions gemini/select.gemini.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
var gemini = require('gemini'),
animationTime = 300;
var animationTime = 300;

gemini.suite('select', function(root) {

Expand Down
2 changes: 0 additions & 2 deletions gemini/spin.gemini.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
var gemini = require('gemini');

gemini.suite('spin', function(root) {

root.setUrl('desktop.tests/spin/gemini/gemini.html');
Expand Down
2 changes: 0 additions & 2 deletions gemini/textarea.gemini.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
var gemini = require('gemini');

gemini.suite('textarea', function(root) {

root.setUrl('desktop.tests/textarea/gemini/gemini.html');
Expand Down
2 changes: 0 additions & 2 deletions test/dist/dist.gemini.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
var gemini = require('gemini');

gemini.suite('dist', function(root) {

root
Expand Down

0 comments on commit 7764dac

Please sign in to comment.