@vijaypjavvadi/bdd2pw 3.2.0 → 3.4.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.
@@ -0,0 +1,279 @@
1
+ "use strict";
2
+ /**
3
+ * v3.4.0 — Banking domain rule pack.
4
+ *
5
+ * Opt-in via `ScaffoldOptions.domains: ["banking"]`. When activated,
6
+ * these rules slot into the matcher registry BEFORE the URL-slug
7
+ * guardrails so banking-specific prose ("the account balance is
8
+ * $1,234.56") intercepts before drifting into the generic catch-all.
9
+ *
10
+ * Each rule emits `customBody` rather than a pomCall/assertion so the
11
+ * downstream emitter doesn't need to invent a POM field. The body
12
+ * lines reference standard test helpers (`page.evaluate`,
13
+ * `expect(text).toMatch`) that work against any banking app.
14
+ *
15
+ * Coverage:
16
+ * - Account balance (toContainText with currency-formatted value)
17
+ * - Transfers between accounts
18
+ * - Transaction fees
19
+ * - Statement transaction counts
20
+ * - Daily withdrawal / deposit limits
21
+ * - Regulation E (dispute filing windows)
22
+ * - Regulation D (savings withdrawal counts)
23
+ * - KYC / AML statuses
24
+ * - Transaction dates
25
+ * - Account opening / closing
26
+ *
27
+ * Patterns intentionally accept either `$1,234.56` or `"$1,234.56"`
28
+ * (LLM-emitted .feature files sometimes quote the currency). Numeric
29
+ * captures preserve commas — they're surfaced to the test as-is so
30
+ * the assertion matches what the page actually renders.
31
+ */
32
+ Object.defineProperty(exports, "__esModule", { value: true });
33
+ exports.BANKING_RULES = void 0;
34
+ /** Subject prefix matches the stepMatcher convention. */
35
+ const SUBJ = "(?:I|user|User|the user|the User)";
36
+ /** Quoted-or-bare currency capture, e.g. `$1,234.56`, `"$500"`. */
37
+ const MONEY = `\\$?["']?\\$?([\\d,]+(?:\\.\\d{1,2})?)["']?`;
38
+ /** ISO date capture or quoted free-form date. */
39
+ const DATE = `["']?(\\d{4}-\\d{2}-\\d{2}|\\d{1,2}\\/\\d{1,2}\\/\\d{2,4})["']?`;
40
+ exports.BANKING_RULES = [
41
+ // BANK:01 — `the account balance is "$1,234.56"`
42
+ {
43
+ pattern: new RegExp(`^(?:the )?account balance is ${MONEY}$`, "i"),
44
+ build: (m, step) => ({
45
+ step,
46
+ customBody: [
47
+ `const _bankingBalance = await page.locator("[data-testid='account-balance'], .account-balance, [aria-label*='balance' i]").first().innerText();`,
48
+ `expect(_bankingBalance.replace(/[^\\d.,]/g, "")).toContain(${JSON.stringify(m[1])});`,
49
+ ].join("\n"),
50
+ }),
51
+ },
52
+ // BANK:02 — `the account balance is at least "$X"` / `at most "$X"` / `greater than "$X"`
53
+ {
54
+ pattern: new RegExp(`^(?:the )?account balance is (at least|at most|greater than|less than|exactly) ${MONEY}$`, "i"),
55
+ build: (m, step) => {
56
+ const op = m[1].toLowerCase();
57
+ const matcher = {
58
+ "at least": "toBeGreaterThanOrEqual",
59
+ "at most": "toBeLessThanOrEqual",
60
+ "greater than": "toBeGreaterThan",
61
+ "less than": "toBeLessThan",
62
+ exactly: "toBe",
63
+ }[op];
64
+ const num = m[2].replace(/,/g, "");
65
+ return {
66
+ step,
67
+ customBody: [
68
+ `const _bal = await page.locator("[data-testid='account-balance'], .account-balance").first().innerText();`,
69
+ `const _balNum = Number(_bal.replace(/[^\\d.-]/g, ""));`,
70
+ `expect(_balNum).${matcher}(${num});`,
71
+ ].join("\n"),
72
+ };
73
+ },
74
+ },
75
+ // BANK:03 — `I transfer "$500" from "checking" to "savings"`
76
+ {
77
+ pattern: new RegExp(`^(?:${SUBJ}\\s+)?transfer(?:s)? ${MONEY} from ["']([^"']+)["'] to ["']([^"']+)["']$`, "i"),
78
+ build: (m, step) => ({
79
+ step,
80
+ customBody: [
81
+ `await page.getByLabel(/from account/i).selectOption({ label: ${JSON.stringify(m[2])} });`,
82
+ `await page.getByLabel(/to account/i).selectOption({ label: ${JSON.stringify(m[3])} });`,
83
+ `await page.getByLabel(/amount/i).fill(${JSON.stringify(m[1])});`,
84
+ `await page.getByRole("button", { name: /transfer|submit/i }).click();`,
85
+ ].join("\n"),
86
+ }),
87
+ },
88
+ // BANK:04 — `the transaction fee is less than "$5"`
89
+ {
90
+ pattern: new RegExp(`^(?:the )?transaction fee is (at most|less than|exactly|at least|greater than) ${MONEY}$`, "i"),
91
+ build: (m, step) => {
92
+ const op = m[1].toLowerCase();
93
+ const matcher = {
94
+ "at most": "toBeLessThanOrEqual",
95
+ "less than": "toBeLessThan",
96
+ exactly: "toBe",
97
+ "at least": "toBeGreaterThanOrEqual",
98
+ "greater than": "toBeGreaterThan",
99
+ }[op];
100
+ const num = m[2].replace(/,/g, "");
101
+ return {
102
+ step,
103
+ customBody: [
104
+ `const _fee = await page.locator("[data-testid='transaction-fee'], .fee").first().innerText();`,
105
+ `const _feeNum = Number(_fee.replace(/[^\\d.-]/g, ""));`,
106
+ `expect(_feeNum).${matcher}(${num});`,
107
+ ].join("\n"),
108
+ };
109
+ },
110
+ },
111
+ // BANK:05 — `the statement shows (N) transactions`
112
+ {
113
+ pattern: /^(?:the )?statement shows (\d+) transactions?$/i,
114
+ build: (m, step) => ({
115
+ step,
116
+ customBody: [
117
+ `const _txnCount = await page.locator("[data-testid='transaction-row'], tr.transaction").count();`,
118
+ `expect(_txnCount).toBe(${m[1]});`,
119
+ ].join("\n"),
120
+ }),
121
+ },
122
+ // BANK:06 — `the daily withdrawal limit is "$500"`
123
+ {
124
+ pattern: new RegExp(`^(?:the )?daily (withdrawal|deposit|transfer) limit is ${MONEY}$`, "i"),
125
+ build: (m, step) => ({
126
+ step,
127
+ customBody: [
128
+ `const _limit = await page.locator(\`[data-testid='daily-${m[1].toLowerCase()}-limit']\`).innerText();`,
129
+ `expect(_limit).toContain(${JSON.stringify(m[2])});`,
130
+ ].join("\n"),
131
+ }),
132
+ },
133
+ // BANK:07 — `I open a "checking" account`
134
+ {
135
+ pattern: new RegExp(`^(?:${SUBJ}\\s+)?open(?:s)? a(?:n)? ["']?([\\w ]+?)["']? account$`, "i"),
136
+ build: (m, step) => ({
137
+ step,
138
+ customBody: [
139
+ `await page.getByRole("button", { name: /open.*account/i }).click();`,
140
+ `await page.getByLabel(/account type/i).selectOption({ label: ${JSON.stringify(m[1])} });`,
141
+ `await page.getByRole("button", { name: /create|open|submit/i }).click();`,
142
+ ].join("\n"),
143
+ }),
144
+ },
145
+ // BANK:08 — `I close the "savings" account`
146
+ {
147
+ pattern: new RegExp(`^(?:${SUBJ}\\s+)?close(?:s)? the ["']?([\\w ]+?)["']? account$`, "i"),
148
+ build: (m, step) => ({
149
+ step,
150
+ customBody: [
151
+ `await page.getByRole("link", { name: ${JSON.stringify(m[1])} }).click();`,
152
+ `await page.getByRole("button", { name: /close account/i }).click();`,
153
+ `await page.getByRole("button", { name: /confirm/i }).click();`,
154
+ ].join("\n"),
155
+ }),
156
+ },
157
+ // BANK:09 — `the transaction date is "2026-05-22"`
158
+ {
159
+ pattern: new RegExp(`^(?:the )?transaction date is ${DATE}$`, "i"),
160
+ build: (m, step) => ({
161
+ step,
162
+ customBody: [
163
+ `const _txnDate = await page.locator("[data-testid='transaction-date']").first().innerText();`,
164
+ `expect(_txnDate).toContain(${JSON.stringify(m[1])});`,
165
+ ].join("\n"),
166
+ }),
167
+ },
168
+ // BANK:10 — `the payment status is "pending"`
169
+ {
170
+ pattern: /^(?:the )?(?:payment|transaction|transfer) status is ["']([^"']+)["']$/i,
171
+ build: (m, step) => ({
172
+ step,
173
+ customBody: `await expect(page.locator("[data-testid='payment-status'], .payment-status").first()).toContainText(${JSON.stringify(m[1])});`,
174
+ }),
175
+ },
176
+ // BANK:11 — Reg E: `the dispute is filed within 60 days of the statement`
177
+ {
178
+ pattern: /^(?:the )?dispute is filed within (\d+) days(?: of the statement)?$/i,
179
+ build: (m, step) => ({
180
+ step,
181
+ customBody: [
182
+ `// Reg E dispute window check (${m[1]} days). The DOM should expose`,
183
+ `// a data-attribute or text indicating the filing window status.`,
184
+ `await expect(page.locator("[data-testid='dispute-status']").first()).toContainText(/within (?:window|${m[1]}.*days)/i);`,
185
+ ].join("\n"),
186
+ }),
187
+ },
188
+ // BANK:12 — Reg D: `the savings withdrawal count is (N)`
189
+ {
190
+ pattern: /^(?:the )?savings withdrawal count is (\d+)$/i,
191
+ build: (m, step) => ({
192
+ step,
193
+ customBody: [
194
+ `const _withdrawCount = await page.locator("[data-testid='reg-d-count']").innerText();`,
195
+ `expect(Number(_withdrawCount.replace(/\\D/g, ""))).toBe(${m[1]});`,
196
+ ].join("\n"),
197
+ }),
198
+ },
199
+ // BANK:13 — `the customer has completed KYC verification`
200
+ // and `the customer has not completed KYC verification`
201
+ {
202
+ pattern: /^(?:the )?customer has (not )?completed KYC(?: verification)?$/i,
203
+ build: (m, step) => {
204
+ const matcher = m[1] ? "not.toBeVisible" : "toBeVisible";
205
+ return {
206
+ step,
207
+ customBody: `await expect(page.locator("[data-testid='kyc-complete'], [aria-label='KYC verified']").first()).${matcher}();`,
208
+ };
209
+ },
210
+ },
211
+ // BANK:14 — `the transaction is flagged for AML review`
212
+ {
213
+ pattern: /^(?:the )?transaction is (not )?flagged for AML(?: review)?$/i,
214
+ build: (m, step) => {
215
+ const matcher = m[1] ? "not.toBeVisible" : "toBeVisible";
216
+ return {
217
+ step,
218
+ customBody: `await expect(page.locator("[data-testid='aml-flag']").first()).${matcher}();`,
219
+ };
220
+ },
221
+ },
222
+ // BANK:15 — `the account number ends in "1234"`
223
+ {
224
+ pattern: /^(?:the )?account number ends (?:in|with) ["'](\d{4})["']$/i,
225
+ build: (m, step) => ({
226
+ step,
227
+ customBody: `await expect(page.locator("[data-testid='account-number'], .acct-number").first()).toContainText(/${m[1]}$/);`,
228
+ }),
229
+ },
230
+ // BANK:16 — `the routing number is "021000021"`
231
+ {
232
+ pattern: /^(?:the )?routing number is ["']?(\d{9})["']?$/i,
233
+ build: (m, step) => ({
234
+ step,
235
+ customBody: `await expect(page.locator("[data-testid='routing-number'], .routing").first()).toContainText(${JSON.stringify(m[1])});`,
236
+ }),
237
+ },
238
+ // BANK:17 — `I deposit "$X" into "savings"`
239
+ {
240
+ pattern: new RegExp(`^(?:${SUBJ}\\s+)?deposit(?:s)? ${MONEY} (?:in)?to ["']([^"']+)["']$`, "i"),
241
+ build: (m, step) => ({
242
+ step,
243
+ customBody: [
244
+ `await page.getByLabel(/destination account/i).selectOption({ label: ${JSON.stringify(m[2])} });`,
245
+ `await page.getByLabel(/deposit amount/i).fill(${JSON.stringify(m[1])});`,
246
+ `await page.getByRole("button", { name: /deposit|submit/i }).click();`,
247
+ ].join("\n"),
248
+ }),
249
+ },
250
+ // BANK:18 — `I withdraw "$X" from "checking"`
251
+ {
252
+ pattern: new RegExp(`^(?:${SUBJ}\\s+)?withdraw(?:s)? ${MONEY} from ["']([^"']+)["']$`, "i"),
253
+ build: (m, step) => ({
254
+ step,
255
+ customBody: [
256
+ `await page.getByLabel(/source account/i).selectOption({ label: ${JSON.stringify(m[2])} });`,
257
+ `await page.getByLabel(/withdraw(?:al)? amount/i).fill(${JSON.stringify(m[1])});`,
258
+ `await page.getByRole("button", { name: /withdraw|submit/i }).click();`,
259
+ ].join("\n"),
260
+ }),
261
+ },
262
+ // BANK:19 — `the available credit is "$X"`
263
+ {
264
+ pattern: new RegExp(`^(?:the )?available credit is ${MONEY}$`, "i"),
265
+ build: (m, step) => ({
266
+ step,
267
+ customBody: `await expect(page.locator("[data-testid='available-credit']").first()).toContainText(${JSON.stringify(m[1])});`,
268
+ }),
269
+ },
270
+ // BANK:20 — `the wire transfer is "completed"` / "pending" / "rejected"
271
+ {
272
+ pattern: /^(?:the )?wire(?: transfer)? is ["']([^"']+)["']$/i,
273
+ build: (m, step) => ({
274
+ step,
275
+ customBody: `await expect(page.locator("[data-testid='wire-status']").first()).toContainText(${JSON.stringify(m[1])});`,
276
+ }),
277
+ },
278
+ ];
279
+ //# sourceMappingURL=banking.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"banking.js","sourceRoot":"","sources":["../../../src/transformers/domains/banking.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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D,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI;gBACzE,sEAAsE;aACvE,CAAC,IAAI,CAAC,IAAI,CAAC;SACb,CAAC;KACH;IAED,8CAA8C;IAC9C;QACE,OAAO,EAAE,IAAI,MAAM,CACjB,OAAO,IAAI,wBAAwB,KAAK,yBAAyB,EACjE,GAAG,CACJ;QACD,KAAK,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;YACnB,IAAI;YACJ,UAAU,EAAE;gBACV,kEAAkE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM;gBAC5F,yDAAyD,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI;gBACjF,uEAAuE;aACxE,CAAC,IAAI,CAAC,IAAI,CAAC;SACb,CAAC;KACH;IAED,2CAA2C;IAC3C;QACE,OAAO,EAAE,IAAI,MAAM,CAAC,iCAAiC,KAAK,GAAG,EAAE,GAAG,CAAC;QACnE,KAAK,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;YACnB,IAAI;YACJ,UAAU,EAAE,wFAAwF,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI;SAC7H,CAAC;KACH;IAED,wEAAwE;IACxE;QACE,OAAO,EAAE,oDAAoD;QAC7D,KAAK,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;YACnB,IAAI;YACJ,UAAU,EAAE,mFAAmF,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI;SACxH,CAAC;KACH;CACF,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * v3.4.0 — Healthcare domain rule pack.
3
+ *
4
+ * Opt-in via `ScaffoldOptions.domains: ["healthcare"]`. Covers common
5
+ * EHR / clinical / regulatory dialects: patient records, appointments,
6
+ * ICD-10 diagnosis codes, medications, HIPAA consent forms, HL7
7
+ * message types, FHIR resource references, vital signs, allergies,
8
+ * provider NPIs.
9
+ *
10
+ * Patterns are intentionally specific (require recognisable formats
11
+ * like `ICD-10:E11.9` or `120/80 mmHg`) so they don't false-positive
12
+ * UI-shaped steps.
13
+ */
14
+ import type { PageObjectIR, StepBinding, StepIR } from "../../types";
15
+ interface Rule {
16
+ pattern: RegExp;
17
+ build(m: RegExpMatchArray, step: StepIR, pom: PageObjectIR, pageVar: string): StepBinding | null;
18
+ }
19
+ export declare const HEALTHCARE_RULES: Rule[];
20
+ export {};
@@ -0,0 +1,216 @@
1
+ "use strict";
2
+ /**
3
+ * v3.4.0 — Healthcare domain rule pack.
4
+ *
5
+ * Opt-in via `ScaffoldOptions.domains: ["healthcare"]`. Covers common
6
+ * EHR / clinical / regulatory dialects: patient records, appointments,
7
+ * ICD-10 diagnosis codes, medications, HIPAA consent forms, HL7
8
+ * message types, FHIR resource references, vital signs, allergies,
9
+ * provider NPIs.
10
+ *
11
+ * Patterns are intentionally specific (require recognisable formats
12
+ * like `ICD-10:E11.9` or `120/80 mmHg`) so they don't false-positive
13
+ * UI-shaped steps.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.HEALTHCARE_RULES = void 0;
17
+ const SUBJ = "(?:I|user|User|the user|the User|the provider)";
18
+ exports.HEALTHCARE_RULES = [
19
+ // HEALTH:01 — `the patient's name is "John Doe"`
20
+ {
21
+ pattern: /^(?:the )?patient'?s? name is ["']([^"']+)["']$/i,
22
+ build: (m, step) => ({
23
+ step,
24
+ customBody: `await expect(page.locator("[data-testid='patient-name'], [aria-label='Patient name']").first()).toContainText(${JSON.stringify(m[1])});`,
25
+ }),
26
+ },
27
+ // HEALTH:02 — `the patient ID is "MRN12345"`
28
+ {
29
+ pattern: /^(?:the )?patient(?: ID| MRN|'?s? medical record number) is ["']([^"']+)["']$/i,
30
+ build: (m, step) => ({
31
+ step,
32
+ customBody: `await expect(page.locator("[data-testid='patient-mrn'], [data-testid='patient-id']").first()).toContainText(${JSON.stringify(m[1])});`,
33
+ }),
34
+ },
35
+ // HEALTH:03 — `the appointment is scheduled for "2026-06-01"`
36
+ {
37
+ pattern: /^(?:the )?appointment is scheduled (?:for|on) ["']?(\d{4}-\d{2}-\d{2}|\d{1,2}\/\d{1,2}\/\d{2,4})["']?$/i,
38
+ build: (m, step) => ({
39
+ step,
40
+ customBody: `await expect(page.locator("[data-testid='appointment-date'], .appt-date").first()).toContainText(${JSON.stringify(m[1])});`,
41
+ }),
42
+ },
43
+ // HEALTH:04 — `I schedule an appointment for "2026-06-01"`
44
+ {
45
+ pattern: new RegExp(`^(?:${SUBJ}\\s+)?schedule(?:s)? (?:an? )?appointment (?:for|on) ["']?(\\d{4}-\\d{2}-\\d{2})["']?$`, "i"),
46
+ build: (m, step) => ({
47
+ step,
48
+ customBody: [
49
+ `await page.getByRole("button", { name: /schedule.*appointment/i }).click();`,
50
+ `await page.getByLabel(/appointment date/i).fill(${JSON.stringify(m[1])});`,
51
+ `await page.getByRole("button", { name: /confirm|submit/i }).click();`,
52
+ ].join("\n"),
53
+ }),
54
+ },
55
+ // HEALTH:05 — `the diagnosis code is "ICD-10:E11.9"`
56
+ {
57
+ pattern: /^(?:the )?diagnosis(?: code)? is ["']?(ICD-10[: ]?[A-Z]\d{2}(?:\.\d{1,3})?)["']?$/i,
58
+ build: (m, step) => ({
59
+ step,
60
+ customBody: `await expect(page.locator("[data-testid='diagnosis-code'], .icd-10").first()).toContainText(${JSON.stringify(m[1])});`,
61
+ }),
62
+ },
63
+ // HEALTH:06 — `the medication "Metformin" is prescribed`
64
+ {
65
+ pattern: /^(?:the )?medication ["']([^"']+)["'] is (?:prescribed|ordered|administered)$/i,
66
+ build: (m, step) => ({
67
+ step,
68
+ customBody: `await expect(page.locator("[data-testid='medication-list'], .medications").first()).toContainText(${JSON.stringify(m[1])});`,
69
+ }),
70
+ },
71
+ // HEALTH:07 — `I prescribe "Metformin 500mg" for the patient`
72
+ {
73
+ pattern: new RegExp(`^(?:${SUBJ}\\s+)?prescribe(?:s)? ["']([^"']+)["'](?: for (?:the )?patient)?$`, "i"),
74
+ build: (m, step) => ({
75
+ step,
76
+ customBody: [
77
+ `await page.getByRole("button", { name: /add (?:medication|prescription)/i }).click();`,
78
+ `await page.getByLabel(/medication name/i).fill(${JSON.stringify(m[1])});`,
79
+ `await page.getByRole("button", { name: /prescribe|save/i }).click();`,
80
+ ].join("\n"),
81
+ }),
82
+ },
83
+ // HEALTH:08 — `the patient has signed consent form "HIPAA-1"`
84
+ {
85
+ pattern: /^(?:the )?patient has (not )?signed (?:consent )?form ["']([^"']+)["']$/i,
86
+ build: (m, step) => {
87
+ const matcher = m[1] ? "not.toBeVisible" : "toBeVisible";
88
+ return {
89
+ step,
90
+ customBody: `await expect(page.locator(\`[data-testid='consent-${m[2].replace(/[^\\w-]/g, "")}'], [data-form='${m[2]}'][data-signed='true']\`).first()).${matcher}();`,
91
+ };
92
+ },
93
+ },
94
+ // HEALTH:09 — `the HL7 message type is "ADT^A01"`
95
+ {
96
+ pattern: /^(?:the )?HL7 message type is ["']?([A-Z]{3}\^[A-Z]\d{2})["']?$/i,
97
+ build: (m, step) => ({
98
+ step,
99
+ customBody: `await expect(page.locator("[data-testid='hl7-msh-9']").first()).toContainText(${JSON.stringify(m[1])});`,
100
+ }),
101
+ },
102
+ // HEALTH:10 — `the FHIR resource is "Patient/123"`
103
+ {
104
+ pattern: /^(?:the )?FHIR resource is ["']?([A-Z][a-zA-Z]+\/[\w-]+)["']?$/i,
105
+ build: (m, step) => ({
106
+ step,
107
+ customBody: [
108
+ `// FHIR resource ref — exposed by the EHR's data attribute.`,
109
+ `await expect(page.locator(\`[data-fhir-ref='${m[1]}']\`)).toBeVisible();`,
110
+ ].join("\n"),
111
+ }),
112
+ },
113
+ // HEALTH:11 — `the patient's data is encrypted`
114
+ {
115
+ pattern: /^(?:the )?patient'?s? (?:data|record|chart) is (not )?encrypted$/i,
116
+ build: (m, step) => {
117
+ const matcher = m[1] ? "not.toBeVisible" : "toBeVisible";
118
+ return {
119
+ step,
120
+ customBody: `await expect(page.locator("[data-testid='encryption-status'], [aria-label='HIPAA-compliant']").first()).${matcher}();`,
121
+ };
122
+ },
123
+ },
124
+ // HEALTH:12 — `the blood pressure reading is "120/80"`
125
+ {
126
+ pattern: /^(?:the )?blood pressure(?: reading)? is ["']?(\d{2,3}\/\d{2,3})["']?(?: mmHg)?$/i,
127
+ build: (m, step) => ({
128
+ step,
129
+ customBody: `await expect(page.locator("[data-testid='vital-bp'], [aria-label*='blood pressure' i]").first()).toContainText(${JSON.stringify(m[1])});`,
130
+ }),
131
+ },
132
+ // HEALTH:13 — `the heart rate is (N) bpm`
133
+ {
134
+ pattern: /^(?:the )?heart rate is (\d{2,3})(?:\s*bpm)?$/i,
135
+ build: (m, step) => ({
136
+ step,
137
+ customBody: [
138
+ `const _hr = await page.locator("[data-testid='vital-hr']").first().innerText();`,
139
+ `expect(Number(_hr.replace(/\\D/g, ""))).toBe(${m[1]});`,
140
+ ].join("\n"),
141
+ }),
142
+ },
143
+ // HEALTH:14 — `the patient is allergic to "penicillin"`
144
+ {
145
+ pattern: /^(?:the )?patient is (not )?allergic to ["']([^"']+)["']$/i,
146
+ build: (m, step) => {
147
+ const matcher = m[1] ? "not.toContainText" : "toContainText";
148
+ return {
149
+ step,
150
+ customBody: `await expect(page.locator("[data-testid='allergy-list'], .allergies").first()).${matcher}(${JSON.stringify(m[2])});`,
151
+ };
152
+ },
153
+ },
154
+ // HEALTH:15 — `the provider NPI is "1234567890"`
155
+ {
156
+ pattern: /^(?:the )?provider NPI is ["']?(\d{10})["']?$/i,
157
+ build: (m, step) => ({
158
+ step,
159
+ customBody: `await expect(page.locator("[data-testid='provider-npi'], .npi").first()).toContainText(${JSON.stringify(m[1])});`,
160
+ }),
161
+ },
162
+ // HEALTH:16 — `the provider DEA number is "AB1234567"`
163
+ {
164
+ pattern: /^(?:the )?provider DEA(?: number)? is ["']?([A-Z]{2}\d{7})["']?$/i,
165
+ build: (m, step) => ({
166
+ step,
167
+ customBody: `await expect(page.locator("[data-testid='provider-dea']").first()).toContainText(${JSON.stringify(m[1])});`,
168
+ }),
169
+ },
170
+ // HEALTH:17 — `the lab result for "HbA1c" is "5.8"`
171
+ {
172
+ pattern: /^(?:the )?lab result for ["']([^"']+)["'] is ["']?([\d.]+)["']?(?: ([\w/%]+))?$/i,
173
+ build: (m, step) => ({
174
+ step,
175
+ customBody: [
176
+ `const _labRow = page.locator("[data-testid='lab-row']").filter({ hasText: ${JSON.stringify(m[1])} }).first();`,
177
+ `await expect(_labRow).toContainText(${JSON.stringify(m[2])});`,
178
+ ].join("\n"),
179
+ }),
180
+ },
181
+ // HEALTH:18 — `I admit the patient to "ICU"`
182
+ {
183
+ pattern: new RegExp(`^(?:${SUBJ}\\s+)?admit(?:s)? (?:the )?patient to ["']([^"']+)["']$`, "i"),
184
+ build: (m, step) => ({
185
+ step,
186
+ customBody: [
187
+ `await page.getByRole("button", { name: /admit/i }).click();`,
188
+ `await page.getByLabel(/unit|ward|location/i).selectOption({ label: ${JSON.stringify(m[1])} });`,
189
+ `await page.getByRole("button", { name: /confirm|admit/i }).click();`,
190
+ ].join("\n"),
191
+ }),
192
+ },
193
+ // HEALTH:19 — `I discharge the patient`
194
+ {
195
+ pattern: new RegExp(`^(?:${SUBJ}\\s+)?discharge(?:s)? (?:the )?patient$`, "i"),
196
+ build: (_m, step) => ({
197
+ step,
198
+ customBody: [
199
+ `await page.getByRole("button", { name: /discharge/i }).click();`,
200
+ `await page.getByRole("button", { name: /confirm/i }).click();`,
201
+ ].join("\n"),
202
+ }),
203
+ },
204
+ // HEALTH:20 — `the audit log contains a "view chart" entry for the patient`
205
+ {
206
+ pattern: /^(?:the )?audit log contains (?:a |an )?["']([^"']+)["'] entry(?: for the patient)?$/i,
207
+ build: (m, step) => ({
208
+ step,
209
+ customBody: [
210
+ `await page.getByRole("link", { name: /audit log/i }).click();`,
211
+ `await expect(page.locator("[data-testid='audit-row']")).toContainText(${JSON.stringify(m[1])});`,
212
+ ].join("\n"),
213
+ }),
214
+ },
215
+ ];
216
+ //# sourceMappingURL=healthcare.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"healthcare.js","sourceRoot":"","sources":["../../../src/transformers/domains/healthcare.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;;AAcH,MAAM,IAAI,GAAG,gDAAgD,CAAC;AAEjD,QAAA,gBAAgB,GAAW;IACtC,iDAAiD;IACjD;QACE,OAAO,EAAE,kDAAkD;QAC3D,KAAK,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;YACnB,IAAI;YACJ,UAAU,EAAE,iHAAiH,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI;SACtJ,CAAC;KACH;IAED,6CAA6C;IAC7C;QACE,OAAO,EAAE,gFAAgF;QACzF,KAAK,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;YACnB,IAAI;YACJ,UAAU,EAAE,+GAA+G,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI;SACpJ,CAAC;KACH;IAED,8DAA8D;IAC9D;QACE,OAAO,EACL,yGAAyG;QAC3G,KAAK,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;YACnB,IAAI;YACJ,UAAU,EAAE,oGAAoG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI;SACzI,CAAC;KACH;IAED,2DAA2D;IAC3D;QACE,OAAO,EAAE,IAAI,MAAM,CACjB,OAAO,IAAI,wFAAwF,EACnG,GAAG,CACJ;QACD,KAAK,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;YACnB,IAAI;YACJ,UAAU,EAAE;gBACV,6EAA6E;gBAC7E,mDAAmD,IAAI,CAAC,SAAS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CAAC,IAAI,CAAC;SACb,CAAC;KACH;IAED,6CAA6C;IAC7C;QACE,OAAO,EAAE,IAAI,MAAM,CACjB,OAAO,IAAI,yDAAyD,EACpE,GAAG,CACJ;QACD,KAAK,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;YACnB,IAAI;YACJ,UAAU,EAAE;gBACV,6DAA6D;gBAC7D,sEAAsE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM;gBAChG,qEAAqE;aACtE,CAAC,IAAI,CAAC,IAAI,CAAC;SACb,CAAC;KACH;IAED,wCAAwC;IACxC;QACE,OAAO,EAAE,IAAI,MAAM,CAAC,OAAO,IAAI,yCAAyC,EAAE,GAAG,CAAC;QAC9E,KAAK,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;YACpB,IAAI;YACJ,UAAU,EAAE;gBACV,iEAAiE;gBACjE,+DAA+D;aAChE,CAAC,IAAI,CAAC,IAAI,CAAC;SACb,CAAC;KACH;IAED,4EAA4E;IAC5E;QACE,OAAO,EACL,uFAAuF;QACzF,KAAK,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;YACnB,IAAI;YACJ,UAAU,EAAE;gBACV,+DAA+D;gBAC/D,yEAAyE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI;aAClG,CAAC,IAAI,CAAC,IAAI,CAAC;SACb,CAAC;KACH;CACF,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * v3.4.0 — Insurance domain rule pack.
3
+ *
4
+ * Opt-in via `ScaffoldOptions.domains: ["insurance"]`. Covers common
5
+ * P&C / life / health insurance dialects: policies, premiums, claims,
6
+ * coverage limits, effective dates, claim filing windows, loss
7
+ * reserves, line of business, NAIC codes, adjuster assignment.
8
+ */
9
+ import type { PageObjectIR, StepBinding, StepIR } from "../../types";
10
+ interface Rule {
11
+ pattern: RegExp;
12
+ build(m: RegExpMatchArray, step: StepIR, pom: PageObjectIR, pageVar: string): StepBinding | null;
13
+ }
14
+ export declare const INSURANCE_RULES: Rule[];
15
+ export {};