|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | + /** |
| 4 | + * Copyright 2025 Adobe |
| 5 | + * All Rights Reserved. |
| 6 | + */ |
| 7 | +--> |
| 8 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 9 | +xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 10 | + <test name="AdminPageBuilderNoTimeoutTest"> |
| 11 | + <annotations> |
| 12 | + <features value="PageBuilder"/> |
| 13 | + <stories value="PageBuilder Performance"/> |
| 14 | + <title value="PageBuilder should not timeout on save"/> |
| 15 | + <description value="PageBuilder should not take more than 5s to generate content source"/> |
| 16 | + <severity value="AVERAGE"/> |
| 17 | + <useCaseId value="ACP2E-2016"/> |
| 18 | + <testCaseId value="AC-9079"/> |
| 19 | + <group value="pagebuilder"/> |
| 20 | + <group value="pagebuilder-cms-page"/> |
| 21 | + </annotations> |
| 22 | + <before> |
| 23 | + <createData entity="_defaultCmsPage" stepKey="createCMSPage"/> |
| 24 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 25 | + </before> |
| 26 | + <after> |
| 27 | + <deleteData createDataKey="createCMSPage" stepKey="deleteCMSPage"/> |
| 28 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 29 | + </after> |
| 30 | + <actionGroup ref="NavigateToCreatedCMSPageActionGroup" stepKey="navigateToCreatedCMSPage1"> |
| 31 | + <argument name="CMSPage" value="$$createCMSPage$$"/> |
| 32 | + </actionGroup> |
| 33 | + <executeJS function=" |
| 34 | +((logger, storage) => { |
| 35 | + let _super = logger.error; |
| 36 | + logger.error = function (...args) { |
| 37 | + let records = storage.getItem('consoleErrors') ? JSON.parse(storage.getItem('consoleErrors')) : []; |
| 38 | + records.push(...args.filter(arg => typeof arg === 'string')); |
| 39 | + storage.setItem('consoleErrors', JSON.stringify(records)); |
| 40 | + _super.apply(logger, args); |
| 41 | + }; |
| 42 | +})(window.console, window.sessionStorage) |
| 43 | +" stepKey="storeConsoleErrorsInSessionStorage"/> |
| 44 | + <actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/> |
| 45 | + <actionGroup ref="dragContentTypeToStage" stepKey="dragRowToRootContainer"> |
| 46 | + <argument name="contentType" value="PageBuilderRowContentType"/> |
| 47 | + <argument name="containerTargetType" value="PageBuilderRootContainerContentType"/> |
| 48 | + </actionGroup> |
| 49 | + <actionGroup ref="expandPageBuilderPanelMenuSection" stepKey="expandPageBuilderPanelMenuSection2"> |
| 50 | + <argument name="contentType" value="PageBuilderHeadingContentType"/> |
| 51 | + </actionGroup> |
| 52 | + <actionGroup ref="dragContentTypeToStage" stepKey="dragHeadingIntoStage"> |
| 53 | + <argument name="contentType" value="PageBuilderHeadingContentType"/> |
| 54 | + </actionGroup> |
| 55 | + <actionGroup ref="expandPageBuilderPanelMenuSection" stepKey="expandPageBuilderPanelMenuSection1"> |
| 56 | + <argument name="contentType" value="PageBuilderTextContentType"/> |
| 57 | + </actionGroup> |
| 58 | + <actionGroup ref="dragContentTypeToStage" stepKey="dragTextIntoStage"> |
| 59 | + <argument name="contentType" value="PageBuilderTextContentType"/> |
| 60 | + </actionGroup> |
| 61 | + <actionGroup ref="exitPageBuilderFullScreen" stepKey="exitPageBuilderFullScreen"/> |
| 62 | + <actionGroup ref="SaveAndContinueEditCmsPageActionGroup" stepKey="saveAndContinueEditCmsPage"/> |
| 63 | + <executeJS function="return sessionStorage.getItem('consoleErrors') || ''" stepKey="getConsoleErrors"/> |
| 64 | + <assertStringNotContainsString stepKey="assertConsoleErrors"> |
| 65 | + <expectedResult type="string">Page Builder was rendering for 5 seconds without releasing locks.</expectedResult> |
| 66 | + <actualResult type="variable">getConsoleErrors</actualResult> |
| 67 | + </assertStringNotContainsString> |
| 68 | + </test> |
| 69 | +</tests> |
0 commit comments