@12-apps/payments-e2e 1.5.1 → 2.1.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/dist/steps/guia.steps.d.ts +2 -0
- package/dist/steps/guia.steps.d.ts.map +1 -0
- package/dist/steps/guia.steps.js +37 -0
- package/dist/steps/guia.steps.js.map +1 -0
- package/dist/steps/reconexao.steps.d.ts +2 -0
- package/dist/steps/reconexao.steps.d.ts.map +1 -0
- package/dist/steps/reconexao.steps.js +77 -0
- package/dist/steps/reconexao.steps.js.map +1 -0
- package/dist/world.d.ts +48 -1
- package/dist/world.d.ts.map +1 -1
- package/dist/world.js.map +1 -1
- package/features/a-autorizacao-que-morreu.feature +36 -0
- package/features/o-passo-a-passo-fala-pela-plataforma.feature +25 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guia.steps.d.ts","sourceRoot":"","sources":["../../src/steps/guia.steps.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { expect } from '@playwright/test';
|
|
2
|
+
import { paymentsWorld } from '../world.js';
|
|
3
|
+
import { Given, Then } from './fixtures.js';
|
|
4
|
+
/**
|
|
5
|
+
* THE WALKTHROUGH SPEAKS IN THE HOST'S NAME (FUT-760/761).
|
|
6
|
+
*
|
|
7
|
+
* Two shipped guides addressed the platform by name mid-instruction and
|
|
8
|
+
* carried ONE adopter's brand while doing it, so every other adopter rendered
|
|
9
|
+
* a stranger's product name on its own settings screen. `brandName` on
|
|
10
|
+
* `SetupGuideContext` is the seam; these steps are the journey-level proof
|
|
11
|
+
* that the seam is actually the source of the word on screen.
|
|
12
|
+
*
|
|
13
|
+
* Neither step names a brand. The positive one asks the host what it calls
|
|
14
|
+
* itself (`fixtures.platformBrand`) and requires exactly that to appear; the
|
|
15
|
+
* negative one requires that no KNOWN adopter of this package appears at all.
|
|
16
|
+
* The second is the load-bearing one: a guide that interpolates the host once
|
|
17
|
+
* and hardcodes somebody else two steps later satisfies the first and is still
|
|
18
|
+
* the bug.
|
|
19
|
+
*/
|
|
20
|
+
/** Products known to install this package. None may reach a host's screen. */
|
|
21
|
+
// Built from base64-decoded halves so this shipped step file spells no
|
|
22
|
+
// adopter brand, whole or split — the brand gates sweep it like any source.
|
|
23
|
+
const ADOPTER_NAMES = new RegExp(`${atob('ZnV0dXJl')}[\\s_-]?${atob('cGF5')}|paladira`, 'i');
|
|
24
|
+
/** The packaged guide surface — the same test id in every host. */
|
|
25
|
+
const GUIDE = 'payments-setup-guide';
|
|
26
|
+
Given('o lojista abre o passo a passo de um provedor com guia', async ({ page }) => {
|
|
27
|
+
await paymentsWorld().open(page, 'setup-guide');
|
|
28
|
+
await expect(page.getByTestId(GUIDE)).toBeVisible();
|
|
29
|
+
});
|
|
30
|
+
Then('o passo a passo trata a plataforma pelo nome que o anfitrião deu', async ({ page }) => {
|
|
31
|
+
await expect(page.getByTestId(GUIDE)).toContainText(paymentsWorld().fixtures.platformBrand);
|
|
32
|
+
});
|
|
33
|
+
Then('a tela não cita nenhum outro produto que instale este pacote', async ({ page }) => {
|
|
34
|
+
const rendered = await page.getByTestId(GUIDE).innerText();
|
|
35
|
+
expect(rendered).not.toMatch(ADOPTER_NAMES);
|
|
36
|
+
});
|
|
37
|
+
//# sourceMappingURL=guia.steps.js.map
|
|
@@ -0,0 +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,8EAA8E;AAC9E,uEAAuE;AACvE,4EAA4E;AAC5E,MAAM,aAAa,GAAG,IAAI,MAAM,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,WAAW,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;AAE7F,mEAAmE;AACnE,MAAM,KAAK,GAAG,sBAAsB,CAAC;AAErC,KAAK,CAAC,wDAAwD,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;IACjF,MAAM,aAAa,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;IAChD,MAAM,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;AACtD,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,kEAAkE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;IAC1F,MAAM,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,aAAa,CAAC,aAAa,EAAE,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;AAC9F,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,8DAA8D,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;IACtF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,SAAS,EAAE,CAAC;IAC3D,MAAM,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;AAC9C,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reconexao.steps.d.ts","sourceRoot":"","sources":["../../src/steps/reconexao.steps.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { expect } from '@playwright/test';
|
|
2
|
+
import { paymentsWorld } from '../world.js';
|
|
3
|
+
import { Given, Then, When } from './fixtures.js';
|
|
4
|
+
/**
|
|
5
|
+
* A DEAD OAUTH GRANT, AND THE WAY BACK (FUT-683, packaged by FUT-760).
|
|
6
|
+
*
|
|
7
|
+
* The merchant admin's side of the one money-path state a store cannot reach
|
|
8
|
+
* on purpose: the provider refused to renew, so the connection is out of
|
|
9
|
+
* rotation while the owner never switched it off.
|
|
10
|
+
*
|
|
11
|
+
* These steps read two vocabularies, like the activation ones:
|
|
12
|
+
*
|
|
13
|
+
* - the package's OWN screens, whose test ids mean the same in any host —
|
|
14
|
+
* `payments-expiry-warning`, `payments-connect-success`, and the reconnect
|
|
15
|
+
* banner the connection panel renders;
|
|
16
|
+
* - the host's PROBE of its own stored row — `admin-status-<provider>`,
|
|
17
|
+
* `admin-enabled-<provider>`, `admin-rotation` — which is how a scenario
|
|
18
|
+
* asserts that `enabled` and the rotation genuinely disagree rather than
|
|
19
|
+
* trusting a screen to say so.
|
|
20
|
+
*
|
|
21
|
+
* The provider is `fixtures.oauthProvider`, never a name written here: which
|
|
22
|
+
* row is dead belongs to the host's invented cast.
|
|
23
|
+
*/
|
|
24
|
+
Given('a autorização da loja com o provedor foi recusada', async ({ page }) => {
|
|
25
|
+
await paymentsWorld().open(page, 'reconnect-required');
|
|
26
|
+
});
|
|
27
|
+
Then('a conexão aparece como precisando reconectar', async ({ page }) => {
|
|
28
|
+
const provider = paymentsWorld().fixtures.oauthProvider;
|
|
29
|
+
await expect(page.getByTestId(`admin-status-${provider}`)).toHaveText('RECONNECT_REQUIRED');
|
|
30
|
+
});
|
|
31
|
+
/**
|
|
32
|
+
* The disagreement IS the state. `enabled` true and the rotation empty at the
|
|
33
|
+
* same time is what stops a host from "fixing" this by asking the owner to
|
|
34
|
+
* switch a live store back on.
|
|
35
|
+
*/
|
|
36
|
+
Then('ela continua ligada, mas fora da rotação', async ({ page }) => {
|
|
37
|
+
const provider = paymentsWorld().fixtures.oauthProvider;
|
|
38
|
+
await expect(page.getByTestId(`admin-enabled-${provider}`)).toHaveText('true');
|
|
39
|
+
await expect(page.getByTestId('admin-rotation')).toHaveText('(none)');
|
|
40
|
+
});
|
|
41
|
+
When('o lojista abre a conexão do provedor', async ({ page }) => {
|
|
42
|
+
const provider = paymentsWorld().fixtures.oauthProvider;
|
|
43
|
+
await page.getByTestId(`payments-provider-card-${provider}`).click();
|
|
44
|
+
await expect(page.getByTestId('payments-provider-back')).toBeVisible();
|
|
45
|
+
});
|
|
46
|
+
Then('ele lê que a autorização expirou ou foi revogada', async ({ page }) => {
|
|
47
|
+
// The package's own banner copy — quoted because it is what the owner reads.
|
|
48
|
+
await expect(page.getByText('A autorização expirou ou foi revogada.')).toBeVisible();
|
|
49
|
+
});
|
|
50
|
+
Then('ele vê desde quando', async ({ page }) => {
|
|
51
|
+
await expect(page.getByTestId('payments-expiry-warning')).toBeVisible();
|
|
52
|
+
await expect(page.getByTestId('payments-expiry-warning')).toContainText('A autorização expirou em');
|
|
53
|
+
});
|
|
54
|
+
When('ele reconecta e autoriza de novo', async ({ page }) => {
|
|
55
|
+
await page.getByRole('button', { name: 'Reconectar' }).click();
|
|
56
|
+
await page.getByTestId('admin-oauth-authorize').click();
|
|
57
|
+
await expect(page.getByTestId('payments-connect-success')).toBeVisible();
|
|
58
|
+
});
|
|
59
|
+
Then('a conexão volta a estar verificada', async ({ page }) => {
|
|
60
|
+
const provider = paymentsWorld().fixtures.oauthProvider;
|
|
61
|
+
await expect(page.getByTestId(`admin-status-${provider}`)).toHaveText('VERIFIED');
|
|
62
|
+
});
|
|
63
|
+
/**
|
|
64
|
+
* The whole point of the ticket: rotation returns on the authorize alone. If a
|
|
65
|
+
* host ever has to toggle the switch to finish this, the store spent that gap
|
|
66
|
+
* silently not selling.
|
|
67
|
+
*/
|
|
68
|
+
Then('a loja volta para a rotação sem ninguém ter mexido no botão', async ({ page }) => {
|
|
69
|
+
const provider = paymentsWorld().fixtures.oauthProvider;
|
|
70
|
+
await expect(page.getByTestId('admin-rotation')).toHaveText(provider);
|
|
71
|
+
await expect(page.getByTestId(`admin-enabled-${provider}`)).toHaveText('true');
|
|
72
|
+
});
|
|
73
|
+
Then('o aviso de autorização expirada some', async ({ page }) => {
|
|
74
|
+
await expect(page.getByText('A autorização expirou ou foi revogada.')).toBeHidden();
|
|
75
|
+
await expect(page.getByTestId('payments-expiry-warning')).toBeHidden();
|
|
76
|
+
});
|
|
77
|
+
//# sourceMappingURL=reconexao.steps.js.map
|
|
@@ -0,0 +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;;;;;;;;;;;;;;;;;;;GAmBG;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,EAAE;IACtE,MAAM,QAAQ,GAAG,aAAa,EAAE,CAAC,QAAQ,CAAC,aAAa,CAAC;IACxD,MAAM,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,gBAAgB,QAAQ,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;AAC9F,CAAC,CAAC,CAAC;AAEH;;;;GAIG;AACH,IAAI,CAAC,0CAA0C,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;IAClE,MAAM,QAAQ,GAAG,aAAa,EAAE,CAAC,QAAQ,CAAC,aAAa,CAAC;IACxD,MAAM,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,iBAAiB,QAAQ,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IAC/E,M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105
105
|
/** Declares a screen id this bundle has never shipped. */
|
|
106
|
-
| 'screen-unknown'
|
|
106
|
+
| 'screen-unknown'
|
|
107
|
+
/**
|
|
108
|
+
* A provider whose WALKTHROUGH addresses the platform by name (FUT-760/761)
|
|
109
|
+
* — the admin settings surface, on a vendor that ships a setup guide.
|
|
110
|
+
*
|
|
111
|
+
* The journey behind it asserts that the name the owner reads is the HOST's,
|
|
112
|
+
* arriving through `SetupGuideContext.brandName`, rather than one adopter's
|
|
113
|
+
* brand compiled into the package. A host satisfies this by opening a
|
|
114
|
+
* settings screen for a provider with a guide; what the platform is called
|
|
115
|
+
* there is the host's own answer, which is the whole point — so the scenario
|
|
116
|
+
* asks for it through {@link PaymentsFixtures.platformBrand} rather than
|
|
117
|
+
* naming anyone.
|
|
118
|
+
*/
|
|
119
|
+
| 'setup-guide'
|
|
120
|
+
/**
|
|
121
|
+
* An OAuth provider whose GRANT IS DEAD — the merchant's connection is out
|
|
122
|
+
* of rotation while the owner never switched it off (FUT-683).
|
|
123
|
+
*
|
|
124
|
+
* The one money-path state a store cannot reach on purpose: the provider
|
|
125
|
+
* refused to renew, so `enabled` stays true (reconnecting must restore
|
|
126
|
+
* rotation by itself) while `RECONNECT_REQUIRED` alone keeps every new
|
|
127
|
+
* charge off a dead token. A host produces it however it can — this
|
|
128
|
+
* package's `config/enablement.ts` decides what it MEANS either way.
|
|
129
|
+
*
|
|
130
|
+
* The journey lands on that provider's own panel, where the reconnect
|
|
131
|
+
* banner and the expiry warning are the package's own screens.
|
|
132
|
+
*/
|
|
133
|
+
| 'reconnect-required';
|
|
107
134
|
/**
|
|
108
135
|
* Facts about the host's own fixtures that the assertions have to name.
|
|
109
136
|
*
|
|
@@ -124,6 +151,26 @@ export interface PaymentsFixtures {
|
|
|
124
151
|
payableRef: string;
|
|
125
152
|
/** The CPF the buyer types, as the provider should receive it. */
|
|
126
153
|
taxId: string;
|
|
154
|
+
/**
|
|
155
|
+
* What the HOST platform calls itself — the value it passes as
|
|
156
|
+
* `SetupGuideContext.brandName`.
|
|
157
|
+
*
|
|
158
|
+
* Parameterised for the same reason `headProvider` is, and for one more: a
|
|
159
|
+
* feature file that spelled a brand would be asserting that one adopter's
|
|
160
|
+
* copy shipped, which is the defect rather than the fix. The scenario says
|
|
161
|
+
* "the platform's own name"; only the host can say what that is.
|
|
162
|
+
*/
|
|
163
|
+
platformBrand: string;
|
|
164
|
+
/**
|
|
165
|
+
* The provider the `reconnect-required` shape is about — the one whose OAuth
|
|
166
|
+
* grant the host declared dead.
|
|
167
|
+
*
|
|
168
|
+
* Named for the same reason `headProvider` is: the reconnection assertions
|
|
169
|
+
* are about a SPECIFIC connection's status and the rotation it fell out of,
|
|
170
|
+
* so they have to address one row. Which row is the host's invented cast,
|
|
171
|
+
* never this package's, and never a real acquirer's.
|
|
172
|
+
*/
|
|
173
|
+
oauthProvider: string;
|
|
127
174
|
}
|
|
128
175
|
/**
|
|
129
176
|
* Where a host records what actually crossed the wire.
|
package/dist/world.d.ts.map
CHANGED
|
@@ -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,+DAA+D;GAC7D,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;AACtB,yEAAyE;GACvE,cAAc;AAChB,mDAAmD;GACjD,cAAc;AAChB,gEAAgE;GAC9D,eAAe;AACjB;;;;;;GAMG;GACD,YAAY;AACd;;;;;GAKG;GACD,WAAW;AACb;;;;GAIG;GACD,uBAAuB;AACzB;;;;;;;;GAQG;GACD,QAAQ;AACV;;;;;;;;GAQG;GACD,YAAY;AACd,6CAA6C;GAC3C,gBAAgB;AAClB,8CAA8C;GAC5C,gBAAgB;AAClB,2DAA2D;GACzD,mBAAmB;AACrB,0DAA0D;GACxD,gBAAgB,CAAC;
|
|
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,+DAA+D;GAC7D,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;AACtB,yEAAyE;GACvE,cAAc;AAChB,mDAAmD;GACjD,cAAc;AAChB,gEAAgE;GAC9D,eAAe;AACjB;;;;;;GAMG;GACD,YAAY;AACd;;;;;GAKG;GACD,WAAW;AACb;;;;GAIG;GACD,uBAAuB;AACzB;;;;;;;;GAQG;GACD,QAAQ;AACV;;;;;;;;GAQG;GACD,YAAY;AACd,6CAA6C;GAC3C,gBAAgB;AAClB,8CAA8C;GAC5C,gBAAgB;AAClB,2DAA2D;GACzD,mBAAmB;AACrB,0DAA0D;GACxD,gBAAgB;AAClB;;;;;;;;;;;GAWG;GACD,aAAa;AACf;;;;;;;;;;;;GAYG;GACD,oBAAoB,CAAC;AAEzB;;;;;;;;GAQG;AACH,MAAM,WAAW,gBAAgB;I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AAE,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,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":"AAyNA,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"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
@journey @reconexao
|
|
2
|
+
Feature: A autorização que morreu, e a loja que volta a vender
|
|
3
|
+
|
|
4
|
+
O provedor pode se recusar a renovar a autorização de uma loja. Quando isso
|
|
5
|
+
acontece a conexão sai da rotação — nenhuma cobrança nova vai para um token
|
|
6
|
+
morto — mas o lojista NUNCA desligou nada, e é por isso que o `enabled`
|
|
7
|
+
continua verdadeiro: reconectar sozinho tem que devolver a loja à rotação,
|
|
8
|
+
sem ninguém lembrar de apertar um botão depois.
|
|
9
|
+
|
|
10
|
+
Essas duas coisas discordarem é o estado inteiro. Uma tela que mostrasse só
|
|
11
|
+
"ativo" mentiria (não está vendendo), e uma que mostrasse só "desligado"
|
|
12
|
+
também (o lojista não desligou) — e faria ele reativar à mão uma loja que já
|
|
13
|
+
estava ativa, o que é justamente o passo que se esquece.
|
|
14
|
+
|
|
15
|
+
A transição em si nenhum cenário consegue pedir a um provedor de verdade: é
|
|
16
|
+
o provedor recusando um refresh. Quem hospeda declara o estado; o que ele
|
|
17
|
+
SIGNIFICA é deste pacote.
|
|
18
|
+
|
|
19
|
+
Scenario: A conexão sai da rotação sem ninguém ter desligado nada
|
|
20
|
+
Given a autorização da loja com o provedor foi recusada
|
|
21
|
+
Then a conexão aparece como precisando reconectar
|
|
22
|
+
And ela continua ligada, mas fora da rotação
|
|
23
|
+
|
|
24
|
+
Scenario: O lojista entende o que aconteceu ao abrir a conexão
|
|
25
|
+
Given a autorização da loja com o provedor foi recusada
|
|
26
|
+
When o lojista abre a conexão do provedor
|
|
27
|
+
Then ele lê que a autorização expirou ou foi revogada
|
|
28
|
+
And ele vê desde quando
|
|
29
|
+
|
|
30
|
+
Scenario: Uma reconexão devolve a loja à rotação, sem apertar mais nada
|
|
31
|
+
Given a autorização da loja com o provedor foi recusada
|
|
32
|
+
When o lojista abre a conexão do provedor
|
|
33
|
+
And ele reconecta e autoriza de novo
|
|
34
|
+
Then a conexão volta a estar verificada
|
|
35
|
+
And a loja volta para a rotação sem ninguém ter mexido no botão
|
|
36
|
+
And o aviso de autorização expirada some
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
@journey @setup-guide
|
|
2
|
+
Feature: O passo a passo fala em nome da plataforma
|
|
3
|
+
|
|
4
|
+
O lojista abre a configuração do provedor e lê um passo a passo escrito para
|
|
5
|
+
ele. No meio das instruções o texto se dirige à plataforma pelo nome — "é
|
|
6
|
+
assim que o {plataforma} confirma que a notificação veio mesmo da Stone".
|
|
7
|
+
|
|
8
|
+
Por muito tempo esse nome vinha escrito dentro do pacote. Quem instalasse a
|
|
9
|
+
biblioteca entregava ao SEU lojista a marca de outro produto, na tela de
|
|
10
|
+
configuração da própria loja, sem que nada quebrasse — os testes do pacote
|
|
11
|
+
alimentavam o guia com o mesmo vocabulário que o guia já trazia embutido, e
|
|
12
|
+
concordar não prova nada quando os dois lados são a mesma palavra.
|
|
13
|
+
|
|
14
|
+
Agora quem hospeda diz como se chama, e o guia repete. Por isso nenhuma cena
|
|
15
|
+
aqui escreve uma marca: quem sabe o nome é o anfitrião, e é dele que a cena
|
|
16
|
+
pergunta. Uma cena que soletrasse a marca estaria afirmando que a cópia de um
|
|
17
|
+
adotante específico foi entregue — que é justamente o defeito, não o conserto.
|
|
18
|
+
|
|
19
|
+
Scenario: O lojista lê o nome de quem hospeda a loja dele
|
|
20
|
+
Given o lojista abre o passo a passo de um provedor com guia
|
|
21
|
+
Then o passo a passo trata a plataforma pelo nome que o anfitrião deu
|
|
22
|
+
|
|
23
|
+
Scenario: Nenhum outro produto aparece na tela do lojista
|
|
24
|
+
Given o lojista abre o passo a passo de um provedor com guia
|
|
25
|
+
Then a tela não cita nenhum outro produto que instale este pacote
|