<?xml version="1.0" encoding="UTF-8"?>
<!--
 /**
  * Copyright 2024 Adobe
  * All Rights Reserved.
  */
-->
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
    <actionGroup name="AdminAssertCategoryImageActionGroup">
        <annotations>
            <description>Assert category image on admin.</description>
        </annotations>
        <arguments>
            <argument name="image" type="entity"/>
        </arguments>
        <conditionalClick selector="{{AdminCategoryContentSection.sectionHeader}}" dependentSelector="{{AdminCategoryContentSection.uploadButton}}" visible="false" stepKey="openContentSection"/>
        <waitForPageLoad time="30" stepKey="waitForPageLoad"/>
        <waitForElementVisible selector="{{AdminCategoryContentSection.imageFileName}}" stepKey="waitForLoading"/>
        <grabTextFrom selector="{{AdminCategoryContentSection.imageFileName}}" stepKey="grabCategoryFileName"/>
        <assertRegExp stepKey="assertEquals" message="pass">
            <expectedResult type="string">/{{image.filename}}(_[0-9]+)*?\.(jpg|png)$/</expectedResult>
            <actualResult type="variable">grabCategoryFileName</actualResult>
        </assertRegExp>
    </actionGroup>
</actionGroups>
