|
1881 | 1881 | <argument name="diffThreshold" value="0"/>
|
1882 | 1882 | </actionGroup>
|
1883 | 1883 | </test>
|
| 1884 | + <test name="BannerPosterAlignmentInheritance"> |
| 1885 | + <annotations> |
| 1886 | + <features value="PageBuilder"/> |
| 1887 | + <stories value="Banner"/> |
| 1888 | + <title value="Poster - Alignment Inherits"/> |
| 1889 | + <description value="A user should be able to have a parent container content type pass its alignment to its children"/> |
| 1890 | + <severity value="MAJOR"/> |
| 1891 | + <useCaseId value="MC-4290"/> |
| 1892 | + <testCaseId value="MC-6015"/> |
| 1893 | + <group value="pagebuilder"/> |
| 1894 | + <group value="pagebuilder-banner"/> |
| 1895 | + <group value="pagebuilder-bannerPoster"/> |
| 1896 | + </annotations> |
| 1897 | + <before> |
| 1898 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 1899 | + <actionGroup ref="navigateToAPageWithPageBuilder" stepKey="navigateToAPageWithPageBuilder"/> |
| 1900 | + <actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/> |
| 1901 | + </before> |
| 1902 | + <after> |
| 1903 | + <actionGroup ref="logout" stepKey="logout"/> |
| 1904 | + </after> |
| 1905 | + <actionGroup ref="addPageBuilderPageTitle" stepKey="enterPageTitle"> |
| 1906 | + <argument name="contentType" value="PageBuilderBannerContentType"/> |
| 1907 | + </actionGroup> |
| 1908 | + <actionGroup ref="expandPageBuilderPanelGroup" stepKey="expandPageBuilderPanelGroup"> |
| 1909 | + <argument name="group" value="PageBuilderBannerContentType"/> |
| 1910 | + </actionGroup> |
| 1911 | + <!-- Add Banner To Row --> |
| 1912 | + <comment userInput="Add Banner To Row" stepKey="commentAddBannerToRow"/> |
| 1913 | + <actionGroup ref="dragContentTypeToStage" stepKey="dragBannerIntoStage"> |
| 1914 | + <argument name="contentType" value="PageBuilderBannerContentType"/> |
| 1915 | + </actionGroup> |
| 1916 | + <actionGroup ref="openPageBuilderEditPanel" stepKey="openBannerEditMenuOnStage"> |
| 1917 | + <argument name="contentType" value="PageBuilderBannerContentType"/> |
| 1918 | + </actionGroup> |
| 1919 | + <!-- Fill Out Banner Edit Panel --> |
| 1920 | + <comment userInput="Fill Out Banner Edit Panel" stepKey="commentFillBannerEditPanel"/> |
| 1921 | + <actionGroup ref="chooseVisualSelectOption" stepKey="enterAppearanceProperty"> |
| 1922 | + <argument name="property" value="PageBuilderBannerAppearance_Poster"/> |
| 1923 | + </actionGroup> |
| 1924 | + <actionGroup ref="addTextToTinyMCE" stepKey="enterMessageText"> |
| 1925 | + <argument name="property" value="PageBuilderBannerMessageProperty"/> |
| 1926 | + <argument name="section" value="BannerOnConfigurationPanel"/> |
| 1927 | + </actionGroup> |
| 1928 | + <actionGroup ref="selectSlideOutPanelField" stepKey="selectShowButton"> |
| 1929 | + <argument name="property" value="PageBuilderBannerShowButtonAlwaysProperty"/> |
| 1930 | + </actionGroup> |
| 1931 | + <actionGroup ref="selectSlideOutPanelField" stepKey="selectButtonType"> |
| 1932 | + <argument name="property" value="PageBuilderBannerButtonTypePrimaryProperty"/> |
| 1933 | + </actionGroup> |
| 1934 | + <actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterButtonText"> |
| 1935 | + <argument name="property" value="PageBuilderBannerButtonTextProperty"/> |
| 1936 | + </actionGroup> |
| 1937 | + <actionGroup ref="chooseVisualSelectOption" stepKey="enterAlignmentDefault"> |
| 1938 | + <argument name="property" value="PageBuilderAdvancedAlignmentPropertyDefault"/> |
| 1939 | + </actionGroup> |
| 1940 | + <actionGroup ref="saveEditPanelSettings" stepKey="saveBannerEditPanelSettings"/> |
| 1941 | + <executeJS function="return {{BannerOnBackend.overlayJS('1')}}.getBoundingClientRect().left" stepKey="overlayLeftPosition"/> |
| 1942 | + <executeJS function="return document.evaluate("{{BannerOnBackend.button('1')}}", document.body).iterateNext().getBoundingClientRect().left" stepKey="buttonLeftPosition"/> |
| 1943 | + <executeJS function="return Math.abs(Math.round({$buttonLeftPosition}-{$overlayLeftPosition}-{{PageBuilderPaddingProperty40.paddingLeft}}))" stepKey="buttonMinusOverlayMinusPadding"/> |
| 1944 | + <assertLessThanOrEqual stepKey="assertButtonLeftAligned"> |
| 1945 | + <expectedResult type="int">5</expectedResult> |
| 1946 | + <actualResult type="variable">buttonMinusOverlayMinusPadding</actualResult> |
| 1947 | + </assertLessThanOrEqual> |
| 1948 | + <executeJS function="return window.getComputedStyle({{BannerOnBackend.wrapperJS('1')}}).textAlign" stepKey="grabDefaultComputedTextAlign"/> |
| 1949 | + <assertEquals stepKey="assertDefaultComputedTextAlign"> |
| 1950 | + <expectedResult type="string">{{PageBuilderAdvancedAlignmentPropertyStart.value}}</expectedResult> |
| 1951 | + <actualResult type="variable">grabDefaultComputedTextAlign</actualResult> |
| 1952 | + </assertEquals> |
| 1953 | + <click selector="{{PageBuilderPanel.searchPanel}}" stepKey="unFocusBannerEditor"/> |
| 1954 | + <!-- Fill Out Row Edit Panel --> |
| 1955 | + <comment userInput="Fill Out Row Edit Panel" stepKey="commentFillRowEditPanel"/> |
| 1956 | + <actionGroup ref="openPageBuilderEditPanel" stepKey="openRowEditMenuOnStage"> |
| 1957 | + <argument name="contentType" value="PageBuilderRowContentType"/> |
| 1958 | + </actionGroup> |
| 1959 | + <comment userInput="Update Values" stepKey="commentUpdateValues"/> |
| 1960 | + <actionGroup ref="chooseVisualSelectOption" stepKey="enterAlignment"> |
| 1961 | + <argument name="property" value="PageBuilderAdvancedAlignmentPropertyRight"/> |
| 1962 | + </actionGroup> |
| 1963 | + <actionGroup ref="saveEditPanelSettings" stepKey="saveRowEditPanelSettings"/> |
| 1964 | + <click selector="{{PageBuilderPanel.searchPanel}}" stepKey="unFocusRowEditor"/> |
| 1965 | + <!-- Validate Stage --> |
| 1966 | + <comment userInput="Validate Stage" stepKey="commentValidateStage"/> |
| 1967 | + <executeJS function="return {{BannerOnBackend.overlayJS('1')}}.getBoundingClientRect().right" stepKey="overlayRightPosition"/> |
| 1968 | + <executeJS function="return document.evaluate("{{BannerOnBackend.button('1')}}", document.body).iterateNext().getBoundingClientRect().right" stepKey="buttonRightPosition"/> |
| 1969 | + <executeJS function="return Math.abs(Math.round({$overlayRightPosition}-{$buttonRightPosition}-{{PageBuilderPaddingProperty40.paddingRight}}))" stepKey="overlayMinusButtonMinusPadding"/> |
| 1970 | + <assertLessThanOrEqual stepKey="assertButtonRightAligned"> |
| 1971 | + <expectedResult type="int">5</expectedResult> |
| 1972 | + <actualResult type="variable">overlayMinusButtonMinusPadding</actualResult> |
| 1973 | + </assertLessThanOrEqual> |
| 1974 | + <executeJS function="return window.getComputedStyle({{BannerOnBackend.wrapperJS('1')}}).textAlign" stepKey="grabComputedTextAlign"/> |
| 1975 | + <assertEquals stepKey="assertComputedTextAlign"> |
| 1976 | + <expectedResult type="string">{{PageBuilderAdvancedAlignmentPropertyRight.value}}</expectedResult> |
| 1977 | + <actualResult type="variable">grabComputedTextAlign</actualResult> |
| 1978 | + </assertEquals> |
| 1979 | + <actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage"/> |
| 1980 | + <actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/> |
| 1981 | + <!-- Validate Stage After Save --> |
| 1982 | + <comment userInput="Validate Stage After Save" stepKey="commentValidateStageAfterSave"/> |
| 1983 | + <executeJS function="return {{BannerOnBackend.overlayJS('1')}}.getBoundingClientRect().right" stepKey="overlayRightPositionAfterSave"/> |
| 1984 | + <executeJS function="return document.evaluate("{{BannerOnBackend.button('1')}}", document.body).iterateNext().getBoundingClientRect().right" stepKey="buttonRightPositionAfterSave"/> |
| 1985 | + <executeJS function="return Math.abs(Math.round({$overlayRightPositionAfterSave}-{$buttonRightPositionAfterSave}-{{PageBuilderPaddingProperty40.paddingRight}}))" stepKey="overlayMinusButtonMinusPaddingAfterSave"/> |
| 1986 | + <assertLessThanOrEqual stepKey="assertButtonRightAlignedAfterSave"> |
| 1987 | + <expectedResult type="int">5</expectedResult> |
| 1988 | + <actualResult type="variable">overlayMinusButtonMinusPaddingAfterSave</actualResult> |
| 1989 | + </assertLessThanOrEqual> |
| 1990 | + <executeJS function="return window.getComputedStyle({{BannerOnBackend.wrapperJS('1')}}).textAlign" stepKey="grabComputedTextAlignAfterSave"/> |
| 1991 | + <assertEquals stepKey="assertComputedTextAlignAfterSave"> |
| 1992 | + <expectedResult type="string">{{PageBuilderAdvancedAlignmentPropertyRight.value}}</expectedResult> |
| 1993 | + <actualResult type="variable">grabComputedTextAlignAfterSave</actualResult> |
| 1994 | + </assertEquals> |
| 1995 | + <!-- Validate Storefront --> |
| 1996 | + <comment userInput="Validate Storefront" stepKey="commentValidateStorefront"/> |
| 1997 | + <actionGroup ref="navigateToStoreFront" stepKey="navigateToStoreFront"> |
| 1998 | + <argument name="contentType" value="PageBuilderBannerContentType"/> |
| 1999 | + </actionGroup> |
| 2000 | + <executeJS function="return {{BannerOnFrontend.overlayJS('1')}}.getBoundingClientRect().right" stepKey="overlayRightPositionStoreFront"/> |
| 2001 | + <executeJS function="return document.evaluate("{{BannerOnFrontend.button('1')}}", document.body).iterateNext().getBoundingClientRect().right" stepKey="buttonRightPositionStoreFront"/> |
| 2002 | + <executeJS function="return Math.abs(Math.round({$overlayRightPositionStoreFront}-{$buttonRightPositionStoreFront}-{{PageBuilderPaddingProperty40.paddingRight}}))" stepKey="overlayMinusButtonMinusPaddingStoreFront"/> |
| 2003 | + <assertLessThanOrEqual stepKey="assertButtonRightAlignedStoreFront"> |
| 2004 | + <expectedResult type="int">5</expectedResult> |
| 2005 | + <actualResult type="variable">overlayMinusButtonMinusPaddingStoreFront</actualResult> |
| 2006 | + </assertLessThanOrEqual> |
| 2007 | + <executeJS function="return window.getComputedStyle({{BannerOnFrontend.wrapperJS('1')}}).textAlign" stepKey="grabComputedTextAlignStoreFront"/> |
| 2008 | + <assertEquals stepKey="assertComputedTextAlignStoreFront"> |
| 2009 | + <expectedResult type="string">{{PageBuilderAdvancedAlignmentPropertyRight.value}}</expectedResult> |
| 2010 | + <actualResult type="variable">grabComputedTextAlignStoreFront</actualResult> |
| 2011 | + </assertEquals> |
| 2012 | + </test> |
1884 | 2013 | </tests>
|
0 commit comments