[Behat] Move scenario to admin context

This commit is contained in:
Michał Pysiak 2024-10-02 12:45:25 +02:00
parent c7e6043008
commit 5f68148f5f
No known key found for this signature in database
GPG key ID: 9C1F2D0F99830187
2 changed files with 22 additions and 22 deletions

View file

@ -0,0 +1,22 @@
@checkout
Feature: Assigning customer's IP address to a placed order
In order to know from which IP address a new order has been places
As an Administrator
I want to have customer's IP address assigned to their orders
Background:
Given the store operates on a single channel in "United States"
And the store has a product "PHP T-Shirt" priced at "$19.99"
And the store ships everywhere for Free
And the store allows paying Offline
And there is a customer account "customer@example.com"
And there is a customer "customer@example.com" that placed order with "PHP T-Shirt" product to "United States" based billing address with "Free" shipping method and "Offline" payment method without completing it
And I am logged in as "customer@example.com"
And I confirm my order
Then I should see the thank you page
@api @ui
Scenario: Verifying the customer's IP address for a newly placed order
Given I am logged in as an administrator
When I view the summary of the order placed by "customer@example.com"
Then I should see that customer's IP address is "127.0.0.1"

View file

@ -1,22 +0,0 @@
@checkout
Feature: Assigning customer's IP address to a placed order
In order to know from which IP address a new order has been places
As an Administrator
I want to have customer's IP address assigned to their orders
Background:
Given the store operates on a single channel in "United States"
And the store has a product "PHP T-Shirt" priced at "$19.99"
And the store ships everywhere for Free
And the store allows paying Offline
And there is an administrator "sylius@example.com" identified by "sylius"
And there is a customer account "customer@example.com" identified by "sylius"
And I am logged in as "customer@example.com"
@todo @ui
Scenario: Assigning customer's IP address to a newly placed order
Given I have product "PHP T-Shirt" in the cart
And I specified the billing address as "Ankh Morpork", "Frost Alley", "90210", "United States" for "Jon Snow"
And I proceed with "Free" shipping method and "Offline" payment
And I confirm my order
Then the administrator should know about IP address of this order made by "customer@example.com"