Table of Contents | ||
---|---|---|
|
...
DOP
Scenario 1:
...
As a user, I should see the new Edit Payment Method form on the Payment method edit page
Code Block | ||
---|---|---|
| ||
Feature: DetailedAllow paymentPayment errormethods messagesby featureDOP Background: WhitelabelDOP HomepageRestaurants Given I have accessed Whitelabel'sDOP HomeRestaurants Page Scenario Outline: As an user I should see the correctnew Edit titlePayment messageMethod whenform allon the errorsPayment aremethod mappededit onpage the Lokalise Given I haveselect alla therestaurant errors mapped on the LokaliseWhen I access the |error.payment.title Payment method edit page Then I should see the new Edit Payment Method form on the left side following the Figma's design. |
Scenario 2: As a user I should see the elements on the Edit Payment Method form
Code Block | ||
---|---|---|
| ||
Feature: Allow Payment |error.payment.2.title methods by DOP Background: DOP Restaurants Given I |error.payment.2.100.title have accessed DOP Restaurants Page Scenario: As an user I should see |error.payment.2.100.001.title the elements on the Edit Payment Method form Given |I select a restaurant |Translation for the error error.payment.title |Translation for the error 2 Title |Translation for the error 2.100 Title |Translation for the error 2.100.001 Title|When I access the Payment method edit page Then I should I should see the <lements> on the Edit Payment Method form |Translationelements for the error error.payment.title |Translation for the error 2 Title |Translation for the error 2.100 Title |Translation for the error 2.100.001 Title| |Translation for the error error.payment.title |Translation for the error 2 Title |Translation for the error 2.100 Title |Translation for the error 2.100.001 Title| And I simulate the error <simulate_error> When| I attempt to place a new order Then I should be see the modal with the <title_message>|Activate/Desactivated Delivery Offline Payment Methods title | Examples: |Dolar sign |simulate_error |title_message | |2.100.001 |Translation for the error 2.100.001 Title|Activate or Desactivated Offline payment methods for delivery orders. |2.100subtitle| |Payment methods title |Translation for the error 2.100 Title | |2 |Translation for the error 2 Title | |
Scenario 2: [Split logic][Non-mapped errors][Title message] Validate the different levels of error messages on the title message when some errors are NOT mapped on the Lokalise file
Code Block | ||
---|---|---|
| ||
Feature: Detailed payment error messages feature Background: Whitelabel Homepage |Payment methods activate and desactivate controls Given I have accessed Whitelabel's Home Page Scenario Outline: As an user I should see the correct title message when some errors are NOT mapped on the Lokalise | |
Scenario 3: As a user I should see the default value as null on all the active/inactive payment methods listed
Code Block | ||
---|---|---|
| ||
Feature: Allow Payment methods by DOP Background: DOP Restaurants Given I do not have allaccessed theDOP errorsRestaurants mappedPage on the LokaliseScenario: As an user |error.payment.title I should see the default value as null on all the active/inactive payment methods listed Given I select a restaurant |error.payment.2.title When I access the Payment method edit page Then I |error.payment.2.100.title |error.payment.2.100.001.title | |Translation for the error error.payment.title |Translation for the error 2 Title |Translation for the error 2.100 Title |null | |Translation for the error error.payment.title |Translation for the error 2 Title |null |null | |Translation for the error error.payment.title |null |null |null | |Translation for the error error.payment.title |Translation for the error 2 Title |null |Translation for the error 2.100.001 Title| |Translation for the error error.payment.title |null |null |Translation for the error 2.100.001 Title| |Translation for the error error.payment.title |null |Translation for the error 2.100 Title |Translation for the error 2.100.001 Title|should see the default value as null on all the active/inactive payment methods listed |
Scenario 4: As a user I want to activate a payment method for one restaurant
Code Block | ||
---|---|---|
| ||
Feature: Allow Payment methods by DOP
Background: DOP Restaurants
Given I have accessed DOP Restaurants Page
Scenario: As an user I want to activate a payment method for one restaurant
Given I select a restaurant
And I access the Payment method edit page
And I activate a payment method
When I click on save
Then I should see the activated payment methods on Sanity for that restaurant |
Scenario 5: As a user I want to activate two or more payment methods for one restaurant
Code Block | ||
---|---|---|
| ||
Feature: Allow Payment methods by DOP
Background: DOP Restaurants
Given I have accessed DOP Restaurants Page
Scenario: As an user I want to activate two or more payment methods for one restaurant
Given I select a restaurant
And I access the Payment method edit page
And I activate two or more payment method
When I click on save
Then I should see the activated payment methods on Sanity for that restaurant |
Scenario 6: As a user I want to inactivate a payment method for one restaurant
Code Block | ||
---|---|---|
| ||
Feature: Allow Payment methods by DOP
Background: DOP Restaurants
Given I have accessed DOP Restaurants Page
Scenario: As an user I want to inactivate a payment method for one restaurant
Given I select a restaurant
And I access the Payment method edit page
And I inactivate a payment method
When I click on save
Then I should see the inactivated payment methods on Sanity for that restaurant |
Scenario 7: As a user I want to inactivate two or more payment methods for one restaurant
Code Block | ||
---|---|---|
| ||
Feature: Allow Payment methods by DOP
Background: DOP Restaurants
Given I have accessed DOP Restaurants Page
Scenario: As an user I want to inactivate two or more payment methods for one restaurant
Given I select a restaurant
And I access the Payment method edit page
And I inactivate two or more payment method
When I click on save
Then I should see the inactivated payment methods on Sanity for that restaurant |
Scenario 8: As a user I want to activate a payment method and inactivate another one for one restaurant
Code Block | ||
---|---|---|
| ||
Feature: Allow Payment methods by DOP Background: DOP Restaurants Given I have accessed DOP Restaurants Page Scenario: As an user I want to activate a payment method and inactivate another one for one restaurant Given I select a restaurant And I access the Payment method edit page And I activate a payment method And I simulateinactivate theanother errorpayment <simulate_error>method When I attemptclick toon placesave a new order Then I should be see the modalactivated withpayment themethod <title_message>on Sanity for that restaurant And Examples:I should see the inactivated payment method on Sanity |simulate_error |title_message for that restaurant |
Scenario 9: As a user I want to activate a payment method for a restaurant group
Code Block | ||
---|---|---|
| ||
Feature: Allow Payment methods by DOP Background: DOP Restaurants Given I have accessed DOP Restaurants Page Scenario: As an user I want to |activate a payment method for a restaurant group |2.100.001 Given I select |Translationa forrestaurant thegroup error 2.100 Title And I access the Payment method |edit page And I |2.100.001 activate a payment method |Translation forWhen theI errorclick 2on Titlesave Then I should see the activated payment |methods on Sanity for all the restaurants that |2.100.001 |Translation for the error error.payment.title| |2.100 are related to the group |
Scenario 10: As a user I want to activate a payment method for a large amount of restaurants
Code Block | ||
---|---|---|
| ||
Feature: Allow Payment methods by DOP Background: DOP Restaurants Given I have accessed |TranslationDOP forRestaurants thePage error 2 TitleScenario: As an user I want to activate a payment method for |a large amount of restaurants |2.100Given I select a a large amount of restaurants |Translation forAnd I access the error error.payment.title| Payment method edit page And I activate a payment method When I click on |2save Then I should see the activated payment methods on |TranslationSanity for all the error error.payment.title|restaurants |
Scenario
...
11: As a user I want to activate a payment method and inactivate another one for a large amount of restaurants
Code Block | ||
---|---|---|
| ||
Feature: DetailedAllow paymentPayment errormethods messagesby featureDOP Background: WhitelabelDOP HomepageRestaurants Given I have accessed Whitelabel'sDOP HomeRestaurants Page Scenario Outline: As an user I shouldwant seeto theactivate correcta messagepayment descriptionmethod whenand allinactivate theanother errorsone arefor mappeda onlarge theamount of Lokaliserestaurants Given I have all select a big ammount of the errorsrestaurants mapped on the Lokalise And I access |error.payment.default the Payment method edit page And I activate a payment method And I inactivate another payment method |error.payment.2 When I click on save Then I should see the activated |error.payment.2.100 method on Sanity for all the restaurants And I |error.payment.2.100.001 | |Translation for the error error.payment.default |Translation for the error 2 |Translation for the error 2.100 |Translation for the error 2.100.001 | |Translation for the error error.payment.default |Translation for the error 2 |Translation for the error 2.100 |Translation for the error 2.100.001 | |Translation for the error error.payment.default |Translation for the error 2 |Translation for the error 2.100 |Translation for the error 2.100.001 | And I simulate the error <simulate_error> When I attempt to place a new order Then I should be see the modal with the <message_description> Examples: |simulate_error |message_description | |2.100.001 |Translation for the error 2.100.001| |2.100 |Translation for the error 2.100 | |2 |Translation for the error 2 | |
Scenario 4: [Split logic][Non-mapped errors][Message description] Validate the different levels of error messages on the message description when some errors are NOT mapped on the Lokalise file
Code Block | ||
---|---|---|
| ||
Feature: Detailed payment error messages feature
Background: Whitelabel Homepage
Given I have accessed Whitelabel's Home Page
Scenario Outline: As an user I should see the correct message description when some errors are NOT mapped on the Lokalise
Given I do not have all the errors mapped on the Lokalise
|error.payment.default |error.payment.2 |error.payment.2.100 |error.payment.2.100.001 |
|Translation for the error error.payment.default |Translation for the error 2 |Translation for the error 2.100 |null |
|Translation for the error error.payment.default |Translation for the error 2 |null |null |
|Translation for the error error.payment.default |null |null |null |
|Translation for the error error.payment.default |Translation for the error 2 |null |Translation for the error 2.100.001|
|Translation for the error error.payment.default |null |null |Translation for the error 2.100.001|
|Translation for the error error.payment.default |null |Translation for the error 2.100 |Translation for the error 2.100.001|
And I simulate the error <simulate_error>
When I attempt to place a new order
Then I should be see the modal with the <message_description>
Examples:
|simulate_error |message_description |
|2.100.001 |Translation for the error 2.100 |
|2.100.001 |Translation for the error 2 |
|2.100.001 |Translation for the error error.payment.default|
|2.100 |Translation for the error 2 |
|2.100 |Translation for the error error.payment.default|
|2 |Translation for the error error.payment.default| |
Scenario 5: [Split logic][Mapped errors][Modal cta] Validate the different levels of error messages on the modal cta when all the errors are mapped on the Lokalise file
Code Block | ||
---|---|---|
| ||
Feature: Detailed payment error messages feature
Background: Whitelabel Homepage
Given I have accessed Whitelabel's Home Page
Scenario Outline: As an user I should see the correct modal cta when all the error are mapped on the Lokalise
Given I have all the errors mapped on the Lokalise
|error.payment.cta |error.payment.2.cta |error.payment.2.100.cta |error.payment.2.100.001.cta |
|Translation for the error error.payment.cta |Translation for the error 2 cta |Translation for the error 2.100 cta |Translation for the error 2.100.001 cta|
|Translation for the error error.payment.cta |Translation for the error 2 cta |Translation for the error 2.100 cta |Translation for the error 2.100.001 cta|
|Translation for the error error.payment.cta |Translation for the error 2 cta |Translation for the error 2.100 cta |Translation for the error 2.100.001 cta|
And I simulate the error <simulate_error>
When I attempt to place a new order
Then I should be see the modal with the <modal_cta>
Examples:
|simulate_error |modal_cta |
|2.100.001 |Translation for the error 2.100.001 cta|
|2.100 |Translation for the error 2.100 cta |
|2 |Translation for the error 2 cta | |
Scenario 6: [Split logic][Non-mapped errors][Modal cta] Validate the different levels of error messages on the modal cta when some errors are NOT mapped on the Lokalise
Code Block | ||
---|---|---|
| ||
Feature: Detailed payment error messages feature
Background: Whitelabel Homepage
Given I have accessed Whitelabel's Home Page
Scenario Outline: As an user I should see the correct modal cta when some errors are NOT mapped on the Lokalise
Given I do not have all the errors mapped on the Lokalise
|error.payment.cta |error.payment.2.cta |error.payment.2.100.cta |error.payment.2.100.001.cta |
|Translation for the error error.payment.cta |Translation for the error 2 cta |Translation for the error 2.100 cta |null |
|Translation for the error error.payment.cta |Translation for the error 2 cta |null |null |
|Translation for the error error.payment.cta |null |null |null |
|Translation for the error error.payment.cta |Translation for the error 2 cta |null |Translation for the error 2.100.001 cta|
|Translation for the error error.payment.cta |null |null |Translation for the error 2.100.001 cta|
|Translation for the error error.payment.cta |null |Translation for the error 2.100 cta |Translation for the error 2.100.001 cta|
And I simulate the error <simulate_error>
When I attempt to place a new order
Then I should be see the modal with the <modal_cta>
Examples:
|simulate_error |title_message |
|2.100.001 |Translation for the error 2.100 cta |
|2.100.001 |Translation for the error 2 cta |
|2.100.001 |Translation for the error error.payment.cta|
|2.100 |Translation for the error 2 cta |
|2.100 |Translation for the error error.payment.cta|
|2 |Translation for the error error.payment.cta| |
Scenario 7: [Mapped errors] Validate title error, modal description and modal cta according to the mapped errors on the Lokalise
Code Block | ||
---|---|---|
| ||
Feature: Detailed payment error messages feature
Background: Whitelabel Homepage
Given I have accessed Whitelabel's Home Page
Scenario Outline: As an user I should see the correct title error, modal description and modal cta according to the mapped errors on the Lokalise
Given I have all the errors mapped on the Lokalise
And I simulate the error <simulate_error>
When I attempt to place a new order
Then I should be see the modal with the <title_message>, the <message_description> and the <modal_cta>
Examples:
|simulate_error |title_message |message_description |modal_cta |
|2.100 |Card type invalid |Your card is not enabled to allow this payment at the moment. Please, contact your bank or try another payment method. |Pay another way |
|2.100.001 |Validation error |The payment transaction was declined. Please check the card name, card number, CVV, expire date and try again. |Review Informations |
|2.101.001 |Identity error |Sorry, we were unable to verify the cardholder's identity. Please authorize payment and try again. |Go back |
|2.101.002 |Something went wrong |Sorry, we are unable to process this payment. Please use another payment method. |Go back |
|2.102.002 |Location Invalid |Sorry, we had a problem related to your location and this store. Please choose a nearest store and try again. |Choose another Store|
|2.102.003 |Order limit exceeded |You have exceeded the number of attempts to place an order. Please try again later. |Go back | |
Scenario 8: [Regression testing] Validate if the layout and responsive were kept on the existing error modal
Code Block | ||
---|---|---|
| ||
Feature: Detailed payment error messages feature
Background: Whitelabel Homepage
Given I have accessed Whitelabel's Home Page
Scenario Outline: As an user I should see that the correct layout and responsive were kept on the existing error modal
Given I have all the errors mapped on the Lokalise
And I simulate the error <simulate_error> on the platform <platform_browser>
When I attempt to place a new order
Then I should be see the layout and responsive being kept on the existing error modal
Examples:
|simulate_error |platform |
|2.100 |Chrome desktop|
|2.002 |Safari desktop|
|2.003 |Android app |
|2.100 |iPhone app | |
Scenario 9: [Regression testing] Validate if the cta on the modal redirects the user to the cart page and the order is not placed
Code Block | ||
---|---|---|
| ||
Feature: Detailed payment error messages feature
Background: Whitelabel Homepage
Given I have accessed Whitelabel's Home Page
Scenario Outline: As an user I should see the cta on the modal redirects the user to the cart page and the order is not placed
Given I have all the errors mapped on the Lokalise
And I simulate the error <simulate_error>
When I click on the modal error cta
Then I should be redirect to the cart page
And I should not see my order being placed
Examples:
|simulate_error |
|2.100 |
|2.002 |
|2.003 |
|2.100 | |
Scenario 10: [Mapped errors] Validate the modal using a different language according to the translation available on the Lokalise
Code Block | ||
---|---|---|
| ||
Feature: Detailed payment error messages feature
Background: Whitelabel Homepage
Given I have accessed Whitelabel's Home Page
And I have the content of the error "2.100" translated to another language, e.g. Portuguese available on the Lokalise
Scenario Outline: As an user I should see the content of the modal with the correct translation according to the Lokalise
Given I set PT language on Whitelabel
When I simulate the error "2.100"
Then I should be the title, the description and the cta according to the values available on Lokalise
|
Scenario 11: [Mapped errors] Validate the modal using a different language when the content is not available on the Lokalise
Code Block | ||
---|---|---|
| ||
Feature: Detailed payment error messages feature
Background: Whitelabel Homepage
Given I have accessed Whitelabel's Home Page
And I do not have the content of the error "2.100" translated to another language available on the Lokalise
Scenario Outline: As an user I should see the content of the modal with the default language (English)
Given I set the ES language on Whitelabel
When I simulate the error "2.100"
Then I should be the title, the description and the cta according to the default language (English) available on the Lokalise |
Analytics
Scenario 12: [Analytics] Validate if the attributes were added to the existing modal appearance event
Code Block | ||
---|---|---|
| ||
Feature: Detailed payment error messages feature Background: Whitelabel Homepage Given I have accessed Whitelabel's Home Page Scenario Outline: As analytics user I should see the attributes added on the existing modal appearance event Given I have all the errors mapped on the Lokalise And I simulate the error <simulate_error> And I attempt to place a new order When the modal error is displayed Then I should see the attributes added on the existing Modal Appearance event to the Amplitude: custom_event_type: others, ModalHeader <modal_header>, ModalMessage <modal_message> and Source Page: /cart/payment Examples: |simulate_error |modal_header |modal_message | |2.100 |Card type invalid |Your card is not enabled to allow this payment at the moment. Please, contact your bank or try another payment method. | |2.100.001 |Validation error |The payment transaction was declined. Please check the card name, card number, CVV, expire date and try again. | |2.102.003 |Order limit exceeded |You have exceeded the number of attempts to place an order. Please try again later. should see the inactivated payment method on Sanity for all the restaurants |
Whitelabel
Scenario 12: As a user I do NOT want to see the payment methods that are null for a restaurant on WL
Code Block | ||
---|---|---|
| ||
Feature: Allow Payment methods by DOP
Background: DOP Restaurants
Given I have accessed DOP Restaurants Page
Scenario: As an user I do NOT want to see the payment methods that are null for a restaurant on WL
Given I have the follow payment methods as null for a restaurant
|activate-payment-methods|
|Cash | |
Scenario 13: [Analytics] Validate if an attribute was removed on the existing modal appearance and if an attribute is being sent as "null”
Code Block | ||
---|---|---|
| ||
Feature: Detailed payment error messages feature |Ticket Background:Restaurant Whitelabel Homepage Given| I have accessed Whitelabel's Home Page |Sodexo Scenario Outline: As analytics user I should see the attributes removed on the existing modal appearance event| GivenAnd I havego allto the errorsWL mappedand onselect the Lokaliserestaurant that has the payment Andmethods Ias simulatenull the error <simulate_error> When I go Andto Ithe attemptpayment toscreen place a new order Then I should NOT Whensee the modal error is displayed payment methods available on the dropdown Then I should see the attribute removed on the existing Modal Appearance event to the Amplitude: Message|activate-payment-methods| |Cash Then I should see the attribute as| null on the existing Modal Appearance event|Ticket toRestaurant the Amplitude: MessageErrorMessage | Examples:|Sodexo |simulate_error | |2.100 | | |
Scenario 13: As a user I want to see the payment methods that are activated for a restaurant on WL
Code Block | ||
---|---|---|
| ||
Feature: Allow Payment methods by DOP Background: DOP Restaurants Given |2.100.001 | |2.102.003 | |
Scenario 14: [Analytics] Validate if the new custom event “Error” is being triggered when the modal is displayed
Code Block | ||
---|---|---|
| ||
Feature: Detailed payment error messages feature Background: Whitelabel HomepageI have accessed DOP Restaurants Page Scenario: As an user I want to see the payment methods that are activated for a restaurant on WL Given I have accessed Whitelabel's Home Page Scenario Outline: As analytics user I should see new custom event when the error modal is displayedthe follow activated payment methods for a restaurant |activate-payment-methods| |Cash Given I have all the errors| mapped on the Lokalise |Ticket Restaurant And I simulate the error <simulate_error> | And I attempt to|Sodexo place a new order When the modal error is displayed | Then I should see newAnd customI eventgo whento the errorWL modaland isselect displayedthe torestaurant thethat Amplitude: event_name: Error, custom_event_type: others, Error Code <simulate_error> , Name <name>, Source Page: /cart/payment, Response Title <response_title>, Response Description <response_description> Examples:has the activated payment methods When I go to the payment screen Then I should see the activated payment methods available on the dropdown |activate-payment-methods| |simulate_error |name |Cash | |response_titleTicket Restaurant | |response_description |Sodexo | |
Scenario 14: As a user I do NOT want to see the payment methods that are inactivated for a restaurant on WL
Code Block | ||
---|---|---|
| ||
Feature: Allow Payment methods by DOP Background: DOP Restaurants Given I have accessed DOP Restaurants Page Scenario: As an user I do NOT want to see the payment methods that are inactivated for a restaurant on WL Given I have the follow inactivated payment methods for a restaurant |activate-payment-methods| |2.100 |Cash |General external validation error|Card type invalid |Your card is not| enabled to allow this payment at the|Ticket moment.Restaurant Please, contact your bank or try another| payment method. | |Sodexo |2.100.001 |General card error | And I go to the |ValidationWL errorand select the restaurant that has the |Theinactivated payment transactionmethods was declined. PleaseWhen checkI thego cardto name,the cardpayment number,screen CVV, expire date and tryThen again.I should NOT see the inactivated payment methods available |on the dropdown |2.102.003activate-payment-methods| |GeneralCash payment restriction error|Order limit exceeded |You have exceeded the number of attempts to place an order.| Please try again later. |Ticket Restaurant | |Sodexo | |
Scenario 15:
...
As a user I do NOT want to see the payment methods that are activated but the feature flags disabled for a restaurant on WL
Code Block | ||
---|---|---|
| ||
Feature: DetailedAllow paymentPayment errormethods messagesby featureDOP Background: WhitelabelDOP HomepageRestaurants Given I have accessed Whitelabel'sDOP HomeRestaurants Page Scenario: As Andan user I havedo NOT thewant contentto ofsee the error "2.100" translated to another language, e.g. Portuguese available on the Lokalise Scenario Outline: As an user I should see the content of the modal with the correct translation according to the Lokalisepayment methods that are activated but the feature flags disabled for a restaurant on WL Given I have the follow payment methods as activated for a restaurant Given I set PT language on Whitelabel |activate-payment-methods| |Cash When I simulate the error "2.100" Then I should be the title, the description| and the cta according to the values|Ticket availableRestaurant on Lokalise |
Scenario 16: [Analytics] Validate the modal using a different language according to the translation available on the Lokalise
Code Block | ||
---|---|---|
| ||
Feature: Detailed payment error messages| feature Background: Whitelabel Homepage |Sodexo Given I have accessed Whitelabel's Home Page And I have the| content of the error "2.100" translated to another language, e.g. Portuguese availableAnd I have the Features flags as disabled on the LokaliseLaunch Darkly Scenario Outline: As an userAnd I shouldgo seeto the contentWL and ofselect the modalrestaurant that withhas the correct translation according to the Lokalise Given I set PT language on Whitelabel When I simulate the error "2.100"payment methods as activated When I go to the payment screen Then I should NOT see the payment methods available on the dropdown Then I should see on the modal appearance the attributes ModalHeader and Modal Message with the values translated according to available on the Lokalise. |activate-payment-methods| |Cash And| I should see on the Error event|Ticket theRestaurant attributes Response Title and Response Description being| sent according to the values translated. |Sodexo And I should see on the Error even the attribute Name being sent in English| |