mirror of
https://github.com/status-im/consul.git
synced 2025-02-01 16:37:12 +00:00
73b6687c5b
* Add %panel CSS component * Deprecate old menu-panel component * Various smallish tweaks to disclosure-menu * Move all menus in the app chrome to use new DisclosureMenu * Follow up CSS to move all app chrome menus to new components * Don't prevent default any events from anchors * Add a tick to click steps
22 lines
674 B
JavaScript
22 lines
674 B
JavaScript
export default function(scenario, find, click) {
|
|
scenario
|
|
.when('I click "$selector"', function(selector) {
|
|
return click(selector);
|
|
})
|
|
// TODO: Probably nicer to think of better vocab than having the 'without " rule'
|
|
.when(
|
|
[
|
|
'I click (?!")$property(?!")',
|
|
'I click $property on the $component',
|
|
'I click $property on the $component component',
|
|
],
|
|
async function(property, component, next) {
|
|
if (typeof component === 'string') {
|
|
property = `${component}.${property}`;
|
|
}
|
|
await new Promise(resolve => setTimeout(resolve, 0));
|
|
return find(property)();
|
|
}
|
|
);
|
|
}
|