Skip to content

Commit c48607e

Browse files
committed
Merge branch 'MQE-398' into sprint-develop
2 parents f371c4d + 7656a87 commit c48607e

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

dev/tests/verification/TestModule/Page/SamplePage.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
-->
88

99
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10-
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd">
11-
<page name="SamplePage" urlPath="/{{var1}}/{{var2}}.html" module="SampleTests" parameterized="true">
10+
xsi:noNamespaceSchemaLocation="../../../../../src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd">
11+
<page name="SamplePage" url="/{{var1}}/{{var2}}.html" module="SampleTests" parameterized="true">
1212
<section name="SampleSection"/>
1313
</page>
1414
</config>

src/Magento/FunctionalTestingFramework/Page/Handlers/PageObjectHandler.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ class PageObjectHandler implements ObjectHandlerInterface
1818
{
1919
const TYPE = 'page';
2020
const SUB_TYPE = 'section';
21-
const URL_PATH_ATTR = 'urlPath';
22-
const MODULE_ATTR = 'module';
21+
const URL = 'url';
22+
const MODULE = 'module';
2323
const PARAMETERIZED = 'parameterized';
2424

2525
/**
@@ -102,12 +102,12 @@ private function initPageObjects()
102102
}
103103

104104
foreach ($parsedObjs as $pageName => $pageData) {
105-
$urlPath = $pageData[PageObjectHandler::URL_PATH_ATTR];
106-
$module = $pageData[PageObjectHandler::MODULE_ATTR];
107-
$sections = array_keys($pageData[PageObjectHandler::SUB_TYPE]);
108-
$parameterized = $pageData[PageObjectHandler::PARAMETERIZED] ?? false;
105+
$url = $pageData[self::URL];
106+
$module = $pageData[self::MODULE];
107+
$sections = array_keys($pageData[self::SUB_TYPE]);
108+
$parameterized = $pageData[self::PARAMETERIZED] ?? false;
109109

110-
$this->pages[$pageName] = new PageObject($pageName, $urlPath, $module, $sections, $parameterized);
110+
$this->pages[$pageName] = new PageObject($pageName, $url, $module, $sections, $parameterized);
111111
}
112112
}
113113
}

src/Magento/FunctionalTestingFramework/Page/Objects/PageObject.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ class PageObject
5252
/**
5353
* PageObject constructor.
5454
* @param string $name
55-
* @param string $urlPath
55+
* @param string $url
5656
* @param string $module
5757
* @param array $sections
5858
* @param bool $parameterized
5959
*/
60-
public function __construct($name, $urlPath, $module, $sections, $parameterized)
60+
public function __construct($name, $url, $module, $sections, $parameterized)
6161
{
6262
$this->name = $name;
63-
$this->url = $urlPath;
63+
$this->url = $url;
6464
$this->module = $module;
6565
$this->sectionNames = $sections;
6666
$this->parameterized = $parameterized;

src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@
4848
</xs:documentation>
4949
</xs:annotation>
5050
</xs:attribute>
51-
<xs:attribute type="notEmptyType" name="urlPath" use="required">
51+
<xs:attribute type="notEmptyType" name="url" use="required">
5252
<xs:annotation>
5353
<xs:documentation>
54-
Url path (excluding the base url) for the page. Use "%s" for placeholders for variables.
54+
URL for the page. Do not include the hostname. For example: "/admin/customer/index/"
5555
</xs:documentation>
5656
</xs:annotation>
5757
</xs:attribute>

0 commit comments

Comments
 (0)