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,7 +294,7 @@ const Property = React.createClass({
|
||||
},
|
||||
|
||||
getCheckbox() {
|
||||
const { checkboxLabel } = this.props;
|
||||
const { checkboxLabel, name } = this.props;
|
||||
|
||||
if (checkboxLabel) {
|
||||
return (
|
||||
@ -302,10 +302,10 @@ const Property = React.createClass({
|
||||
className="ascribe-property-collapsible-toggle"
|
||||
onClick={this.handleCheckboxToggle}>
|
||||
<input
|
||||
onChange={this.handleCheckboxToggle}
|
||||
type="checkbox"
|
||||
name={`${name}-checkbox`}
|
||||
checked={this.state.expanded}
|
||||
ref="checkboxCollapsible"/>
|
||||
onChange={this.handleCheckboxToggle}
|
||||
type="checkbox" />
|
||||
<span className="checkbox">{' ' + checkboxLabel}</span>
|
||||
</div>
|
||||
);
|
||||
|
@ -166,9 +166,15 @@ gemini.suite('Authenticated', (suite) => {
|
||||
gemini.suite('Register work', (registerSuite) => {
|
||||
registerSuite
|
||||
.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) => {
|
||||
// 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);
|
||||
})
|
||||
.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');
|
||||
})
|
||||
.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.sendKeys(find('.ascribe-form input[name="num_editions"]'), '50');
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user