Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 
 
 

38 строки
2.4 KiB

  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. <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  9. xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
  10. <actionGroup name="AdminAssertDownloadableSampleLinkInformationActionGroup">
  11. <annotations>
  12. <description>Verifies the data for a downloadable sample link on the Edit Product page in admin.</description>
  13. </annotations>
  14. <arguments>
  15. <argument name="title" defaultValue="{{downloadableSampleFile.title}}" type="string"/>
  16. <argument name="fileType" defaultValue="{{downloadableSampleFile.file_type}}" type="string"/>
  17. <argument name="fileNameOrUrl" defaultValue="{{downloadableSampleFile.file}}" type="string"/>
  18. <argument name="index" defaultValue="0" type="string"/>
  19. </arguments>
  20. <conditionalClick selector="{{AdminProductDownloadableSection.sectionHeader}}" dependentSelector="{{AdminProductDownloadableSection.addSampleTitleInput(index)}}" visible="false" stepKey="expandDownloadableSection"/>
  21. <waitForElementVisible selector="{{AdminProductDownloadableSection.addSampleTitleInput(index)}}" stepKey="waitForDownloadableLinks"/>
  22. <seeInField userInput="{{title}}" selector="{{AdminProductDownloadableSection.addSampleTitleInput(index)}}" stepKey="seeTitle"/>
  23. <seeInField userInput="{{fileType}}" selector="{{AdminProductDownloadableSection.addSampleFileTypeSelector(index)}}" stepKey="seeFileType"/>
  24. <executeJS function="
  25. var element = document.evaluate(&quot;{{AdminProductDownloadableSection.sampleFileNameOrUrl(index)}}&quot;, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null);
  26. if ( typeof element.singleNodeValue.value !== &quot;undefined&quot; ) {
  27. return element.singleNodeValue.value; }
  28. else {
  29. return element.singleNodeValue.innerText; };"
  30. stepKey="grabFileNameOrUrl"/>
  31. <assertStringContainsString stepKey="assertFileNameOrUrl">
  32. <actualResult type="variable">grabFileNameOrUrl</actualResult>
  33. <expectedResult type="string">{{fileNameOrUrl}}</expectedResult>
  34. </assertStringContainsString>
  35. </actionGroup>
  36. </actionGroups>