-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improved event handlers for prompt widget
- Loading branch information
Vaha
committed
Mar 3, 2020
1 parent
2d46d98
commit 21afe21
Showing
7 changed files
with
184 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
app/code/Magento/Cms/Test/Mftf/ActionGroup/ClickInsertEditImageTinyMCEButtonActionGroup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="ClickInsertEditImageTinyMCEButtonActionGroup"> | ||
<annotations> | ||
<description>Clicks on the 'Insert/edit image' TinyMCE button.</description> | ||
</annotations> | ||
|
||
<click selector="{{TinyMCESection.InsertImageIcon}}" stepKey="clickInsertImageBtn" /> | ||
<waitForPageLoad stepKey="waitForPageLoad"/> | ||
</actionGroup> | ||
</actionGroups> |
18 changes: 18 additions & 0 deletions
18
app/code/Magento/Cms/Test/Mftf/ActionGroup/CreateImageFolderByEnterKeyActionGroup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="CreateImageFolderByEnterKeyActionGroup" extends="CreateImageFolderActionGroup"> | ||
<annotations> | ||
<description>Creates a folder (by enter key) in the Media Gallery based on the provided Folder.</description> | ||
</annotations> | ||
|
||
<pressKey selector="{{MediaGallerySection.FolderName}}" parameterArray="[\Facebook\WebDriver\WebDriverKeys::ENTER]" stepKey="acceptFolderName"/> | ||
</actionGroup> | ||
</actionGroups> |
28 changes: 28 additions & 0 deletions
28
app/code/Magento/Cms/Test/Mftf/ActionGroup/DeleteFolderActionGroup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="DeleteFolderActionGroup"> | ||
<annotations> | ||
<description>Deletes the provided folder by name from the Media Gallery.</description> | ||
</annotations> | ||
<arguments> | ||
<argument name="ImageFolder" defaultValue="ImageFolder"/> | ||
</arguments> | ||
|
||
<click userInput="{{ImageFolder.name}}" stepKey="clickOnCreatedFolder"/> | ||
<waitForLoadingMaskToDisappear stepKey="waitForLoading"/> | ||
<see selector="{{MediaGallerySection.DeleteFolder}}" userInput="Delete Folder" stepKey="seeDeleteFolderBtn"/> | ||
<click selector="{{MediaGallerySection.DeleteFolder}}" stepKey="clickDeleteFolderBtn"/> | ||
<waitForText userInput="OK" stepKey="waitForConfirm"/> | ||
<click selector="{{MediaGallerySection.confirmDelete}}" stepKey="confirmDelete"/> | ||
<waitForPageLoad stepKey="waitForPopUpHide"/> | ||
<dontSeeElement selector="{{ImageFolder.name}}" stepKey="dontSeeFolderName"/> | ||
</actionGroup> | ||
</actionGroups> |
27 changes: 27 additions & 0 deletions
27
app/code/Magento/Cms/Test/Mftf/ActionGroup/PressEscImageFolderActionGroup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="PressEscImageFolderActionGroup"> | ||
<annotations> | ||
<description>Opens the 'create folder' modal, fills 'folder name' input with provided folder name, | ||
presses escape key to cancel folder creation (close modal).</description> | ||
</annotations> | ||
<arguments> | ||
<argument name="ImageFolder" defaultValue="ImageFolder"/> | ||
</arguments> | ||
|
||
<click selector="{{MediaGallerySection.CreateFolder}}" stepKey="createFolder"/> | ||
<waitForElementVisible selector="{{MediaGallerySection.FolderName}}" stepKey="waitForPopUp"/> | ||
<fillField selector="{{MediaGallerySection.FolderName}}" userInput="{{ImageFolder.name}}" stepKey="fillFolderName"/> | ||
<pressKey selector="{{MediaGallerySection.FolderName}}" parameterArray="[\Facebook\WebDriver\WebDriverKeys::ESCAPE]" stepKey="cancelFolderName"/> | ||
<waitForPageLoad stepKey="waitForPopUpHide"/> | ||
<dontSeeElement selector="{{ImageFolder.name}}" stepKey="dontSeeFolderName"/> | ||
</actionGroup> | ||
</actionGroups> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
...nto/Cms/Test/Mftf/Test/AdminCheckCreateFolderEscapeAndEnterHandlesForWYSIWYGBlockTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> | ||
<test name="AdminCheckCreateFolderEscapeAndEnterHandlesForWYSIWYGBlockTest"> | ||
<annotations> | ||
<features value="Cms"/> | ||
<stories value="WYSIWYG toolbar configuration with Magento Media Gallery"/> | ||
<group value="Cms"/> | ||
<title value="Admin should be able to cancel and close 'create folder' modal window using ESC key and | ||
to add image to new folder (using enter key) for WYSIWYG content of Block"/> | ||
<description value="Admin should be able to cancel and close 'create folder' modal window using ESC key and | ||
to add image to new folder (using enter key) for WYSIWYG content of Block"/> | ||
</annotations> | ||
|
||
<before> | ||
<createData entity="_defaultBlock" stepKey="createPreReqBlock" /> | ||
<actionGroup ref="LoginActionGroup" stepKey="login"/> | ||
<actionGroup ref="EnabledWYSIWYGActionGroup" stepKey="enableWYSIWYG"/> | ||
<actionGroup ref="SwitchToVersion4ActionGroup" stepKey="switchToTinyMCE4" /> | ||
</before> | ||
|
||
<after> | ||
<deleteData createDataKey="createPreReqBlock" stepKey="deletePreReqBlock" /> | ||
<actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/> | ||
<actionGroup ref="logout" stepKey="logout"/> | ||
</after> | ||
|
||
<actionGroup ref="NavigateToCreatedCMSBlockPageActionGroup" stepKey="navigateToCreatedCMSBlockPage"> | ||
<argument name="CMSBlockPage" value="$$createPreReqBlock$$"/> | ||
</actionGroup> | ||
<actionGroup ref="ClickInsertEditImageTinyMCEButtonActionGroup" stepKey="clickInsertImageIcon"/> | ||
<actionGroup ref="ClickBrowseBtnOnUploadPopupActionGroup" stepKey="clickBrowserBtn"/> | ||
<actionGroup ref="VerifyMediaGalleryStorageActionsActionGroup" stepKey="VerifyMediaGalleryStorageBtn"/> | ||
|
||
<actionGroup ref="CreateImageFolderByEnterKeyActionGroup" stepKey="CreateImageFolderByEnterKeyPress"> | ||
<argument name="ImageFolder" value="ImageFolder"/> | ||
</actionGroup> | ||
|
||
<actionGroup ref="DeleteFolderActionGroup" stepKey="DeleteCreatedFolder"> | ||
<argument name="ImageFolder" value="ImageFolder"/> | ||
</actionGroup> | ||
|
||
<actionGroup ref="PressEscImageFolderActionGroup" stepKey="CancelImageFolderCreation"> | ||
<argument name="ImageFolder" value="ImageFolder"/> | ||
</actionGroup> | ||
</test> | ||
</tests> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters