|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | + /** |
| 4 | + * Copyright © Magento, Inc. All rights reserved. |
| 5 | + * See COPYING.txt for license details. |
| 6 | + */ |
| 7 | +--> |
| 8 | + |
| 9 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 10 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 11 | + <test name="CheckDisplayingOfApostrophesInTheTextFieldBoxWhileCreatingPageWidgetTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Widget"/> |
| 14 | + <stories value="Checking displaying of apostrophes (') in the text field box while creating page widget"/> |
| 15 | + <title value="Checking displaying of apostrophes (') in the text field box while creating page widget"/> |
| 16 | + <description value="Checking displaying of apostrophes (') in the text field box while creating page widget"/> |
| 17 | + <severity value="MAJOR"/> |
| 18 | + <testCaseId value="AC-4389"/> |
| 19 | + <group value="widget"/> |
| 20 | + </annotations> |
| 21 | + <before> |
| 22 | + <!-- Pre-condition 1- Login as Admin --> |
| 23 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 24 | + |
| 25 | + <!-- Pre-condition - Disable the page builder --> |
| 26 | +<!-- <magentoCLI command="config:set cms/pagebuilder/enabled 0" stepKey="disablePageBuilder" after="enableTinyMCE"/>--> |
| 27 | +<!-- <magentoCLI command="cache:clean config" stepKey="flushCache" after="disablePageBuilder"/>--> |
| 28 | + |
| 29 | + <!-- Pre-condition 2- Create a New Page --> |
| 30 | +<!-- <actionGroup ref="AdminOpenCreateNewCMSPageActionGroup" stepKey="navigateToCreateNewPage"/>--> |
| 31 | +<!-- <actionGroup ref="FillOutCMSPageContent" stepKey="fillBasicPageData"/>--> |
| 32 | +<!-- <actionGroup ref="SaveCmsPageActionGroup" stepKey="saveNewPage"/>--> |
| 33 | + |
| 34 | + <!-- Pre-condition 3- Verify page in grid--> |
| 35 | + <actionGroup ref="AdminOpenCMSPagesGridActionGroup" stepKey="openCMSPagesGridActionGroup"/> |
| 36 | + <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearGridFilters"/> |
| 37 | + <actionGroup ref="SortByIdDescendingActionGroup" stepKey="sortGridByIdDescending"/> |
| 38 | + <click selector="{{CmsPagesPageActionsSection.select('home')}}" stepKey="clickSelectCMSPage" /> |
| 39 | + |
| 40 | + <!-- Pre-condition 4- Update the page in grid--> |
| 41 | + <click selector="{{CmsPagesPageActionsSection.edit('home')}}" stepKey="OpenThePageToBeEdited"/> |
| 42 | + <waitForPageLoad stepKey="waitForPageLoadPostSelectingHomePage"/> |
| 43 | + <waitForElementVisible selector="{{CmsNewPagePageContentSection.header}}" stepKey="waitForContentTabForPageToBeVisible"/> |
| 44 | + |
| 45 | + <!-- Pre-condition 5- Expand the Content section > Insert Widget --> |
| 46 | + <click selector="{{CmsNewPagePageContentSection.header}}" stepKey="clickExpandContentTabForPage"/> |
| 47 | + <waitForElementVisible selector="{{CmsNewPagePageActionsSection.insertWidget}}" stepKey="waitForTheInsertWidgetButtonToDisplay"/> |
| 48 | + <actionGroup ref="AdminInsertWidgetToCmsPageContentActionGroup" stepKey="selectCMSpageLinkFromDropdown"/> |
| 49 | + <waitForPageLoad stepKey="waitForPageLoadPostSelectingFromDropDown"/> |
| 50 | + |
| 51 | + <!-- Pre-condition 6 - 11 - Update the Anchor Custom Text --> |
| 52 | + <fillField selector="{{WidgetSection.InputAnchorCustomText}}" userInput="Custom texts' for tests" stepKey="InputValuesWithApostrophe"/> |
| 53 | + <click selector="{{WidgetSection.SelectPageButton}}" stepKey="clickOnSelectPageButton"/> |
| 54 | + <waitForElementVisible selector="{{WidgetSection.url_key_selectPage}}" stepKey="waitForSelectPageDialogToPopulate"/> |
| 55 | + <fillField selector="{{WidgetSection.url_key_selectPage}}" userInput="home" stepKey="EnterThePageURL"/> |
| 56 | + <click selector="{{WidgetSection.SearchButton_selectPage}}" stepKey="clickOnSearchButton"/> |
| 57 | + <waitForPageLoad stepKey="waitForResultsToBeDisplayed"/> |
| 58 | + <click selector="{{WidgetSection.search_result_selectPage('home')}}" stepKey="clickOnDisplayedResult"/> |
| 59 | + <click selector="{{WidgetSection.InsertWidget}}" stepKey="clickOnInsertWidget"/> |
| 60 | + <waitForElementVisible selector="{{CmsNewPagePageActionsSection.savePageBtn}}" stepKey="waitForInsertWidgetDialogToDisappear" time="5"/> |
| 61 | + <click selector="{{CmsNewPagePageActionsSection.savePageBtn}}" stepKey="clickSavePage"/> |
| 62 | + <waitForElementVisible selector="{{CmsPagesPageActionsSection.savePageSuccessMessage}}" stepKey="waitForSuccessMessageLoggedOut" time="5"/> |
| 63 | + <see userInput="You saved the page." stepKey="seeSuccessMessage"/> |
| 64 | + |
| 65 | + </before> |
| 66 | + <after> |
| 67 | + <actionGroup ref="AdminOpenCMSPagesGridActionGroup" stepKey="openCMSPagesGridActionGroupToReset"/> |
| 68 | + <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearGridFiltersToReset"/> |
| 69 | + <actionGroup ref="SortByIdDescendingActionGroup" stepKey="sortGridByIdDescendingToReset"/> |
| 70 | + <click selector="{{CmsPagesPageActionsSection.select('home')}}" stepKey="clickSelectCMSPageToReset" /> |
| 71 | + |
| 72 | + <!-- Pre-condition 4- Update the page in grid To Reset--> |
| 73 | + <click selector="{{CmsPagesPageActionsSection.edit('home')}}" stepKey="OpenThePageToBeEditedToReset"/> |
| 74 | + <waitForPageLoad stepKey="waitForPageLoadPostSelectingHomePageToReset"/> |
| 75 | + <waitForElementVisible selector="{{CmsNewPagePageContentSection.header}}" stepKey="waitForContentTabForPageToBeVisibleToReset"/> |
| 76 | + |
| 77 | + <!-- Pre-condition 5- Expand the Content section > Insert Widget To Reset --> |
| 78 | + <click selector="{{CmsNewPagePageContentSection.header}}" stepKey="clickExpandContentTabForPageToReset"/> |
| 79 | + <waitForElementVisible selector="{{CmsNewPagePageActionsSection.insertWidget}}" stepKey="waitForTheInsertWidgetButtonToDisplayToReset"/> |
| 80 | + <clearField selector="{{CmsNewPagePageContentSection.content}}" stepKey="clearWidgetTextFieldToReset"/> |
| 81 | + <fillField selector="{{CmsNewPagePageContentSection.content}}" userInput="<p>CMS homepage content goes here.</p>" stepKey="InputDefaultValuesInWidgetTextFieldToReset"/> |
| 82 | + <waitForElementVisible selector="{{CmsNewPagePageActionsSection.savePageBtn}}" stepKey="waitForInsertWidgetDialogToDisappearToReset" time="5"/> |
| 83 | + <click selector="{{CmsNewPagePageActionsSection.savePageBtn}}" stepKey="clickSavePageToReset"/> |
| 84 | + <waitForElementVisible selector="{{CmsPagesPageActionsSection.savePageSuccessMessage}}" stepKey="waitForSuccessMessageLoggedOutToReset" time="5"/> |
| 85 | + <see userInput="You saved the page." stepKey="seeSuccessMessageToReset"/> |
| 86 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 87 | + </after> |
| 88 | + <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="navigateToHomePage"/> |
| 89 | + <waitForPageLoad stepKey="waitToLoadHomePage"/> |
| 90 | + <grabTextFrom selector="{{StorefrontCMSPageSection.widgetContent_Apostrophe('Custom texts')}}" stepKey="grabContentFromWidget"/> |
| 91 | + |
| 92 | + <assertEquals message="Asserts the widget contains apostrophe On storefront" stepKey="assertApostropheOnWidgetText"> |
| 93 | + <expectedResult type="string">Custom texts' for tests</expectedResult> |
| 94 | + <actualResult type="string">{$grabContentFromWidget}</actualResult> |
| 95 | + </assertEquals> |
| 96 | + </test> |
| 97 | +</tests> |
0 commit comments