From ee6c9c0a21ed98d4fc827b11f13dbea11a6e27f9 Mon Sep 17 00:00:00 2001 From: Veljko V Date: Thu, 26 Nov 2020 16:37:58 +0100 Subject: [PATCH] Update scenario to include heading and paragraph [MAILPOET-3328] [MAILPOET-3328](https://mailpoet.atlassian.net/browse/MAILPOET-3328) --- .../acceptance/FormEditorTextInputStylesCest.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/acceptance/FormEditorTextInputStylesCest.php b/tests/acceptance/FormEditorTextInputStylesCest.php index b0fa8eef3f..62da2250b8 100644 --- a/tests/acceptance/FormEditorTextInputStylesCest.php +++ b/tests/acceptance/FormEditorTextInputStylesCest.php @@ -35,12 +35,24 @@ class FormEditorTextInputStylesCest { // Check element has styles $i->assertAttributeContains('[data-automation-id="editor_first_name_input"]', 'style', 'border-width: 10px;'); $i->assertAttributeContains('[data-automation-id="editor_first_name_label"]', 'style', 'font-weight: bold;'); + // Apply to all $i->click('[data-automation-id="styles_apply_to_all"]'); - // Check email block has styles too + + // Add heading block and write some title + $i->addFromBlockInEditor('Heading'); + $i->fillField('[data-title="Heading"]', 'Lorem Ipsum'); + $i->see('Lorem Ipsum'); + + // Add paragraph block and write some text + $i->addFromBlockInEditor('Paragraph'); + $i->fillField('[data-title="Paragraph"]', 'Lorem ipsum dolor sit amet'); + $i->see('Lorem ipsum dolor sit amet'); + + // Check email block has styles too and save the form $i->assertAttributeContains('[data-automation-id="editor_first_name_input"]', 'style', 'border-width: 10px;'); - // Save form $i->saveFormInEditor(); + // Reload page and check data were saved $i->reloadPage(); $i->waitForElement('[data-automation-id="form_title_input"]');