Add more robust check for send form presence to acceptance tests [MQ-29]

There is a short delay between rendering of a heading and the form fields.
It is safer to wait for form itself before manipulating it.
This commit is contained in:
Rostislav Wolny
2018-07-17 14:08:15 +02:00
parent 9b19858734
commit 33149d041c
5 changed files with 8 additions and 3 deletions

View File

@@ -216,6 +216,7 @@ const Form = React.createClass({
? this.props.onSubmit
: this.handleSubmit
}
data-automation-id={this.props.automationId}
>
{ errors }

View File

@@ -349,6 +349,7 @@ const NewsletterSend = React.createClass({
<Form
id="mailpoet_newsletter"
fields={fields}
automationId="newsletter_send_form"
item={this.state.item}
loading={this.state.loading}
onChange={this.handleFormChange}