Update and fix failing tests
MAILPOET-6323
This commit is contained in:
committed by
Oluwaseun Olorunsola
parent
bd266ed403
commit
f20237ab1c
@ -115,11 +115,11 @@ class CreateAndSendEmailUsingGutenbergCest {
|
|||||||
// this issue is not confirmed to be real issue but only on the acceptance test site
|
// this issue is not confirmed to be real issue but only on the acceptance test site
|
||||||
$i->click('div.interface-pinned-items > button'); // close sidebar
|
$i->click('div.interface-pinned-items > button'); // close sidebar
|
||||||
$i->click('.mailpoet-preview-dropdown button[aria-label="Preview"]');
|
$i->click('.mailpoet-preview-dropdown button[aria-label="Preview"]');
|
||||||
$i->waitForElementVisible('//button[text()="Preview in new tab"]');
|
$i->waitForElementVisible('//a[text()="Preview in new tab"]');
|
||||||
$i->waitForElementClickable('//button[text()="Preview in new tab"]');
|
$i->waitForElementClickable('//a[text()="Preview in new tab"]');
|
||||||
$i->click('//button[text()="Preview in new tab"]');
|
$i->click('//a[text()="Preview in new tab"]');
|
||||||
$i->switchToNextTab();
|
$i->switchToNextTab();
|
||||||
$i->canSeeInCurrentUrl('endpoint=view_in_browser');
|
$i->canSeeInCurrentUrl('post_type=mailpoet_email');
|
||||||
$i->canSee('Sample text');
|
$i->canSee('Sample text');
|
||||||
$i->closeTab();
|
$i->closeTab();
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ declare module '@wordpress/editor' {
|
|||||||
export const PostPreviewButton: ComponentType<
|
export const PostPreviewButton: ComponentType<
|
||||||
WPPostPreviewButton.Props & {
|
WPPostPreviewButton.Props & {
|
||||||
className?: string;
|
className?: string;
|
||||||
role: string;
|
role?: string;
|
||||||
textContent: JSX.Element;
|
textContent: JSX.Element;
|
||||||
onPreview: () => void;
|
onPreview: () => void;
|
||||||
}
|
}
|
||||||
|
@ -288,7 +288,7 @@ class Email_Editor {
|
|||||||
|
|
||||||
add_filter(
|
add_filter(
|
||||||
'mailpoet_email_editor_preview_post_template_html',
|
'mailpoet_email_editor_preview_post_template_html',
|
||||||
function ( $post ) {
|
function () use ( $post ) {
|
||||||
// Generate HTML content for email editor post.
|
// Generate HTML content for email editor post.
|
||||||
return $this->send_preview_email->render_html( $post );
|
return $this->send_preview_email->render_html( $post );
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user