Skip to content

Commit

Permalink
Merge branch 'master' into input-1272
Browse files Browse the repository at this point in the history
  • Loading branch information
zhzz authored Mar 26, 2019
2 parents 4987f03 + d545f4c commit f664b7f
Show file tree
Hide file tree
Showing 308 changed files with 6,784 additions and 90,964 deletions.
8 changes: 8 additions & 0 deletions packages/react-ui-screenshot-tests/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.1.5](https://github.com/skbkontur/retail-ui/compare/[email protected]@1.1.5) (2019-03-26)

**Note:** Version bump only for package react-ui-screenshot-tests





## [1.1.4](https://github.com/skbkontur/retail-ui/compare/[email protected]@1.1.4) (2019-03-19)

**Note:** Version bump only for package react-ui-screenshot-tests
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
214 changes: 115 additions & 99 deletions packages/react-ui-screenshot-tests/gemini/tooltip.js
Original file line number Diff line number Diff line change
@@ -1,116 +1,132 @@
/* global gemini */
var renderStory = require('./utils').renderStory;

gemini.suite('Tooltip', suite => {
suite
.before(renderStory('Tooltip', 'static tooltip'))
.setCaptureElements('#test-element')
.capture('simple');
});
gemini.suite('Tooltip', () => {
gemini.suite('static', suite => {
suite
.before(renderStory('Tooltip', 'static tooltip'))
.setCaptureElements('#test-element')
.capture('simple');
});

gemini.suite('Tooltip left', suite => {
suite
.before(renderStory('Tooltip', 'tooltip left'))
.setCaptureElements('#test-element')
.capture('plain');
});
gemini.suite('left', suite => {
suite
.before(renderStory('Tooltip', 'tooltip left'))
.setCaptureElements('#test-element')
.capture('plain');
});

gemini.suite('Tooltip right', suite => {
suite
.before(renderStory('Tooltip', 'tooltip right'))
.setCaptureElements('#test-element')
.capture('plain');
});
gemini.suite('right', suite => {
suite
.before(renderStory('Tooltip', 'tooltip right'))
.setCaptureElements('#test-element')
.capture('plain');
});

gemini.suite('Tooltip bottom', suite => {
suite
.before(renderStory('Tooltip', 'tooltip bottom'))
.setCaptureElements('#test-element')
.capture('plain');
});
gemini.suite('bottom', suite => {
suite
.before(renderStory('Tooltip', 'tooltip bottom'))
.setCaptureElements('#test-element')
.capture('plain');
});

gemini.suite('Tooltip wrap inline-block', suite => {
suite
.before(renderStory('Tooltip', 'Tooltips without wrapper around inline-block with 50% width'))
.setCaptureElements('#test-element')
.capture('hover', (actions, find) => {
actions.mouseMove(find('textarea'));
});
});
gemini.suite('wrap inline-block', suite => {
suite
.before(renderStory('Tooltip', 'Tooltips without wrapper around inline-block with 50% width'))
.setCaptureElements('#test-element')
.capture('hover', (actions, find) => {
actions.mouseMove(find('textarea'));
});
});

gemini.suite('Opened tooltip without wrapper', suite => {
suite
.before(renderStory('Tooltip', 'Opened tooltip without wrapper'))
.setCaptureElements('#test-element')
.capture('plain');
});
gemini.suite('Opened without wrapper', suite => {
suite
.before(renderStory('Tooltip', 'Opened tooltip without wrapper'))
.setCaptureElements('#test-element')
.capture('plain');
});

gemini.suite('Opened tooltip by focus (Button)', suite => {
suite
.before(renderStory('Tooltip', 'focus tooltip'))
.setCaptureElements('#test-element')
.capture('01 - plain')
.capture('02 - focus', actions => {
actions.sendKeys(gemini.TAB);
})
.capture('03 - blur', (actions, find) => {
actions.sendKeys(find('button'), gemini.TAB);
})
.skip.in('firefox', 'в firefox завезли поддержку focusin/focusout только с 52ой версии');
});
gemini.suite('Opened by focus (Button)', suite => {
suite
.before(renderStory('Tooltip', 'focus tooltip'))
.setCaptureElements('#test-element')
.capture('01 - plain')
.capture('02 - focus', actions => {
actions.sendKeys(gemini.TAB);
})
.capture('03 - blur', (actions, find) => {
actions.sendKeys(find('button'), gemini.TAB);
})
.skip.in('firefox', 'в firefox завезли поддержку focusin/focusout только с 52ой версии');
});

gemini.suite('Opened tooltip by focus (input)', suite => {
suite
.before(renderStory('Tooltip', 'focus tooltip (native input)'))
.setCaptureElements('#test-element')
.capture('01 - plain')
.capture('02 - focus', (actions, find) => {
actions.focus(find('input'));
})
.capture('03 - blur', (actions, find) => {
actions.sendKeys(find('input'), gemini.TAB);
})
.skip.in('firefox', 'в firefox завезли поддержку focusin/focusout только с 52ой версии');
});
gemini.suite('Opened by focus (input)', suite => {
suite
.before(renderStory('Tooltip', 'focus tooltip (native input)'))
.setCaptureElements('#test-element')
.capture('01 - plain')
.capture('02 - focus', (actions, find) => {
actions.focus(find('input'));
})
.capture('03 - blur', (actions, find) => {
actions.sendKeys(find('input'), gemini.TAB);
})
.skip.in('firefox', 'в firefox завезли поддержку focusin/focusout только с 52ой версии');
});

gemini.suite('with external dynamic content', suite => {
suite
.before(renderStory('Tooltip', 'Tooltip with external dynamic content'))
.setCaptureElements('#test-element')
.capture('01 - plain')

gemini.suite('Tooltip with external dynamic content', suite => {
suite
.before(renderStory('Tooltip', 'Tooltip with external dynamic content'))
.setCaptureElements('#test-element')
.capture('01 - plain')
.capture('02 - changes top position if does not fit', (actions, find) => {
actions.click(find('#Container-0 button'));
})
.capture('03 - does not change position back on shrink', (actions, find) => {
actions.click(find('#Container-0 button'));
})

.capture('02 - changes top position if does not fit', (actions, find) => {
actions.click(find('#Container-0 button'));
})
.capture('03 - does not change position back on shrink', (actions, find) => {
actions.click(find('#Container-0 button'));
})
.capture('04 - does not change top position if fits', (actions, find) => {
actions.click(find('#Container-1 button'));
})
.capture('05 - does not change position on shrink', (actions, find) => {
actions.click(find('#Container-1 button'));
})

.capture('04 - does not change top position if fits', (actions, find) => {
actions.click(find('#Container-1 button'));
})
.capture('05 - does not change position on shrink', (actions, find) => {
actions.click(find('#Container-1 button'));
})
.capture('06 - changes left position if does not fit', (actions, find) => {
actions.click(find('#Container-2 button'));
})
.capture('07 - does not change position back on shrink', (actions, find) => {
actions.click(find('#Container-2 button'));
})

.capture('06 - changes left position if does not fit', (actions, find) => {
actions.click(find('#Container-2 button'));
})
.capture('07 - does not change position back on shrink', (actions, find) => {
actions.click(find('#Container-2 button'));
})
.capture('08 - does not change bottom position if fits', (actions, find) => {
actions.click(find('#Container-3 button'));
})
.capture('09 - does not change position on shrink', (actions, find) => {
actions.click(find('#Container-3 button'));
})

.capture('08 - does not change bottom position if fits', (actions, find) => {
actions.click(find('#Container-3 button'));
})
.capture('09 - does not change position on shrink', (actions, find) => {
actions.click(find('#Container-3 button'));
})
.capture('10 - does not change bottom position if does not fit', (actions, find) => {
actions.click(find('#Container-4 button'));
})
.capture('11 - does not change position on shrink', (actions, find) => {
actions.click(find('#Container-4 button'));
});
});
gemini.suite('with Input and switchable content', suite => {
suite
.before(renderStory('Tooltip', 'Tooltip with Input and switchable content'))
.setCaptureElements('#test-element')
.capture('focus and types', (actions, find) => {
const input = find('input');

.capture('10 - does not change bottom position if does not fit', (actions, find) => {
actions.click(find('#Container-4 button'));
})
.capture('11 - does not change position on shrink', (actions, find) => {
actions.click(find('#Container-4 button'));
});
actions.click(input);
actions.sendKeys(input, 'Hi');
})
.capture('clear input', (actions, find) => {
actions.sendKeys(find('input'), [gemini.BACK_SPACE, gemini.BACK_SPACE]);
});
});
});
2 changes: 1 addition & 1 deletion packages/react-ui-screenshot-tests/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-ui-screenshot-tests",
"version": "1.1.4",
"version": "1.1.5",
"main": "index.js",
"license": "MIT",
"private": true,
Expand Down
26 changes: 1 addition & 25 deletions packages/react-ui-validations/.babelrc
Original file line number Diff line number Diff line change
@@ -1,27 +1,3 @@
{
"presets": [["es2015", { "loose": true, "modules": false }], "stage-0", "react"],
"env": {
"storybook": {
"presets": [["es2015", { "loose": true }], "stage-0", "react"],
"plugins": [
[
"transform-define",
{
"REACT_UI_PACKAGE": "retail-ui"
}
]
]
},
"production": {
"presets": [["es2015", { "loose": true }], "stage-0", "react"],
"plugins": [
[
"transform-define",
{
"REACT_UI_PACKAGE": "retail-ui"
}
]
]
}
}
"presets": ["es2015", "stage-0", "react"]
}
13 changes: 0 additions & 13 deletions packages/react-ui-validations/.editorconfig

This file was deleted.

43 changes: 0 additions & 43 deletions packages/react-ui-validations/.eslint-config/config.js

This file was deleted.

Loading

0 comments on commit f664b7f

Please sign in to comment.