mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 09:23:13 +01:00
Fix register work visual test
This commit is contained in:
parent
325651b581
commit
01b258334a
@ -294,18 +294,18 @@ const Property = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
getCheckbox() {
|
getCheckbox() {
|
||||||
const { checkboxLabel } = this.props;
|
const { checkboxLabel, name } = this.props;
|
||||||
|
|
||||||
if(checkboxLabel) {
|
if (checkboxLabel) {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className="ascribe-property-collapsible-toggle"
|
className="ascribe-property-collapsible-toggle"
|
||||||
onClick={this.handleCheckboxToggle}>
|
onClick={this.handleCheckboxToggle}>
|
||||||
<input
|
<input
|
||||||
onChange={this.handleCheckboxToggle}
|
name={`${name}-checkbox`}
|
||||||
type="checkbox"
|
|
||||||
checked={this.state.expanded}
|
checked={this.state.expanded}
|
||||||
ref="checkboxCollapsible"/>
|
onChange={this.handleCheckboxToggle}
|
||||||
|
type="checkbox" />
|
||||||
<span className="checkbox">{' ' + checkboxLabel}</span>
|
<span className="checkbox">{' ' + checkboxLabel}</span>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -166,9 +166,15 @@ gemini.suite('Authenticated', (suite) => {
|
|||||||
gemini.suite('Register work', (registerSuite) => {
|
gemini.suite('Register work', (registerSuite) => {
|
||||||
registerSuite
|
registerSuite
|
||||||
.setUrl('/register_piece')
|
.setUrl('/register_piece')
|
||||||
|
.before((actions, find) => {
|
||||||
|
// The editions options are only rendered after the whitelabel is fetched, so
|
||||||
|
// we have to wait for it here
|
||||||
|
// We have to check for the sibling checkbox class as the input itself is hidden
|
||||||
|
actions.waitForElementToShow('.ascribe-form input[name="num_editions-checkbox"] ~ .checkbox', TIMEOUTS.NORMAL);
|
||||||
|
})
|
||||||
.capture('register work', (actions, find) => {
|
.capture('register work', (actions, find) => {
|
||||||
// The uploader options are only rendered after the user is fetched, so
|
// The uploader options are only rendered after the user is fetched, so
|
||||||
// we have to wait for it here
|
// we also have to wait for it here
|
||||||
actions.waitForElementToShow('.file-drag-and-drop-dialog .present-options', TIMEOUTS.NORMAL);
|
actions.waitForElementToShow('.file-drag-and-drop-dialog .present-options', TIMEOUTS.NORMAL);
|
||||||
})
|
})
|
||||||
.capture('register work filled', (actions, find) => {
|
.capture('register work filled', (actions, find) => {
|
||||||
@ -177,7 +183,8 @@ gemini.suite('Authenticated', (suite) => {
|
|||||||
actions.sendKeys(find('.ascribe-form input[name="date_created"]'), 'date created');
|
actions.sendKeys(find('.ascribe-form input[name="date_created"]'), 'date created');
|
||||||
})
|
})
|
||||||
.capture('register work filled with editions', (actions, find) => {
|
.capture('register work filled with editions', (actions, find) => {
|
||||||
actions.click(find('.ascribe-form input[type="checkbox"] ~ .checkbox'));
|
actions.click(find('.ascribe-form input[name="num_editions-checkbox"] ~ .checkbox'));
|
||||||
|
// Wait for transition
|
||||||
actions.wait(500);
|
actions.wait(500);
|
||||||
actions.sendKeys(find('.ascribe-form input[name="num_editions"]'), '50');
|
actions.sendKeys(find('.ascribe-form input[name="num_editions"]'), '50');
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user