<?php
namespace Magento\AcceptanceTest\_default\Backend;

use Magento\FunctionalTestingFramework\AcceptanceTester;
use Magento\FunctionalTestingFramework\DataGenerator\Handlers\CredentialStore;
use Magento\FunctionalTestingFramework\DataGenerator\Handlers\PersistedObjectHandler;
use \Codeception\Util\Locator;
use Yandex\Allure\Adapter\Annotation\Features;
use Yandex\Allure\Adapter\Annotation\Stories;
use Yandex\Allure\Adapter\Annotation\Title;
use Yandex\Allure\Adapter\Annotation\Description;
use Yandex\Allure\Adapter\Annotation\Parameter;
use Yandex\Allure\Adapter\Annotation\Severity;
use Yandex\Allure\Adapter\Model\SeverityLevel;
use Yandex\Allure\Adapter\Annotation\TestCaseId;

/**
 * @Description("<br><br><b><font size=+0.9>Test files</font></b><br><br>verification/TestModule/Test/ExtendedDataTest.xml<br>")
 */
class ExtendParentDataTestCest
{
	/**
	 * @Features({"TestModule"})
	 * @Parameter(name = "AcceptanceTester", value="$I")
	 * @param AcceptanceTester $I
	 * @return void
	 * @throws \Exception
	 */
	public function ExtendParentDataTest(AcceptanceTester $I)
	{
		$I->comment("[simpleDataKey] create 'extendParentData' entity");
		PersistedObjectHandler::getInstance()->createEntity(
			"simpleDataKey",
			"test",
			"extendParentData",
			[],
			[]
		);

		$I->searchAndMultiSelectOption("#selector", ["otherName"]); // stepKey: getName
		$I->searchAndMultiSelectOption("#selector", ["extendName"]); // stepKey: getNameExtend
		$I->searchAndMultiSelectOption("#selector", ["item"]); // stepKey: emptyPost
		$I->searchAndMultiSelectOption("#selector", [msq("extendParentData") . "prename"]); // stepKey: originalPre
		$I->searchAndMultiSelectOption("#selector", ["postnameExtend" . msq("extendParentData")]); // stepKey: secondUniquePre
	}
}
