@12-apps/payments-e2e 2.7.0 → 2.9.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.
@@ -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) — the CARD pane's fast lane.
6
+ * PAYING WITH A DIGITAL WALLET (FUT-471, FUT-472, FUT-3685).
6
7
  *
7
- * The wallet is not a fourth method: the buyer still walks Dados and still
8
- * lands on the CARD pane; what changes is that the instrument comes from the
9
- * wallet sheet instead of typed digits. So these steps sit beside the buyer's
10
- * card gestures, and the Givens name store shapes exactly like `loja.steps.ts`.
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
@@ -15,6 +18,14 @@ import { Given, Then, When } from './fixtures.js';
15
18
  * the checkout loads, which the shipped button picks up without a network
16
19
  * request.
17
20
  */
21
+ /**
22
+ * The list's top (the CPF and "PAGAMENTO RÁPIDO") is a chunk of its own
23
+ * (FUT-3711): wait for it to land before asking what it shows — an absence
24
+ * read while it loads proves nothing, and a field looked for then is missed.
25
+ */
26
+ async function topSettled(page) {
27
+ await expect(page.getByTestId('list-top-loading')).toHaveCount(0);
28
+ }
18
29
  Given('a compradora abre o checkout de uma loja com Google Pay', async ({ page }) => {
19
30
  await paymentsWorld().open(page, 'google-pay');
20
31
  });
