Update email editor acceptance test

MAILPOET-6331
This commit is contained in:
Oluwaseun Olorunsola
2024-12-04 17:20:56 +01:00
committed by Oluwaseun Olorunsola
parent 8b1f7c9a88
commit fbf4272e0e
2 changed files with 22 additions and 19 deletions

View File

@@ -147,6 +147,8 @@ class CreateAndSendEmailUsingGutenbergCest {
private function closeTemplateSelectionModal(\AcceptanceTester $i): void {
$i->wantTo('Close template selector');
$i->waitForElementClickable('.email-editor-start_from_scratch_button');
$i->click('[aria-label="Basic"]');
$i->waitForElementVisible('.block-editor-block-preview__container');
$i->click('[aria-label="Close"]');
}

View File

@@ -41,7 +41,7 @@ export function SelectTemplateModal( {
onSelectCallback,
closeCallback = null,
previewContent = '',
} ) {
} ) {
const [ templates ] = usePreviewTemplates( previewContent );
const hasTemplates = templates?.length > 0;
@@ -101,6 +101,7 @@ export function SelectTemplateModal( {
<FlexItem>
<Button
variant="tertiary"
className="email-editor-start_from_scratch_button"
onClick={ () => handleCloseWithoutSelection() }
isBusy={ ! hasTemplates }
>