@12-apps/payments-e2e 2.6.0 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -7
- package/dist/helpers/checkout.d.ts +13 -1
- package/dist/helpers/checkout.d.ts.map +1 -1
- package/dist/helpers/checkout.js +18 -3
- package/dist/helpers/checkout.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/steps/carteira.steps.js +53 -14
- package/dist/steps/carteira.steps.js.map +1 -1
- package/dist/steps/compra.steps.js +11 -2
- package/dist/steps/compra.steps.js.map +1 -1
- package/dist/steps/guia.steps.js +24 -4
- package/dist/steps/guia.steps.js.map +1 -1
- package/dist/steps/reconexao.steps.js +20 -16
- package/dist/steps/reconexao.steps.js.map +1 -1
- package/dist/world.d.ts +55 -5
- package/dist/world.d.ts.map +1 -1
- package/dist/world.js.map +1 -1
- package/features/a-compra-sobrevive-ao-primeiro-provedor.feature +1 -0
- package/features/comprando-com-apple-pay.feature +13 -12
- package/features/comprando-com-cartao.feature +2 -0
- package/features/comprando-com-google-pay.feature +14 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,11 +4,15 @@ The buyer journeys for the payments checkout, as Gherkin you run **against your
|
|
|
4
4
|
own app**.
|
|
5
5
|
|
|
6
6
|
Mounting `createPaymentFlows` gives you a checkout. This gives you its
|
|
7
|
-
end-to-end coverage:
|
|
7
|
+
end-to-end coverage: thirty-six scenarios across thirteen features — PIX, card,
|
|
8
8
|
digital wallets, hosted hand-off and return, provider failover, issuer
|
|
9
9
|
declines, an unresolved charge, a store that cannot charge at all,
|
|
10
|
-
per-provider screens,
|
|
11
|
-
|
|
10
|
+
per-provider screens, saving a card outside checkout, activating a provider
|
|
11
|
+
with a verification charge, a dead OAuth grant and its reconnection, and a
|
|
12
|
+
setup guide that speaks in the host platform's name. A further five scenarios
|
|
13
|
+
in two features cover the platform-operations surface, behind their own
|
|
14
|
+
opt-in port ([below](#the-platform-operations-journeys-opt-in)) — forty-one in
|
|
15
|
+
all. You implement one port and add three lines of config. Nothing is copied, so a scenario added here
|
|
12
16
|
later runs in your app on the next version bump.
|
|
13
17
|
|
|
14
18
|
## Why a port at all
|
|
@@ -35,8 +39,12 @@ definePaymentsWorld({
|
|
|
35
39
|
raiseHostedPayable: async (page) => { /* …and wait for the interstitial */ },
|
|
36
40
|
returnFromProvider: async (page) => { /* a real return trip */ },
|
|
37
41
|
hostedReturnStatus: (page) => page.getByTestId('…'),
|
|
38
|
-
|
|
39
|
-
|
|
42
|
+
authorizeOAuth: async (page) => { /* play the provider's consent screen */ },
|
|
43
|
+
fixtures: { headProvider, tailProvider, hostedUrlFragment, payableRef, taxId, platformBrand, oauthProvider },
|
|
44
|
+
wire: {
|
|
45
|
+
paths, chargeKeys, chargeBody, tokensByProvider, providerCharges, providerChargeCount, navigated,
|
|
46
|
+
connectionStatus, connectionEnabled, rotation,
|
|
47
|
+
},
|
|
40
48
|
});
|
|
41
49
|
```
|
|
42
50
|
|
|
@@ -76,6 +84,15 @@ which is worse than a red one.
|
|
|
76
84
|
- **Assert your journey count.** Whatever the mechanism, put a check somewhere
|
|
77
85
|
that the number of scenarios you expect actually ran.
|
|
78
86
|
|
|
87
|
+
### What `open` must leave on screen
|
|
88
|
+
|
|
89
|
+
For a checkout shape, `open` returns with the buyer **on the Dados step**, the
|
|
90
|
+
store's checkout config already resolved, and every field the chain requires
|
|
91
|
+
filled in **except the CPF** — the packaged steps type the CPF when the form
|
|
92
|
+
asks for one, and press Continuar. Which other fields a chain requires (a mobile
|
|
93
|
+
phone, a name, an e-mail) is a fact about the store you built. A buyer with a
|
|
94
|
+
CPF on file skips Dados entirely, so do not arrive with one.
|
|
95
|
+
|
|
79
96
|
## `PaymentsStore` — the shapes a scenario asks for
|
|
80
97
|
|
|
81
98
|
A scenario names a kind of merchant; you decide how to produce one. A harness
|
|
@@ -87,12 +104,12 @@ files do not change either way.
|
|
|
87
104
|
`no-provider-remedy` · `payments-off` · `two-mintable` · `redirect-head` ·
|
|
88
105
|
`google-pay` · `apple-pay` · `apple-pay-unsupported` · `wallet` ·
|
|
89
106
|
`activation` · `screen-on-page` · `screen-handoff` · `screen-undeclared` ·
|
|
90
|
-
`screen-unknown`
|
|
107
|
+
`screen-unknown` · `setup-guide` · `reconnect-required`
|
|
91
108
|
|
|
92
109
|
Adding a member is a breaking change for hosts, deliberately: a scenario needing
|
|
93
110
|
a store nobody can build is a scenario that silently never runs.
|
|
94
111
|
|
|
95
|
-
`wallet` (added for FUT-183/FUT-478) is one of
|
|
112
|
+
`wallet` (added for FUT-183/FUT-478) is one of the members that are **not a
|
|
96
113
|
checkout**: `open(page, 'wallet')` must land the buyer on the package's
|
|
97
114
|
manage-cards surface (`screens.ManageCards` from `createPaymentFlows`) at a
|
|
98
115
|
store whose single provider can vault — the chain head declares the adapter
|
|
@@ -36,6 +36,18 @@ export declare function fillCard(page: Page, pan?: string): Promise<void>;
|
|
|
36
36
|
export declare function chooseCard(page: Page): Promise<void>;
|
|
37
37
|
/** Press the pay bar and wait for the submit to have actually left. */
|
|
38
38
|
export declare function payCard(page: Page): Promise<void>;
|
|
39
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* Walk the Dados step and land on Pagamento.
|
|
41
|
+
*
|
|
42
|
+
* The CPF is typed only when the form ASKS for it (FUT-3627). The Dados step
|
|
43
|
+
* renders the fields the store's chain declares, and a chain whose providers
|
|
44
|
+
* need no tax id — InfinitePay's hosted checkout is one — renders no
|
|
45
|
+
* `buyer-cpf` at all. Demanding it made every hand-off journey unreachable in
|
|
46
|
+
* a real host; only the harness, whose hosted store declared a CPF it did not
|
|
47
|
+
* need, could walk past it.
|
|
48
|
+
*
|
|
49
|
+
* Whatever ELSE the form asks for is the host's to have filled in `open`:
|
|
50
|
+
* which fields a provider requires is a fact about the store, not the buyer.
|
|
51
|
+
*/
|
|
40
52
|
export declare function reachPayment(page: Page): Promise<void>;
|
|
41
53
|
//# sourceMappingURL=checkout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkout.d.ts","sourceRoot":"","sources":["../../src/helpers/checkout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAErD;;;;;;;;;;;;;GAaG;AAEH,gFAAgF;AAChF,eAAO,MAAM,SAAS,mBAAmB,CAAC;AAE1C,6EAA6E;AAC7E,eAAO,MAAM,QAAQ,wBAAwB,CAAC;AAE9C,+EAA+E;AAC/E,eAAO,MAAM,WAAW,wBAAwB,CAAC;AAKjD;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,YAAY,CAAC;AAE3C,iCAAiC;AACjC,wBAAsB,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,GAAE,MAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAEhF;AAED,2DAA2D;AAC3D,wBAAsB,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,GAAE,MAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAKhF;AAED,6EAA6E;AAC7E,wBAAsB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAG1D;AAED,uEAAuE;AACvE,wBAAsB,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAEvD;AAED
|
|
1
|
+
{"version":3,"file":"checkout.d.ts","sourceRoot":"","sources":["../../src/helpers/checkout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAErD;;;;;;;;;;;;;GAaG;AAEH,gFAAgF;AAChF,eAAO,MAAM,SAAS,mBAAmB,CAAC;AAE1C,6EAA6E;AAC7E,eAAO,MAAM,QAAQ,wBAAwB,CAAC;AAE9C,+EAA+E;AAC/E,eAAO,MAAM,WAAW,wBAAwB,CAAC;AAKjD;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,YAAY,CAAC;AAE3C,iCAAiC;AACjC,wBAAsB,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,GAAE,MAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAEhF;AAED,2DAA2D;AAC3D,wBAAsB,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,GAAE,MAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAKhF;AAED,6EAA6E;AAC7E,wBAAsB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAG1D;AAED,uEAAuE;AACvE,wBAAsB,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAEvD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAK5D"}
|
package/dist/helpers/checkout.js
CHANGED
|
@@ -50,9 +50,24 @@ export async function chooseCard(page) {
|
|
|
50
50
|
export async function payCard(page) {
|
|
51
51
|
await page.getByTestId('card-pay').click();
|
|
52
52
|
}
|
|
53
|
-
/**
|
|
53
|
+
/**
|
|
54
|
+
* Walk the Dados step and land on Pagamento.
|
|
55
|
+
*
|
|
56
|
+
* The CPF is typed only when the form ASKS for it (FUT-3627). The Dados step
|
|
57
|
+
* renders the fields the store's chain declares, and a chain whose providers
|
|
58
|
+
* need no tax id — InfinitePay's hosted checkout is one — renders no
|
|
59
|
+
* `buyer-cpf` at all. Demanding it made every hand-off journey unreachable in
|
|
60
|
+
* a real host; only the harness, whose hosted store declared a CPF it did not
|
|
61
|
+
* need, could walk past it.
|
|
62
|
+
*
|
|
63
|
+
* Whatever ELSE the form asks for is the host's to have filled in `open`:
|
|
64
|
+
* which fields a provider requires is a fact about the store, not the buyer.
|
|
65
|
+
*/
|
|
54
66
|
export async function reachPayment(page) {
|
|
55
|
-
|
|
56
|
-
await
|
|
67
|
+
const proceed = page.getByTestId('checkout-continue');
|
|
68
|
+
await expect(proceed).toBeVisible();
|
|
69
|
+
if ((await page.getByTestId('buyer-cpf').count()) > 0)
|
|
70
|
+
await fillCpf(page);
|
|
71
|
+
await proceed.click();
|
|
57
72
|
}
|
|
58
73
|
//# sourceMappingURL=checkout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkout.js","sourceRoot":"","sources":["../../src/helpers/checkout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAa,MAAM,kBAAkB,CAAC;AAErD;;;;;;;;;;;;;GAaG;AAEH,gFAAgF;AAChF,MAAM,CAAC,MAAM,SAAS,GAAG,gBAAgB,CAAC;AAE1C,6EAA6E;AAC7E,MAAM,CAAC,MAAM,QAAQ,GAAG,qBAAqB,CAAC;AAE9C,+EAA+E;AAC/E,MAAM,CAAC,MAAM,WAAW,GAAG,qBAAqB,CAAC;AAEjD,4EAA4E;AAC5E,MAAM,iBAAiB,GAAG,OAAO,CAAC;AAElC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,SAAS,CAAC;AAE3C,iCAAiC;AACjC,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,IAAU,EAAE,MAAc,SAAS;IAC/D,MAAM,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAChD,CAAC;AAED,2DAA2D;AAC3D,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,IAAU,EAAE,MAAc,QAAQ;IAC/D,MAAM,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAChD,MAAM,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IAC7D,MAAM,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,I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+1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,aAAa,GACnB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEnF;;;;;;GAMG;AACH,OAAO,EACL,2BAA2B,EAC3B,qBAAqB,EACrB,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,GAC9B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC5B,qBAAqB,GACtB,MAAM,YAAY,CAAC;AAEpB;;;;GAIG;AACH,OAAO,EACL,UAAU,EACV,WAAW,EACX,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,SAAS,GACV,MAAM,uBAAuB,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,OAAO,EACL,mBAAmB,EACnB,aAAa,GAKd,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEnF;;;;;;GAMG;AACH,OAAO,EACL,2BAA2B,EAC3B,qBAAqB,GAItB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC5B,qBAAqB,GACtB,MAAM,YAAY,CAAC;AAEpB;;;;GAIG;AACH,OAAO,EACL,UAAU,EACV,WAAW,EACX,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,SAAS,GACV,MAAM,uBAAuB,CAAC"}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { expect } from '@playwright/test';
|
|
2
|
+
import { VALID_CPF, fillCard } from '../helpers/checkout.js';
|
|
2
3
|
import { paymentsWorld } from '../world.js';
|
|
3
4
|
import { Given, Then, When } from './fixtures.js';
|
|
4
5
|
/**
|
|
5
|
-
* PAYING WITH A DIGITAL WALLET (FUT-471
|
|
6
|
+
* PAYING WITH A DIGITAL WALLET (FUT-471, FUT-472, FUT-3685).
|
|
6
7
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* wallet
|
|
10
|
-
*
|
|
8
|
+
* A wallet store opens on the ONE list (`paymentList`): the CPF asked once at
|
|
9
|
+
* the top, then "PAGAMENTO RÁPIDO" — the wallet buttons — above the rows. The
|
|
10
|
+
* wallet is not a fourth method: its press opens the sheet and raises a CARD
|
|
11
|
+
* order behind it, and never changes the chosen row. A store that does NOT
|
|
12
|
+
* declare a wallet may still be a tabs checkout, so the steps that assert an
|
|
13
|
+
* absence look for both shapes of the button.
|
|
11
14
|
*
|
|
12
15
|
* The button element itself is rendered by the wallet's own script (brand
|
|
13
16
|
* rules), inside the package's `google-pay-button` container — a host
|
|
@@ -25,23 +28,59 @@ Given('a compradora abre o checkout de uma loja com Apple Pay', async ({ page })
|
|
|
25
28
|
Given('a compradora abre o checkout da loja com Apple Pay num aparelho sem Apple Pay', async ({ page }) => {
|
|
26
29
|
await paymentsWorld().open(page, 'apple-pay-unsupported');
|
|
27
30
|
});
|
|
28
|
-
When('ela
|
|
29
|
-
|
|
31
|
+
When('ela informa o CPF no topo do pagamento', async ({ page }) => {
|
|
32
|
+
// Asked once, above the wallets — never a Dados step first (FUT-3685).
|
|
33
|
+
await expect(page.getByTestId('payment-list')).toBeVisible();
|
|
34
|
+
const cpf = page.getByTestId('list-buyer-taxId');
|
|
35
|
+
if ((await cpf.count()) > 0)
|
|
36
|
+
await cpf.fill(VALID_CPF);
|
|
30
37
|
});
|
|
31
|
-
When('ela paga com o
|
|
32
|
-
|
|
38
|
+
When('ela paga com o Google Pay em pagamento rápido', async ({ page }) => {
|
|
39
|
+
// Google's own button, drawn inside the package's mount point.
|
|
40
|
+
await page.getByTestId('list-google-pay').getByRole('button').click();
|
|
33
41
|
});
|
|
34
|
-
|
|
35
|
-
await
|
|
42
|
+
When('ela paga com o Apple Pay em pagamento rápido', async ({ page }) => {
|
|
43
|
+
await page.getByTestId('list-apple-pay').click();
|
|
44
|
+
});
|
|
45
|
+
When('ela paga com um cartão novo pela lista', async ({ page }) => {
|
|
46
|
+
await page.getByTestId('list-option-CARD-radio').check();
|
|
47
|
+
await fillCard(page);
|
|
48
|
+
// "Pagar" turns into the five-second bar; nothing is sent until it fills.
|
|
49
|
+
await page.getByTestId('list-pay').click();
|
|
50
|
+
await expect(page.getByTestId('list-charge-bar')).toBeVisible();
|
|
51
|
+
});
|
|
52
|
+
Then('a carteira espera o CPF', async ({ page }) => {
|
|
53
|
+
// Held, with the bar's own reason under the buttons — the sheet cannot ask for it.
|
|
54
|
+
// Each button stays reachable, disabled and described by that reason.
|
|
55
|
+
await expect(page.getByTestId('list-wallets-held')).toBeVisible();
|
|
56
|
+
for (const button of await page.getByTestId('list-wallet-buttons').getByRole('button').all()) {
|
|
57
|
+
await expect(button).toBeDisabled();
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
Then('ela vê o botão do Google Pay em pagamento rápido', async ({ page }) => {
|
|
61
|
+
await expect(page.getByTestId('list-wallets')).toBeVisible();
|
|
62
|
+
await expect(page.getByTestId('list-google-pay')).toBeVisible();
|
|
63
|
+
await expect(page.getByTestId('list-google-pay').getByRole('button')).toBeEnabled();
|
|
64
|
+
});
|
|
65
|
+
Then('ela vê o botão do Apple Pay em pagamento rápido', async ({ page }) => {
|
|
66
|
+
await expect(page.getByTestId('list-wallets')).toBeVisible();
|
|
67
|
+
await expect(page.getByTestId('list-apple-pay')).toBeEnabled();
|
|
68
|
+
});
|
|
69
|
+
Then('as formas de pagar continuam abaixo da carteira', async ({ page }) => {
|
|
70
|
+
// The wallet is a shortcut above the rows, not a replacement for them.
|
|
71
|
+
await expect(page.getByTestId('list-option-CARD')).toBeVisible();
|
|
72
|
+
});
|
|
73
|
+
Then('não há pagamento rápido na tela', async ({ page }) => {
|
|
74
|
+
// No heading, no buttons, no divider — not an empty block.
|
|
75
|
+
await expect(page.getByTestId('list-wallets')).toHaveCount(0);
|
|
36
76
|
});
|
|
37
77
|
Then('nenhum botão do Google Pay é mostrado', async ({ page }) => {
|
|
38
78
|
await expect(page.getByTestId('google-pay-button')).toHaveCount(0);
|
|
39
|
-
|
|
40
|
-
Then('ela vê o botão do Apple Pay', async ({ page }) => {
|
|
41
|
-
await expect(page.getByTestId('apple-pay-button')).toBeVisible();
|
|
79
|
+
await expect(page.getByTestId('list-google-pay')).toHaveCount(0);
|
|
42
80
|
});
|
|
43
81
|
Then('nenhum botão do Apple Pay é mostrado', async ({ page }) => {
|
|
44
82
|
await expect(page.getByTestId('apple-pay-button')).toHaveCount(0);
|
|
83
|
+
await expect(page.getByTestId('list-apple-pay')).toHaveCount(0);
|
|
45
84
|
});
|
|
46
85
|
Then('a cobrança enviada ao provedor carrega a carteira do Google', async ({ page }) => {
|
|
47
86
|
// What the PROVIDER received, not what the client recorded sending: hosts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carteira.steps.js","sourceRoot":"","sources":["../../src/steps/carteira.steps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,OAAO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|
76
76
|
await expect(page.getByTestId('pix-qr')).toBeVisible();
|
|
77
77
|
});
|
|
78
78
|
Then('o código copia-e-cola veio do provedor', async ({ page }) => {
|
|
79
|
-
|
|
79
|
+
// The Banco Central GUI, in either case: the specification spells it in
|
|
80
|
+
// lowercase and many PSPs print it in capitals, and both are a real code.
|
|
81
|
+
await expect(page.getByTestId('pix-code')).toContainText(/br\.gov\.bcb\.pix/i);
|
|
80
82
|
});
|
|
81
83
|
Then('ela vê o formulário de cartão', async ({ page }) => {
|
|
82
84
|
await expect(page.getByTestId('card-view')).toBeVisible();
|
|
@@ -179,7 +181,14 @@ Then('nenhum tokensByProvider é enviado', async ({ page }) => {
|
|
|
179
181
|
});
|
|
180
182
|
Then('um instrumento foi gerado para cada provedor da cadeia', async ({ page }) => {
|
|
181
183
|
const { fixtures, wire } = paymentsWorld();
|
|
182
|
-
|
|
184
|
+
// A SET of instruments, in whatever order the client minted them (FUT-3627):
|
|
185
|
+
// a real checkout mints the chain concurrently, so the map's key order is
|
|
186
|
+
// the order the mints finished in — `stone,pagbank` on one run, the reverse
|
|
187
|
+
// on the next — and no reader of the map depends on it.
|
|
188
|
+
const expected = [fixtures.headProvider, fixtures.tailProvider].sort().join(',');
|
|
189
|
+
await expect
|
|
190
|
+
.poll(async () => ((await wire.tokensByProvider(page).textContent()) ?? '').split(',').sort().join(','))
|
|
191
|
+
.toBe(expected);
|
|
183
192
|
});
|
|
184
193
|
Then('os dois provedores receberam a cobrança', async ({ page }) => {
|
|
185
194
|
const { fixtures, wire } = paymentsWorld();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compra.steps.js","sourceRoot":"","sources":["../../src/steps/compra.steps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtF,OAAO,EAAE,aAAa,EA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AAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;AAC/E,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,0CAA0C,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;IAClE,2EAA2E;IAC3E,6EAA6E;IAC7E,mCAAmC;IACnC,2EAA2E;IAC3E,6EAA6E;IAC7E,0EAA0E;IAC1E,4EAA4E;IAC5E,uEAAuE;IACvE,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,CACtC,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,+BAA+B,CAAC,CAC/D,CAAC;IACF,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;AAChE,CAAC,CAAC,CAAC"}
|
package/dist/steps/guia.steps.js
CHANGED
|
@@ -12,15 +12,33 @@ import { Given, Then } from './fixtures.js';
|
|
|
12
12
|
*
|
|
13
13
|
* Neither step names a brand. The positive one asks the host what it calls
|
|
14
14
|
* itself (`fixtures.platformBrand`) and requires exactly that to appear; the
|
|
15
|
-
* negative one requires that no
|
|
15
|
+
* negative one requires that no OTHER known adopter of this package appears.
|
|
16
16
|
* The second is the load-bearing one: a guide that interpolates the host once
|
|
17
17
|
* and hardcodes somebody else two steps later satisfies the first and is still
|
|
18
18
|
* the bug.
|
|
19
19
|
*/
|
|
20
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* Products known to install this package. None but the host's OWN may reach a
|
|
22
|
+
* host's screen.
|
|
23
|
+
*/
|
|
21
24
|
// Built from base64-decoded halves so this shipped step file spells no
|
|
22
25
|
// adopter brand, whole or split — the brand gates sweep it like any source.
|
|
23
|
-
const ADOPTER_NAMES =
|
|
26
|
+
const ADOPTER_NAMES = [
|
|
27
|
+
new RegExp(`${atob('ZnV0dXJl')}[\\s_-]?${atob('cGF5')}`, 'i'),
|
|
28
|
+
/paladira/i,
|
|
29
|
+
];
|
|
30
|
+
/**
|
|
31
|
+
* The adopters that are somebody ELSE from where this host stands (FUT-3627).
|
|
32
|
+
*
|
|
33
|
+
* The list used to be one pattern applied to every host, which made the
|
|
34
|
+
* scenario fail BY CONSTRUCTION in every adopter on it: a host whose brand is
|
|
35
|
+
* on the list renders its own name — correctly, it is what the positive step
|
|
36
|
+
* demands — and the negative step then calls that a stranger's. A name the
|
|
37
|
+
* host's own `platformBrand` matches is that host's to print.
|
|
38
|
+
*/
|
|
39
|
+
function strangers(platformBrand) {
|
|
40
|
+
return ADOPTER_NAMES.filter((name) => !name.test(platformBrand));
|
|
41
|
+
}
|
|
24
42
|
/** The packaged guide surface — the same test id in every host. */
|
|
25
43
|
const GUIDE = 'payments-setup-guide';
|
|
26
44
|
Given('o lojista abre o passo a passo de um provedor com guia', async ({ page }) => {
|
|
@@ -32,6 +50,8 @@ Then('o passo a passo trata a plataforma pelo nome que o anfitrião deu', async
|
|
|
32
50
|
});
|
|
33
51
|
Then('a tela não cita nenhum outro produto que instale este pacote', async ({ page }) => {
|
|
34
52
|
const rendered = await page.getByTestId(GUIDE).innerText();
|
|
35
|
-
|
|
53
|
+
for (const name of strangers(paymentsWorld().fixtures.platformBrand)) {
|
|
54
|
+
expect(rendered).not.toMatch(name);
|
|
55
|
+
}
|
|
36
56
|
});
|
|
37
57
|
//# sourceMappingURL=guia.steps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guia.steps.js","sourceRoot":"","sources":["../../src/steps/guia.steps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAE5C;;;;;;;;;;;;;;;GAeG;AAEH
|
|
1
|
+
{"version":3,"file":"guia.steps.js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AAE,EAAE,EAAE;IACtF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,SAAS,EAAE,CAAC;IAC3D,KAAK,MAAM,IAAI,IAAI,SAAS,CAAC,aAAa,EAAE,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;QACrE,MAAM,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,CAAC;AACH,CAAC,CAAC,CAAC"}
|
|
@@ -11,12 +11,16 @@ import { Given, Then, When } from './fixtures.js';
|
|
|
11
11
|
* These steps read two vocabularies, like the activation ones:
|
|
12
12
|
*
|
|
13
13
|
* - the package's OWN screens, whose test ids mean the same in any host —
|
|
14
|
-
* `payments-expiry-warning
|
|
15
|
-
*
|
|
16
|
-
* - the
|
|
17
|
-
*
|
|
14
|
+
* `payments-expiry-warning` and the reconnect banner the connection panel
|
|
15
|
+
* renders;
|
|
16
|
+
* - the HOST's success notice after a connect, `payments-connect-success`:
|
|
17
|
+
* the settings page leaves that banner to its host, so a host that adopts
|
|
18
|
+
* this journey renders it under that id, as the harness does;
|
|
19
|
+
* - the host's PROBE of its own stored row — `wire.connectionStatus`,
|
|
20
|
+
* `wire.connectionEnabled`, `wire.rotation` — which is how a scenario
|
|
18
21
|
* asserts that `enabled` and the rotation genuinely disagree rather than
|
|
19
|
-
* trusting a screen to say so.
|
|
22
|
+
* trusting a screen to say so. Port members since FUT-3627; they were
|
|
23
|
+
* harness test ids before, which no real host could know it owed.
|
|
20
24
|
*
|
|
21
25
|
* The provider is `fixtures.oauthProvider`, never a name written here: which
|
|
22
26
|
* row is dead belongs to the host's invented cast.
|
|
@@ -25,8 +29,8 @@ Given('a autorização da loja com o provedor foi recusada', async ({ page }) =>
|
|
|
25
29
|
await paymentsWorld().open(page, 'reconnect-required');
|
|
26
30
|
});
|
|
27
31
|
Then('a conexão aparece como precisando reconectar', async ({ page }) => {
|
|
28
|
-
const
|
|
29
|
-
await expect(page.
|
|
32
|
+
const { fixtures, wire } = paymentsWorld();
|
|
33
|
+
await expect(wire.connectionStatus(page, fixtures.oauthProvider)).toHaveText('RECONNECT_REQUIRED');
|
|
30
34
|
});
|
|
31
35
|
/**
|
|
32
36
|
* The disagreement IS the state. `enabled` true and the rotation empty at the
|
|
@@ -34,9 +38,9 @@ Then('a conexão aparece como precisando reconectar', async ({ page }) => {
|
|
|
34
38
|
* switch a live store back on.
|
|
35
39
|
*/
|
|
36
40
|
Then('ela continua ligada, mas fora da rotação', async ({ page }) => {
|
|
37
|
-
const
|
|
38
|
-
await expect(page.
|
|
39
|
-
await expect(
|
|
41
|
+
const { fixtures, wire } = paymentsWorld();
|
|
42
|
+
await expect(wire.connectionEnabled(page, fixtures.oauthProvider)).toHaveText('true');
|
|
43
|
+
await expect(wire.rotation(page)).toHaveText('(none)');
|
|
40
44
|
});
|
|
41
45
|
When('o lojista abre a conexão do provedor', async ({ page }) => {
|
|
42
46
|
const provider = paymentsWorld().fixtures.oauthProvider;
|
|
@@ -53,12 +57,12 @@ Then('ele vê desde quando', async ({ page }) => {
|
|
|
53
57
|
});
|
|
54
58
|
When('ele reconecta e autoriza de novo', async ({ page }) => {
|
|
55
59
|
await page.getByRole('button', { name: 'Reconectar' }).click();
|
|
56
|
-
await
|
|
60
|
+
await paymentsWorld().authorizeOAuth(page);
|
|
57
61
|
await expect(page.getByTestId('payments-connect-success')).toBeVisible();
|
|
58
62
|
});
|
|
59
63
|
Then('a conexão volta a estar verificada', async ({ page }) => {
|
|
60
|
-
const
|
|
61
|
-
await expect(page.
|
|
64
|
+
const { fixtures, wire } = paymentsWorld();
|
|
65
|
+
await expect(wire.connectionStatus(page, fixtures.oauthProvider)).toHaveText('VERIFIED');
|
|
62
66
|
});
|
|
63
67
|
/**
|
|
64
68
|
* The whole point of the ticket: rotation returns on the authorize alone. If a
|
|
@@ -66,9 +70,9 @@ Then('a conexão volta a estar verificada', async ({ page }) => {
|
|
|
66
70
|
* silently not selling.
|
|
67
71
|
*/
|
|
68
72
|
Then('a loja volta para a rotação sem ninguém ter mexido no botão', async ({ page }) => {
|
|
69
|
-
const
|
|
70
|
-
await expect(
|
|
71
|
-
await expect(page.
|
|
73
|
+
const { fixtures, wire } = paymentsWorld();
|
|
74
|
+
await expect(wire.rotation(page)).toHaveText(fixtures.oauthProvider);
|
|
75
|
+
await expect(wire.connectionEnabled(page, fixtures.oauthProvider)).toHaveText('true');
|
|
72
76
|
});
|
|
73
77
|
Then('o aviso de autorização expirada some', async ({ page }) => {
|
|
74
78
|
await expect(page.getByText('A autorização expirou ou foi revogada.')).toBeHidden();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reconexao.steps.js","sourceRoot":"","sources":["../../src/steps/reconexao.steps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAElD
|
|
1
|
+
{"version":3,"file":"reconexao.steps.js","sourceRoot":"","sources":["../../src/steps/reconexao.steps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,KAAK,CAAC,mDAAmD,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;IAC5E,MAAM,aAAa,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,oBAAoB,CAAC,CAAC;AACzD,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,8CAA8C,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EA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AS,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC;AAC9E,CAAC,CAAC,CAAC"}
|
package/dist/world.d.ts
CHANGED
|
@@ -29,7 +29,11 @@ import type { Page } from '@playwright/test';
|
|
|
29
29
|
export type PaymentsStore =
|
|
30
30
|
/** One provider, PIX only — the simplest store there is. */
|
|
31
31
|
'pix-only'
|
|
32
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* One provider that mints card instruments in the browser. It may offer PIX
|
|
34
|
+
* too: the scenarios choose the card tile before typing (FUT-3627), since no
|
|
35
|
+
* shipped adapter is card-only and a sole-method picker still renders it.
|
|
36
|
+
*/
|
|
33
37
|
| 'card'
|
|
34
38
|
/** One provider offering both methods. */
|
|
35
39
|
| 'both-methods'
|
|
@@ -60,20 +64,25 @@ export type PaymentsStore =
|
|
|
60
64
|
* capability, the PAYMENT_GATEWAY parameters, a merchant id — and a page
|
|
61
65
|
* where `google.payments.api` answers, which the host provides by
|
|
62
66
|
* installing a stub of it before the checkout loads (the shipped button
|
|
63
|
-
* uses an installed global without touching the network).
|
|
67
|
+
* uses an installed global without touching the network). Its checkout is
|
|
68
|
+
* the ONE list (`paymentList`, with `totalCents`), the buyer arrives with no
|
|
69
|
+
* CPF on file, and the order raised behind the sheet costs what the sheet
|
|
70
|
+
* showed (FUT-3685).
|
|
64
71
|
*/
|
|
65
72
|
| 'google-pay'
|
|
66
73
|
/**
|
|
67
74
|
* A store whose chain head declares Apple Pay (FUT-472), opened on a device
|
|
68
75
|
* that HAS it: the host provides a page where `window.ApplePaySession`
|
|
69
76
|
* exists and `canMakePayments()` answers true (a stub, outside Safari),
|
|
70
|
-
* plus a merchant-validation port that answers a session.
|
|
77
|
+
* plus a merchant-validation port that answers a session. Its checkout is
|
|
78
|
+
* the ONE list, as for `google-pay` (FUT-3685).
|
|
71
79
|
*/
|
|
72
80
|
| 'apple-pay'
|
|
73
81
|
/**
|
|
74
82
|
* The SAME Apple Pay store on a device WITHOUT Apple Pay (every non-Safari
|
|
75
83
|
* browser): no `ApplePaySession` global. The scenario this hosts is the
|
|
76
|
-
* fallback rule — no
|
|
84
|
+
* fallback rule — no wallet block, and the list's card row stays the way to
|
|
85
|
+
* pay.
|
|
77
86
|
*/
|
|
78
87
|
| 'apple-pay-unsupported'
|
|
79
88
|
/**
|
|
@@ -195,10 +204,41 @@ export interface PaymentsWireProbe {
|
|
|
195
204
|
providerChargeCount(page: Page): ReturnType<Page['getByTestId']>;
|
|
196
205
|
/** Where the host was asked to navigate, on a hand-off. */
|
|
197
206
|
navigated(page: Page): ReturnType<Page['getByTestId']>;
|
|
207
|
+
/**
|
|
208
|
+
* The STORED status of one provider connection — `VERIFIED`,
|
|
209
|
+
* `RECONNECT_REQUIRED`… — as the host's own row has it, not as a screen
|
|
210
|
+
* words it (FUT-3627: these three were read by the reconnection journey
|
|
211
|
+
* from test ids only the harness rendered, and declared nowhere).
|
|
212
|
+
*/
|
|
213
|
+
connectionStatus(page: Page, provider: string): ReturnType<Page['getByTestId']>;
|
|
214
|
+
/** That connection's stored `enabled` flag, as the text `true` or `false`. */
|
|
215
|
+
connectionEnabled(page: Page, provider: string): ReturnType<Page['getByTestId']>;
|
|
216
|
+
/**
|
|
217
|
+
* The providers a NEW checkout would route to, comma-separated in order, or
|
|
218
|
+
* `(none)` — the rotation the config read actually computes. Asserted next
|
|
219
|
+
* to {@link connectionEnabled} because a dead grant is exactly the state
|
|
220
|
+
* where the two disagree.
|
|
221
|
+
*/
|
|
222
|
+
rotation(page: Page): ReturnType<Page['getByTestId']>;
|
|
198
223
|
}
|
|
199
224
|
/** Everything a host supplies to run the packaged journeys. */
|
|
200
225
|
export interface PaymentsWorld {
|
|
201
|
-
/**
|
|
226
|
+
/**
|
|
227
|
+
* Put the browser on a checkout for a store of this shape.
|
|
228
|
+
*
|
|
229
|
+
* For a checkout shape that means ON THE DADOS STEP, with every field the
|
|
230
|
+
* chain requires already filled EXCEPT the CPF (FUT-3627): `reachPayment`
|
|
231
|
+
* types the CPF when the form asks for one and presses Continuar, and
|
|
232
|
+
* nothing else. Which fields a chain requires — InfinitePay's mobile phone,
|
|
233
|
+
* Stripe's name and e-mail — is a fact about the store the host built, so
|
|
234
|
+
* the host answers it. A buyer with a CPF on file skips Dados altogether;
|
|
235
|
+
* the host must not arrive with one.
|
|
236
|
+
*
|
|
237
|
+
* And return only once the store's checkout CONFIG has resolved. Dados
|
|
238
|
+
* draws before it arrives, defaulting to a required CPF; a host that fetches
|
|
239
|
+
* its config (any real one) would otherwise hand `reachPayment` a CPF field
|
|
240
|
+
* that vanishes as the chain lands.
|
|
241
|
+
*/
|
|
202
242
|
open(page: Page, store: PaymentsStore): Promise<void>;
|
|
203
243
|
/** Raise a hosted payable and show the hand-off interstitial. */
|
|
204
244
|
raiseHostedPayable(page: Page): Promise<void>;
|
|
@@ -206,6 +246,16 @@ export interface PaymentsWorld {
|
|
|
206
246
|
returnFromProvider(page: Page): Promise<void>;
|
|
207
247
|
/** The terminal status the return leg settles to. */
|
|
208
248
|
hostedReturnStatus(page: Page): ReturnType<Page['getByTestId']>;
|
|
249
|
+
/**
|
|
250
|
+
* Play the provider's OAuth consent screen and come back (FUT-3627).
|
|
251
|
+
*
|
|
252
|
+
* Called after the owner pressed the package's own "Reconectar": whatever
|
|
253
|
+
* the host does to get a grant — a fake authorize page in a harness, a
|
|
254
|
+
* stubbed exchange in an app — ends on the provider panel again, where the
|
|
255
|
+
* host's `payments-connect-success` notice is asserted. Declared here because the consent
|
|
256
|
+
* screen is the PROVIDER's, which no package component renders.
|
|
257
|
+
*/
|
|
258
|
+
authorizeOAuth(page: Page): Promise<void>;
|
|
209
259
|
fixtures: PaymentsFixtures;
|
|
210
260
|
wire: PaymentsWireProbe;
|
|
211
261
|
}
|
package/dist/world.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"world.d.ts","sourceRoot":"","sources":["../src/world.ts"],"names":[],"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,EAAE,MAAM,GAAG,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;IACjF;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,EAAE,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;CACvD;AAED,+DAA+D;AAC/D,MAAM,WAAW,aAAa;IAC5B;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtD,iEAAiE;IACjE,kBAAkB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9C,4EAA4E;IAC5E,kBAAkB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9C,qDAAqD;IACrD,kBAAkB,CAAC,IAAI,EAAE,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;IAChE;;;;;;;;OAQG;IACH,cAAc,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1C,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,IAAI,EAAE,iBAAiB,CAAC;CACzB;AAID;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,CAE9D;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,IAAI,aAAa,CAQ7C"}
|
package/dist/world.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"world.js","sourceRoot":"","sources":["../src/world.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"world.js","sourceRoot":"","sources":["../src/world.ts"],"names":[],"mappings":"AA2QA,IAAI,SAAS,GAAyB,IAAI,CAAC;AAE3C;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAoB;IACtD,SAAS,GAAG,KAAK,CAAC;AACpB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa;IAC3B,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CACb,0EAA0E;YACxE,0EAA0E,CAC7E,CAAC;IACJ,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -15,6 +15,7 @@ Feature: A compra sobrevive ao primeiro provedor falhar
|
|
|
15
15
|
Scenario: O primeiro provedor cai e o segundo cobra, sem redigitar nada
|
|
16
16
|
Given a loja tem dois provedores que geram token no navegador
|
|
17
17
|
When ela informa o CPF e segue para o pagamento
|
|
18
|
+
And ela escolhe pagar com cartão
|
|
18
19
|
And ela paga com um cartão novo
|
|
19
20
|
Then o pagamento é confirmado
|
|
20
21
|
And um instrumento foi gerado para cada provedor da cadeia
|
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
@journey @apple-pay
|
|
2
2
|
Feature: Comprando com Apple Pay
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
a
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
A carteira fica no topo do pagamento, em "Pagamento rápido", acima das
|
|
5
|
+
formas de pagar. A sessão da Apple começa dentro do toque — o Safari só abre
|
|
6
|
+
a folha assim —, já com o valor a pagar, e o pedido nasce por trás dela. O
|
|
7
|
+
provedor processa Apple Pay só para Visa e Mastercard, então a folha da Apple
|
|
8
|
+
oferece só essas bandeiras. E a carteira é um atalho, nunca o único caminho:
|
|
9
|
+
num aparelho sem Apple Pay o bloco simplesmente não existe e o cartão da
|
|
10
|
+
lista continua fazendo a venda.
|
|
9
11
|
|
|
10
12
|
Scenario: A compra inteira acontece pela carteira
|
|
11
13
|
Given a compradora abre o checkout de uma loja com Apple Pay
|
|
12
|
-
When ela informa o CPF
|
|
13
|
-
Then ela vê o botão do Apple Pay
|
|
14
|
-
|
|
15
|
-
When ela paga com o Apple Pay
|
|
14
|
+
When ela informa o CPF no topo do pagamento
|
|
15
|
+
Then ela vê o botão do Apple Pay em pagamento rápido
|
|
16
|
+
When ela paga com o Apple Pay em pagamento rápido
|
|
16
17
|
Then o pagamento é confirmado
|
|
17
18
|
And a cobrança enviada ao provedor carrega a carteira da Apple
|
|
18
19
|
|
|
19
20
|
Scenario: Sem Apple Pay no aparelho, o cartão continua fazendo a venda
|
|
20
21
|
Given a compradora abre o checkout da loja com Apple Pay num aparelho sem Apple Pay
|
|
21
|
-
When ela informa o CPF
|
|
22
|
+
When ela informa o CPF no topo do pagamento
|
|
22
23
|
Then nenhum botão do Apple Pay é mostrado
|
|
23
|
-
And
|
|
24
|
-
When ela paga com um cartão novo
|
|
24
|
+
And não há pagamento rápido na tela
|
|
25
|
+
When ela paga com um cartão novo pela lista
|
|
25
26
|
Then o pagamento é confirmado
|
|
@@ -11,6 +11,7 @@ Feature: Comprando com cartão
|
|
|
11
11
|
|
|
12
12
|
Scenario: O cartão é cobrado e o CPF chega ao provedor
|
|
13
13
|
When ela informa o CPF e segue para o pagamento
|
|
14
|
+
And ela escolhe pagar com cartão
|
|
14
15
|
Then ela vê o formulário de cartão
|
|
15
16
|
When ela paga com um cartão novo
|
|
16
17
|
Then o pagamento é confirmado
|
|
@@ -19,6 +20,7 @@ Feature: Comprando com cartão
|
|
|
19
20
|
|
|
20
21
|
Scenario: Uma loja com um provedor só não envia tokensByProvider
|
|
21
22
|
When ela informa o CPF e segue para o pagamento
|
|
23
|
+
And ela escolhe pagar com cartão
|
|
22
24
|
And ela paga com um cartão novo
|
|
23
25
|
Then o pagamento é confirmado
|
|
24
26
|
And nenhum tokensByProvider é enviado
|
|
@@ -1,23 +1,28 @@
|
|
|
1
1
|
@journey @google-pay
|
|
2
2
|
Feature: Comprando com Google Pay
|
|
3
3
|
|
|
4
|
-
A carteira
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
A carteira fica no topo do pagamento, em "Pagamento rápido", acima das
|
|
5
|
+
formas de pagar — não é mais uma opção da lista. Um toque abre a folha do
|
|
6
|
+
Google já com o valor a pagar, e o pedido nasce por trás dela; a folha é a
|
|
7
|
+
confirmação. O CPF é pedido uma vez, no topo, porque o provedor exige o CPF
|
|
8
|
+
em todo pedido e a folha do Google não o informa. O botão só existe quando a
|
|
9
|
+
loja declarou a carteira E o aparelho disse que consegue pagar — um botão que
|
|
10
|
+
leva a compradora até a folha para depois recusar a cobrança é pior do que
|
|
11
|
+
nenhum botão.
|
|
9
12
|
|
|
10
13
|
Scenario: A compra inteira acontece pela carteira
|
|
11
14
|
Given a compradora abre o checkout de uma loja com Google Pay
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
Then a carteira espera o CPF
|
|
16
|
+
When ela informa o CPF no topo do pagamento
|
|
17
|
+
Then ela vê o botão do Google Pay em pagamento rápido
|
|
18
|
+
And as formas de pagar continuam abaixo da carteira
|
|
19
|
+
When ela paga com o Google Pay em pagamento rápido
|
|
16
20
|
Then o pagamento é confirmado
|
|
17
21
|
And a cobrança enviada ao provedor carrega a carteira do Google
|
|
18
22
|
|
|
19
23
|
Scenario: Uma loja sem carteira nunca mostra o botão
|
|
20
24
|
Given a compradora abre o checkout da loja de cartão
|
|
21
25
|
When ela informa o CPF e segue para o pagamento
|
|
26
|
+
And ela escolhe pagar com cartão
|
|
22
27
|
Then nenhum botão do Google Pay é mostrado
|
|
23
28
|
And ela vê o formulário de cartão
|