@@ -25,23 +36,63 @@ Given('a compradora abre o checkout de uma loja com Apple Pay', async ({ page })
25
36
  Given('a compradora abre o checkout da loja com Apple Pay num aparelho sem Apple Pay', async ({ page }) => {
26
37
  await paymentsWorld().open(page, 'apple-pay-unsupported');
27
38
  });
28
- When('ela paga com o Google Pay', async ({ page }) => {
29
- await page.getByTestId('google-pay-button').click();
39
+ When('ela informa o CPF no topo do pagamento', async ({ page }) => {
40
+ // Asked once, above the wallets — never a Dados step first (FUT-3685).
41
+ await expect(page.getByTestId('payment-list')).toBeVisible();
42
+ await topSettled(page);
43
+ const cpf = page.getByTestId('list-buyer-taxId');
44
+ if ((await cpf.count()) > 0)
45
+ await cpf.fill(VALID_CPF);
46
+ });
47
+ When('ela paga com o Google Pay em pagamento rápido', async ({ page }) => {
48
+ // Google's own button, drawn inside the package's mount point.
49
+ await page.getByTestId('list-google-pay').getByRole('button').click();
50
+ });
51
+ When('ela paga com o Apple Pay em pagamento rápido', async ({ page }) => {
52
+ await page.getByTestId('list-apple-pay').click();
53
+ });
54
+ When('ela paga com um cartão novo pela lista', async ({ page }) => {
55
+ await page.getByTestId('list-option-CARD-radio').check();
56
+ await fillCard(page);
57
+ // "Pagar" turns into the five-second bar; nothing is sent until it fills.
58
+ await page.getByTestId('list-pay').click();
59
+ await expect(page.getByTestId('list-charge-bar')).toBeVisible();
30
60
  });
31
- When('ela paga com o Apple Pay', async ({ page }) => {
32
- await page.getByTestId('apple-pay-button').click();
61
+ Then('a carteira espera o CPF', async ({ page }) => {
62
+ // Held, with the bar's own reason under the buttons — the sheet cannot ask for it.
63
+ // Each button stays reachable, disabled and described by that reason.
64
+ await expect(page.getByTestId('list-wallets-held')).toBeVisible();
65
+ for (const button of await page.getByTestId('list-wallet-buttons').getByRole('button').all()) {
66
+ await expect(button).toBeDisabled();
67
+ }
33
68
  });
34
- Then('ela vê o botão do Google Pay', async ({ page }) => {
35
- await expect(page.getByTestId('google-pay-button')).toBeVisible();
69
+ Then('ela vê o botão do Google Pay em pagamento rápido', async ({ page }) => {
70
+ await expect(page.getByTestId('list-wallets')).toBeVisible();
71
+ await expect(page.getByTestId('list-google-pay')).toBeVisible();
72
+ await expect(page.getByTestId('list-google-pay').getByRole('button')).toBeEnabled();
73
+ });
74
+ Then('ela vê o botão do Apple Pay em pagamento rápido', async ({ page }) => {
75
+ await expect(page.getByTestId('list-wallets')).toBeVisible();
76
+ await expect(page.getByTestId('list-apple-pay')).toBeEnabled();
77
+ });
78
+ Then('as formas de pagar continuam abaixo da carteira', async ({ page }) => {
79
+ // The wallet is a shortcut above the rows, not a replacement for them.
80
+ await expect(page.getByTestId('list-option-CARD')).toBeVisible();
81
+ });
82
+ Then('não há pagamento rápido na tela', async ({ page }) => {
83
+ await topSettled(page);
84
+ // No heading, no buttons, no divider — not an empty block.
85
+ await expect(page.getByTestId('list-wallets')).toHaveCount(0);
36
86
  });
37
87
  Then('nenhum botão do Google Pay é mostrado', async ({ page }) => {
88
+ await topSettled(page);
38
89
  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();
90
+ await expect(page.getByTestId('list-google-pay')).toHaveCount(0);
42
91
  });
43
92
  Then('nenhum botão do Apple Pay é mostrado', async ({ page }) => {
93
+ await topSettled(page);
44
94
  await expect(page.getByTestId('apple-pay-button')).toHaveCount(0);
95
+ await expect(page.getByTestId('list-apple-pay')).toHaveCount(0);
45
96
  });
46
97
  Then('a cobrança enviada ao provedor carrega a carteira do Google', async ({ page }) => {
47
98
  // 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,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IA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MENT_GATEWAY parameters, a merchant id — and a page
65
65
  * where `google.payments.api` answers, which the host provides by
66
66
  * installing a stub of it before the checkout loads (the shipped button
67
- * 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).
68
71
  */
69
72
  | 'google-pay'
70
73
  /**
71
74
  * A store whose chain head declares Apple Pay (FUT-472), opened on a device
72
75
  * that HAS it: the host provides a page where `window.ApplePaySession`
73
76
  * exists and `canMakePayments()` answers true (a stub, outside Safari),
74
- * 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).
75
79
  */
76
80
  | 'apple-pay'
77
81
  /**
78
82
  * The SAME Apple Pay store on a device WITHOUT Apple Pay (every non-Safari
79
83
  * browser): no `ApplePaySession` global. The scenario this hosts is the
80
- * fallback rule — no button, and the card form stays the way to pay.
84
+ * fallback rule — no wallet block, and the list's card row stays the way to
85
+ * pay.
81
86
  */
82
87
  | 'apple-pay-unsupported'
83
88
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"world.d.ts","sourceRoot":"","sources":["../src/world.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAE7C;;;;;;;;;;;;;GAaG;AAEH;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,aAAa;AACvB,4DAA4D;AAC1D,UAAU;AACZ;;;;GAIG;GACD,MAAM;AACR,0CAA0C;GACxC,cAAc;AAChB,qDAAqD;GACnD,QAAQ;AACV,iFAAiF;GAC/E,UAAU;AACZ,+CAA+C;GAC7C,SAAS;AACX,yDAAyD;GACvD,UAAU;AACZ,sEAAsE;GACpE,YAAY;AACd,iEAAiE;GAC/D,aAAa;AACf,oCAAoC;GAClC,aAAa;AACf,6DAA6D;GAC3D,oBAAoB;A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AK,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"}
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"}
@@ -1,27 +1,26 @@
1
1
  @journey @apple-pay
2
2
  Feature: Comprando com Apple Pay
3
3
 
4
- O provedor processa Apple Pay só para Visa e Mastercard, então a folha da
5
- Apple oferece só essas bandeiras — um cartão que seria recusado nunca chega
6
- a ser oferecido. E a carteira é um atalho, nunca o único caminho: num
7
- aparelho sem Apple Pay o botão simplesmente não existe e o formulário de
8
- cartão continua fazendo a venda.
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 e segue para o pagamento
13
- And ela escolhe pagar com cartão
14
- Then ela vê o botão do Apple Pay
15
- And ela vê o formulário de cartão
16
- 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
17
17
  Then o pagamento é confirmado
18
18
  And a cobrança enviada ao provedor carrega a carteira da Apple
19
19
 
20
20
  Scenario: Sem Apple Pay no aparelho, o cartão continua fazendo a venda
21
21
  Given a compradora abre o checkout da loja com Apple Pay num aparelho sem Apple Pay
22
- When ela informa o CPF e segue para o pagamento
23
- And ela escolhe pagar com cartão
22
+ When ela informa o CPF no topo do pagamento
24
23
  Then nenhum botão do Apple Pay é mostrado
25
- And ela vê o formulário de cartão
26
- 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
27
26
  Then o pagamento é confirmado
@@ -1,19 +1,22 @@
1
1
  @journey @google-pay
2
2
  Feature: Comprando com Google Pay
3
3
 
4
- A carteira não é um quarto meio de pagamento: é outro jeito de produzir o
5
- cartão. O botão só existe quando a loja declarou a carteira E o aparelho
6
- disse que consegue pagar — um botão que leva a compradora até a folha do
7
- Google para depois recusar a cobrança é pior do que nenhum botão. O
8
- formulário de cartão continua na tela como alternativa o tempo todo.
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
- When ela informa o CPF e segue para o pagamento
13
- And ela escolhe pagar com cartão
14
- Then ela vê o botão do Google Pay
15
- And ela vê o formulário de cartão
16
- When ela paga com o Google Pay
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
17
20
  Then o pagamento é confirmado
18
21
  And a cobrança enviada ao provedor carrega a carteira do Google
19
22
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@12-apps/payments-e2e",
3
- "version": "2.7.0",
3
+ "version": "2.9.0",
4
4
  "type": "module",
5
5
  "sideEffects": [
6
6
  "**/steps-platform/**",