Update acceptance test case to fix failing test

MAILPOET-6431
This commit is contained in:
Oluwaseun Olorunsola
2025-02-05 16:01:42 +01:00
committed by Oluwaseun Olorunsola
parent 5023bbb6f2
commit 2adc6d23ca
2 changed files with 4 additions and 2 deletions

View File

@@ -55,10 +55,11 @@ class CreateAndSendEmailUsingGutenbergCest {
$i->click('Save Draft'); $i->click('Save Draft');
$i->waitForText('Saved'); $i->waitForText('Saved');
$i->waitForText('Email saved!'); $i->waitForText('Email saved!');
$i->click('Send'); $i->click('[aria-label="Close sidebar"]'); // close the sidebar. It sometimes interferes with the send button click
$i->click('[data-automation-id="email_editor_send_button"]');
$i->waitForElement('[name="subject"]'); $i->waitForElement('[name="subject"]');
$subject = $i->grabValueFrom('[name="subject"]'); $subject = $i->grabValueFrom('[name="subject"]');
verify($subject)->equals('My New Subject'); verify($subject)->equals('My New Subject ');
$i->waitForText('My New Preview Text'); $i->waitForText('My New Preview Text');
$i->fillField('sender_name', 'John Doe'); $i->fillField('sender_name', 'John Doe');
$i->fillField('sender_address', 'john.doe@example.com'); $i->fillField('sender_address', 'john.doe@example.com');

View File

@@ -63,6 +63,7 @@ export function SendButton( { validateContent, isContentInvalid } ) {
} }
} } } }
disabled={ isDisabled } disabled={ isDisabled }
data-automation-id="email_editor_send_button"
> >
{ label } { label }
</Button> </Button>