Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This document details how the MB Way Detailed payment error messagesfeature should be tested

...

Test Scope

...

Application

Description

Whitelabel

Whitelabel’s is where guests finish placing their orders, either it’s on mobile or the web.

Launch Darkly

Feature management platform that allows development teams to control and manage feature flags to release software updates safely and continuously.

Lokalise

Translation management platform that helps teams streamline the localization process for their software and content.

Admin app

Tool used by Support area to solve the customers’s request and complaints.

DOP

Tool used by Franchisee to management restaurants.Amplitude

Data Analytics

Out of Scope

Application

Description

POS

 

Won’t be tested as this application won’t be changed by this feature's development

Kiosk

Call Center

...

Test Deliverables

  • Test Plan (this document)

  • Test Cases

  • Bug Tasks

...

User Role

Description

User

User will be placing successful orders on Whitelabel

Developer user

User responsible for enabling :
Enabling the FF on the Launch Darkly (LD) and setting which cards are accepted for each brand and country

Traceability Matrix / Test Status

Scenario

Brand

Country

Test scenario

Test Execution Date

Test Status

1

BK

PT

Check if the MB Way new payment method is available on the dropdown

2

BK

PT

Check the MB Way icon

3

BK

PT

Check if submit form elements are displayed when the MB way method is selected

4

BK

PT

Check if submit form elements are NOT displayed when a different method than MB way is selected

5

BK

PT

Check submit form elements L&F

6

BK

PT

Check phone number imput validation

7

BK

PT

Check Continue button enable/disable

8

BK

PT

Check if the "Waiting payment" screen is displayed

9

BK

PT

Check the "Waiting payment" screen L&F

10

BK

PT

Check the count down animation

11

BK

PT

Check the confirmation order

12

BK

PT

Check new payment on Homeria

13

PLK

ES

Check new payment on DMP

14

BK

PT

Check new payment on DOP

15

BK

PT

Check new payment on Admin app tools

16

BK

PT

Unexisting phone number in MB Way

17

BK

PT

User refuses the payment on MB Way app

18

BK

PT

User does not accept / time expires

19

BK

PT

User just closes the WL app (keeping in background) and refuses the payment on MB Way app

20

BK

PT

User just closes the WL app (keeping in background) and does not accept / time expires the payment on MB Way app

21

BK

PT

User just closes the WL app (keeping in background) and open it again meanwhile the time is not expired

22

BK

PT

User just closes the WL app (keeping in background) and open it again meanwhile the time is not expired - Place the order

23

BK

PT

User kills the WL app and refuses the payment on MB Way app

24

BK

PT

User kills the WL app and does not accept / time expires the payment on MB Way app

25

BK

PT

User kills the WL app and open it again meanwhile the time is not expired

26

BK

PT

User kills the WL app and open it again meanwhile the time is not expired - Place the order

27

BK

PT

Check refund process via Admin Tools

28

BK

PT

Check partial refund process via Admin Tools

29

PLK

ES

Check refund process via DMP

30

BK

PT

Check demand translation - Lokalise

31

BK

PT

Check if the "Payment is processing" splash screen is NOT displayed in any flow of MB Way

32

BK

PT

Check if the MB Way option is not available when the FF is disabled

33

BK

PT

Check the MB Way option filter by storeID on the LD

Build and run the local environment and set the mocks

Analytics user

User responsible for checking the events on mParticle/Amplitude.

Whitelabel

General configs and pre-conditions:

Feature flags Intl Platform (backend):

  • disable-paycomet-pre-auth: this FF needs to be enabled with these configs:

...

  • enable-rbi-error-2: this FF need to be enabled with these configs:

...

Test Part 1:

The test cases in part 1 should be performed in local environment because we are going to need the translations to be manipulated in each variation scenario and we also need to create mocks to simulate the errors coming from the backend. To do this:

1- Setup and run locally the Intl-whitelabel-graphql

  • Mock the backend error:

Find this file: intl-whitelabel-graphql/src/functions/graphql/providers/payments.ts

Add the code below:

const ccc = '2';

errorPayload.code = `PAYMENT.${ccc}`;
errorPayload.rbiErrorCode = ccc;

When the const ccc = ''; here you can set the backend error that you want to simulate. E.g. 2.001, 2.100.001 and etc.

Image Added

2- Setup and run locally the Intl-whitelabel-frontend

  1. Edit the file src/utils/errors/index.ts

  • replace the existing code from line 238 by the 261 by the code below:

Code Block
export const getRbiErrorTranslation = ({
  errorCode,
  errorTranslation,
  defaultTranslationId,
  formatMessage,
}: IRbiErrorTranslation) => {
  const parsedErrorCodes = errorCode ? extractRbiErrorCodes(errorCode) : [];

  const foundTranslation = parsedErrorCodes.find(code => {
    const key = errorTranslation ? `error.${code}.${errorTranslation}` : `error.${code}`;
    return formatMessageMock({ id: key as TLocalizationKey }) !== key;
  });

  const getFormattedMessage = (translation: string) =>
    formatMessageMock({
      id: errorTranslation
        ? (`error.${translation}.${errorTranslation}` as TLocalizationKey)
        : (`error.${translation}` as TLocalizationKey),
    });

  return foundTranslation
    ? getFormattedMessage(foundTranslation)
    : formatMessageMock({ id: defaultTranslationId as TLocalizationKey });
};

  • Go to line 21 and add the code below:

Code Block
export const formatMessageMock = ({ id }: { id: string }) => {
  const keys: Record<string, string> = {
    'error.payment.title': 'Uh oh!',
    'error.payment.default': 'Something went wrong, please try again.',
    'error.payment.cta': 'Go back',
    'error.payment.2.001.title': 'Card type invalid',
    'error.payment.2.001.cta': 'Pay another way',
    'error.payment.2.001': 'Your card is not enabled to allow this payment at the moment. Please, contact your bank or try another payment method.',
  };

  return keys[id] ?? id;
};

  1. Now on this same part, add new variables and remove them according to the pre-conditions for each test case.

  2. Build and run the front end and access the local host.

  3. In order to simulate the error, you can use the specific credit card available by Paycomet on this document: https://docs.paycomet.com/en/recursos/testcards in the section Test Cards to force an error.

  4. You can use any code available on this document: https://docs.paycomet.com/en/recursos/codigos-de-error on the CVV field, it will not make a difference, because you already created a mock on backend.

Test case scenario part 1:

Test Part 2:

The objective of test part 2 is really validate the codes already implemented on the backend and check if the messages on the frontend are correct according to the map.

You can validate using the test environments and just in case you want to local it is necessary to remove any mocks applied.

Use Paycomet’s instructions to simulate some of the mapped errors. In this case, we need to use the CVV field and enter the code informed by Paycomet. The codes are available in this document.

Analytics

Test Part 3: