Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit f1e142e

Browse files
committed
MAGETWO-87243: Unskip failing MFTF tests for WYSIWYG
- Create Block using meta-data instead of using GUI
1 parent 820cc6d commit f1e142e

File tree

3 files changed

+14
-20
lines changed

3 files changed

+14
-20
lines changed

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/ActionGroup/CMSActionGroup.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,16 @@
3232
</arguments>
3333
<amOnPage url="{{CmsBlocksPage.url}}" stepKey="navigateToCMSBlocksGrid"/>
3434
<waitForPageLoad stepKey="waitForPageLoad1"/>
35+
<conditionalClick selector="{{CmsPagesPageActionsSection.clearAll}}" dependentSelector="{{CmsPagesPageActionsSection.activeFilters}}" stepKey="clickToResetFilter" visible="true"/>
36+
<waitForPageLoad stepKey="waitForPageLoad2"/>
3537
<conditionalClick selector="{{BlockPageActionsSection.idColumn}}" dependentSelector="//span[contains(text(), 'ID')]/parent::th[not(contains(@class, '_descend'))]/parent::tr/parent::thead/parent::table/parent::div[contains(@data-role, 'grid-wrapper')]" stepKey="clickToAttemptSortByIdDescending" visible="true"/>
3638
<waitForLoadingMaskToDisappear stepKey="waitForFirstIdSortDescendingToFinish" />
3739
<!-- Conditional Click again in case it goes from default state to ascending on first click -->
3840
<conditionalClick selector="{{BlockPageActionsSection.idColumn}}" dependentSelector="//span[contains(text(), 'ID')]/parent::th[not(contains(@class, '_descend'))]/parent::tr/parent::thead/parent::table/parent::div[contains(@data-role, 'grid-wrapper')]" stepKey="secondClickToAttemptSortByIdDescending" visible="true"/>
3941
<waitForLoadingMaskToDisappear stepKey="waitForSecondIdSortDescendingToFinish" />
4042
<click selector="{{BlockPageActionsSection.select(CMSBlockPage.identifier)}}" stepKey="clickSelectCreatedCMSBlock" />
4143
<click selector="{{BlockPageActionsSection.edit(CMSBlockPage.identifier)}}" stepKey="navigateToCreatedCMSBlock" />
42-
<waitForPageLoad stepKey="waitForPageLoad2"/>
44+
<waitForPageLoad stepKey="waitForPageLoad3"/>
4345
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskOfStagingSection" />
4446
</actionGroup>
4547
<actionGroup name="searchBlockOnGridPage">

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Section/BlockPageActionsSection.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,8 @@
1515
<element name="idColumn" type="button" selector="//div[contains(@data-role, 'grid-wrapper')]/table/thead/tr/th/span[contains(text(), 'ID')]"/>
1616
<element name="clearAll" type="button" selector="//div[@class='admin__data-grid-header']//button[contains(text(), 'Clear all')]"/>
1717
<element name="activeFilters" type="button" selector="//div[@class='admin__data-grid-header']//span[contains(text(), 'Active filters:')]" />
18+
<element name="FilterBtn" type="input" selector="//button[text()='Filters']"/>
19+
<element name="URLKey" type="input" selector="//div[@class='admin__form-field-control']/input[@name='identifier']"/>
20+
<element name="ApplyFiltersBtn" type="button" selector="//span[text()='Apply Filters']"/>
1821
</section>
1922
</sections>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Test/AdminAddWidgetToWYSIWYGBlockCest.xml

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@
1919
</annotations>
2020
<before>
2121
<createData entity="_defaultCmsPage" stepKey="createCMSPage" />
22+
<createData entity="_defaultBlock" stepKey="createPreReqBlock" />
2223
<actionGroup ref="LoginActionGroup" stepKey="login"/>
2324
<actionGroup ref="EnabledWYSIWYG" stepKey="enableWYSIWYG"/>
2425
<actionGroup ref="SwitchToVersion4ActionGroup" stepKey="switchToTinyMCE4" />
2526
</before>
26-
<amOnPage url="{{CmsNewBlock.url}}" stepKey="amOnNewBlockPage"/>
27-
<waitForPageLoad stepKey="waitForPageLoad1"/>
28-
<fillField selector="{{BlockNewPageBasicFieldsSection.blockTitle}}" userInput="{{_defaultBlock.title}}" stepKey="fillFieldTitle"/>
29-
<fillField selector="{{BlockNewPageBasicFieldsSection.identifier}}" userInput="{{_defaultBlock.identifier}}" stepKey="fillFieldIdentifier"/>
27+
<actionGroup ref="navigateToCreatedCMSBlockPage" stepKey="navigateToCreatedCMSBlockPage">
28+
<argument name="CMSBlockPage" value="$$createPreReqBlock$$"/>
29+
</actionGroup>
3030
<selectOption selector="{{BlockNewPageBasicFieldsSection.storeView}}" userInput="All Store View" stepKey="selectAllStoreView" />
3131
<waitForElementVisible selector="{{TinyMCESection.TinyMCE4}}" stepKey="waitForTinyMCE" />
3232
<click selector="{{TinyMCESection.InsertWidgetIcon}}" stepKey="clickInsertWidgetIcon1" />
@@ -44,21 +44,9 @@
4444
<waitForLoadingMaskToDisappear stepKey="waitForLoading" />
4545
<waitForElementNotVisible selector="{{WidgetSection.InsertWidgetTitle}}" stepKey="waitForSlideOutCloses1" />
4646
<click selector="{{BlockNewPagePageActionsSection.saveBlock}}" stepKey="clickSaveBlock"/>
47-
<amOnPage url="{{CmsPagesPage.url}}" stepKey="amOnEditPage"/>
48-
<waitForPageLoad stepKey="waitForPageLoad3"/>
49-
<conditionalClick selector="{{CmsPagesPageActionsSection.clearAll}}" dependentSelector="{{CmsPagesPageActionsSection.activeFilters}}" stepKey="clickToResetFilter" visible="true"/>
50-
<waitForPageLoad stepKey="waitForGridReload"/>
51-
<click selector="{{CmsPagesPageActionsSection.FilterBtn}}" stepKey="clickFiltersBtn" />
52-
<fillField selector="{{CmsPagesPageActionsSection.URLKey}}" userInput="$$createCMSPage.identifier$$" stepKey="fillOutURLKey" />
53-
<click selector="{{CmsPagesPageActionsSection.ApplyFiltersBtn}}" stepKey="clickApplyBtn" />
54-
<waitForLoadingMaskToDisappear stepKey="waitForLoading1" />
55-
<actionGroup ref="SortByIdDescendingActionGroup" stepKey="sortByIdDescending" />
56-
<waitForElementVisible selector="{{CmsPagesPageActionsSection.select('$$createCMSPage.identifier$$')}}" stepKey="waitForCMSPageGrid" />
57-
<click selector="{{CmsPagesPageActionsSection.select('$$createCMSPage.identifier$$')}}" stepKey="clickSelect" />
58-
<waitForElementVisible selector="{{CmsPagesPageActionsSection.edit('$$createCMSPage.identifier$$')}}" stepKey="waitForEditLink" />
59-
<click selector="{{CmsPagesPageActionsSection.edit('$$createCMSPage.identifier$$')}}" stepKey="clickEdit" />
60-
<waitForPageLoad stepKey="waitForPageLoad4" />
61-
<click selector="{{CmsNewPagePageContentSection.header}}" stepKey="clickContentTab" />
47+
<actionGroup ref="navigateToCreatedCMSPage" stepKey="navigateToCreatedCMSPage">
48+
<argument name="CMSPage" value="$$createCMSPage$$"/>
49+
</actionGroup>
6250
<waitForElementVisible selector="{{TinyMCESection.TinyMCE4}}" stepKey="waitForTinyMCE4"/>
6351
<seeElement selector="{{TinyMCESection.InsertWidgetIcon}}" stepKey="seeWidgetIcon" />
6452
<click selector="{{TinyMCESection.InsertWidgetIcon}}" stepKey="clickInsertWidgetIcon2" />
@@ -87,6 +75,7 @@
8775
<conditionalClick selector="{{CmsPagesPageActionsSection.clearAll}}" dependentSelector="{{CmsPagesPageActionsSection.activeFilters}}" stepKey="clickToResetFilter" visible="true"/>
8876
<waitForPageLoad stepKey="waitForGridReload"/>
8977
<deleteData createDataKey="createCMSPage" stepKey="deletePreReqCMSPage" />
78+
<deleteData createDataKey="createPreReqBlock" stepKey="deletePreReqBlock" />
9079
<actionGroup ref="DisabledWYSIWYG" stepKey="disableWYSIWYG"/>
9180
<actionGroup ref="logout" stepKey="logout"/>
9281
</after>

0 commit comments

Comments
 (0)