[Behat] Add scenario for checking if attribute is correctly added with values

This commit is contained in:
TheMilek 2023-08-10 16:48:33 +02:00
parent fd1834479d
commit a959f7c4fc
No known key found for this signature in database
GPG key ID: 2E44205E7374692F
2 changed files with 27 additions and 0 deletions

View file

@ -0,0 +1,19 @@
@managing_product_attributes
Feature: Seeing correct select attribute values in different locale than default one
In order to see correct attribute values in different locale than default one
As and Administrator
I should be able to create attribute with values in different locale than default one
Background:
Given the store is available in "French (France)"
And I am logged in as an administrator
@ui @javascript
Scenario: Seeing correct attribute values in different locale than default one
When I want to create a new select product attribute
And I specify its code as "mug_material"
And I name it "Mug material" in "French (France)"
And I add value "Banana Skin" in "French (France)"
And I add it
Then I should be notified that it has been successfully created
And it should see value "Banana Skin"

View file

@ -364,6 +364,14 @@ final class ManagingProductAttributesContext implements Context
Assert::same(end($names), $name);
}
/**
* @Then /^it should see value "([^"]*)"/
*/
public function theSelectAttributeShouldHaveValueInLocale(string $value): void
{
Assert::true($this->updatePage->hasAttributeValue($value));
}
/**
* @Then /^(this product attribute) should have value "([^"]*)"/
*/