|
| 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 | + <group value="pagebuilder_disabled"/> |
| 21 | + </annotations> |
| 22 | + <before> |
| 23 | + <!-- Pre-condition 1- Login as Admin --> |
| 24 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 25 | + <!-- Pre-condition 3- Verify page in grid--> |
| 26 | + <actionGroup ref="AdminOpenCMSPagesGridActionGroup" stepKey="openCMSPagesGridActionGroup"/> |
| 27 | + <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearGridFilters"/> |
| 28 | + <actionGroup ref="SortByIdDescendingActionGroup" stepKey="sortGridByIdDescending"/> |
| 29 | + <click selector="{{CmsPagesPageActionsSection.select('home')}}" stepKey="clickSelectCMSPage" /> |
| 30 | + <!-- Pre-condition 4- Update the page in grid--> |
| 31 | + <click selector="{{CmsPagesPageActionsSection.edit('home')}}" stepKey="OpenThePageToBeEdited"/> |
| 32 | + <waitForPageLoad stepKey="waitForPageLoadPostSelectingHomePage"/> |
| 33 | + <waitForElementVisible selector="{{CmsNewPagePageContentSection.header}}" stepKey="waitForContentTabForPageToBeVisible"/> |
| 34 | + <!-- Pre-condition 5- Expand the Content section > Insert Widget --> |
| 35 | + <click selector="{{CmsNewPagePageContentSection.header}}" stepKey="clickExpandContentTabForPage"/> |
| 36 | + <conditionalClick selector="{{CmsNewPagePageActionsSection.showHideEditor}}" dependentSelector="{{CmsNewPagePageActionsSection.showHideEditor}}" visible="true" stepKey="clickOnShowHideEditorLinkIfVisibleForInsertingWidget"/> |
| 37 | + <waitForElementVisible selector="{{CmsNewPagePageActionsSection.insertWidget}}" stepKey="waitForTheInsertWidgetButtonToDisplay"/> |
| 38 | + <actionGroup ref="AdminInsertWidgetToCmsPageContentActionGroup" stepKey="selectCMSPageLinkFromDropdown"/> |
| 39 | + <waitForPageLoad stepKey="waitForPageLoadPostSelectingFromDropDown"/> |
| 40 | + <!-- Pre-condition 6 - 11 - Update the Anchor Custom Text --> |
| 41 | + <fillField selector="{{WidgetSection.InputAnchorCustomText}}" userInput="Custom texts' for tests" stepKey="InputValuesWithApostrophe"/> |
| 42 | + <click selector="{{WidgetSection.SelectPageButton}}" stepKey="clickOnSelectPageButton"/> |
| 43 | + <waitForElementVisible selector="{{WidgetSection.URLKeySelectPage}}" stepKey="waitForSelectPageDialogToPopulate"/> |
| 44 | + <fillField selector="{{WidgetSection.URLKeySelectPage}}" userInput="home" stepKey="EnterThePageURL"/> |
| 45 | + <click selector="{{WidgetSection.SearchButtonSelectPage}}" stepKey="clickOnSearchButton"/> |
| 46 | + <waitForPageLoad stepKey="waitForResultsToBeDisplayed"/> |
| 47 | + <click selector="{{WidgetSection.SearchResultSelectPage('home')}}" stepKey="clickOnDisplayedResult"/> |
| 48 | + <click selector="{{WidgetSection.InsertWidget}}" stepKey="clickOnInsertWidget"/> |
| 49 | + <waitForElementVisible selector="{{CmsNewPagePageActionsSection.saveAndContinueEdit}}" stepKey="waitForInsertWidgetDialogToDisappear" time="5"/> |
| 50 | + <click selector="{{CmsNewPagePageActionsSection.saveAndContinueEdit}}" stepKey="clickSavePage"/> |
| 51 | + <waitForElementVisible selector="{{CmsPagesPageActionsSection.savePageSuccessMessage}}" stepKey="waitForSuccessMessageLoggedOut" time="5"/> |
| 52 | + <see userInput="You saved the page." stepKey="seeSuccessMessage"/> |
| 53 | + </before> |
| 54 | + <after> |
| 55 | + <actionGroup ref="AdminOpenCMSPagesGridActionGroup" stepKey="openCMSPagesGridActionGroupToReset"/> |
| 56 | + <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearGridFiltersToReset"/> |
| 57 | + <actionGroup ref="SortByIdDescendingActionGroup" stepKey="sortGridByIdDescendingToReset"/> |
| 58 | + <click selector="{{CmsPagesPageActionsSection.select('home')}}" stepKey="clickSelectCMSPageToReset" /> |
| 59 | + <!-- Pre-condition 4- Update the page in grid To Reset--> |
| 60 | + <click selector="{{CmsPagesPageActionsSection.edit('home')}}" stepKey="OpenThePageToBeEditedToReset"/> |
| 61 | + <waitForPageLoad stepKey="waitForPageLoadPostSelectingHomePageToReset"/> |
| 62 | + <waitForElementVisible selector="{{CmsNewPagePageContentSection.header}}" stepKey="waitForContentTabForPageToBeVisibleToReset"/> |
| 63 | + <!-- Pre-condition 5- Expand the Content section > Insert Widget To Reset --> |
| 64 | + <click selector="{{CmsNewPagePageContentSection.header}}" stepKey="clickExpandContentTabForPageToReset"/> |
| 65 | + <conditionalClick selector="{{CmsNewPagePageActionsSection.showHideEditor}}" dependentSelector="{{CmsNewPagePageActionsSection.showHideEditor}}" visible="true" stepKey="clickOnShowHideEditorLinkIfVisibleForInsertingWidgetToOriginal"/> |
| 66 | + <waitForElementVisible selector="{{CmsNewPagePageActionsSection.insertWidget}}" stepKey="waitForTheInsertWidgetButtonToDisplayToReset"/> |
| 67 | + <clearField selector="{{CmsNewPagePageContentSection.content}}" stepKey="clearWidgetTextFieldToReset"/> |
| 68 | + <fillField selector="{{CmsNewPagePageContentSection.content}}" userInput="<p>CMS homepage content goes here.</p>" stepKey="InputDefaultValuesInWidgetTextFieldToReset"/> |
| 69 | + <waitForElementVisible selector="{{CmsNewPagePageActionsSection.saveAndContinueEdit}}" stepKey="waitForInsertWidgetDialogToDisappearToReset" time="5"/> |
| 70 | + <click selector="{{CmsNewPagePageActionsSection.saveAndContinueEdit}}" stepKey="clickSavePageToReset"/> |
| 71 | + <waitForElementVisible selector="{{CmsPagesPageActionsSection.savePageSuccessMessage}}" stepKey="waitForSuccessMessageLoggedOutToReset" time="5"/> |
| 72 | + <see userInput="You saved the page." stepKey="seeSuccessMessageToReset"/> |
| 73 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 74 | + </after> |
| 75 | + <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="navigateToHomePage"/> |
| 76 | + <waitForPageLoad stepKey="waitToLoadHomePage"/> |
| 77 | + <grabTextFrom selector="{{StorefrontCMSPageSection.widgetContentApostrophe('Custom texts')}}" stepKey="grabContentFromWidget"/> |
| 78 | + <assertEquals message="Asserts the widget contains apostrophe On storefront" stepKey="assertApostropheOnWidgetText"> |
| 79 | + <expectedResult type="string">Custom texts' for tests</expectedResult> |
| 80 | + <actualResult type="string">{$grabContentFromWidget}</actualResult> |
| 81 | + </assertEquals> |
| 82 | + </test> |
| 83 | +</tests> |
0 commit comments