You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For now we have two types of Elements, but they do the same things, and have the same purpose.
First of all Elements configuration must be unified.
I suggest to add names for Custom elements, and add classes for Inline Elements - it's only that needed for merge them.
So we will have the next configuration in behat.yml:
So what do you think about it?
As side effect you don't need to guess Element class anymore (that can be performance issue by the way), you are always know what instance you must create.
The text was updated successfully, but these errors were encountered:
I'm a bit sceptical to adding anything to the configuration.
What about moving away from named elements to using classes? With the class constant it would be very easy: getPage(Homepage::class). It would only be possible to access inline elements from within the page object, so we'd only need to handle it there.
Names of elements is very useful in my cases. I have some common step definition:
<?php/** * Fill form with data * Example: And fill form with: * | Subject | Simple text | * | Users | [Charlie, Pitt] | * | Date | 2017-08-24 | * * @When /^(?:|I )fill "(?P<formName>(?:[^"]|\\")*)" formwith:$/ * @When/^(?:|I)fillformwith:$/ */publicfunctioniFillFormWith(TableNode$table, $formName = "OroForm")
{
/** @varForm $form */$form = $this->createElement($formName);
$form->fill($table);
}
And create form by element name.
About class for inline elements - it's also needed so much. For example if I have two TinyMce on form I can use two selectors and one Element.
For now we have two types of Elements, but they do the same things, and have the same purpose.
First of all Elements configuration must be unified.
I suggest to add names for Custom elements, and add classes for Inline Elements - it's only that needed for merge them.
So we will have the next configuration in behat.yml:
And configuration for Inline Elements:
So what do you think about it?
As side effect you don't need to guess Element class anymore (that can be performance issue by the way), you are always know what instance you must create.
The text was updated successfully, but these errors were encountered: