playwright-cucumber-ts-steps 1.3.1 → 1.3.2

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.
Files changed (40) hide show
  1. package/dist/backend/actions/click.js +30 -30
  2. package/dist/backend/actions/form.js +2 -2
  3. package/dist/backend/actions/formTable.js +1 -1
  4. package/dist/backend/actions/frames.js +3 -3
  5. package/dist/backend/actions/inputs.js +18 -18
  6. package/dist/backend/actions/interactions.js +6 -6
  7. package/dist/backend/actions/keyboard.js +6 -6
  8. package/dist/backend/actions/misc.js +15 -15
  9. package/dist/backend/actions/mobile.js +7 -7
  10. package/dist/backend/actions/mouse.js +9 -9
  11. package/dist/backend/actions/navigation.js +5 -5
  12. package/dist/backend/actions/visual.js +7 -7
  13. package/dist/backend/actions/waits.js +6 -6
  14. package/dist/backend/api/assertions.js +3 -3
  15. package/dist/backend/api/mock.js +3 -3
  16. package/dist/backend/api/network.js +6 -6
  17. package/dist/backend/api/requests.js +4 -4
  18. package/dist/backend/assertions/document.js +10 -10
  19. package/dist/backend/assertions/elements.js +28 -28
  20. package/dist/backend/assertions/expectVisible.js +1 -1
  21. package/dist/backend/assertions/forms.js +7 -7
  22. package/dist/backend/assertions/pageState.js +4 -4
  23. package/dist/backend/assertions/storage.js +11 -11
  24. package/dist/backend/assertions/text.js +17 -17
  25. package/dist/backend/assertions/visibility.js +15 -15
  26. package/dist/backend/auth/index.js +2 -2
  27. package/dist/backend/db/steps.d.ts +1 -1
  28. package/dist/backend/db/steps.d.ts.map +1 -1
  29. package/dist/backend/db/steps.js +10 -10
  30. package/dist/backend/elements/alerts.js +3 -3
  31. package/dist/backend/elements/find.js +26 -26
  32. package/dist/backend/elements/forms.js +4 -4
  33. package/dist/backend/elements/frames.js +3 -3
  34. package/dist/backend/utils/resolver.js +1 -1
  35. package/dist/component/runner.d.ts +1 -1
  36. package/dist/component/runner.d.ts.map +1 -1
  37. package/dist/component/runner.js +38 -5
  38. package/dist/core/runner.js +3 -3
  39. package/dist/metadata.json +270 -270
  40. package/package.json +3 -2
@@ -204,18 +204,18 @@ async function expectElementDoesNotExist(page, selectorKey) {
204
204
  // ==================================================
205
205
  // GLUE STEPS
206
206
  // ==================================================
207
- (0, registry_1.Step)("I expect element to be visible", expectActiveVisible, "Then");
208
- (0, registry_1.Step)("I expect {string} to be visible", expectStringVisible, "Then");
209
- (0, registry_1.Step)("I expect element to be hidden", expectActiveHidden, "Then");
210
- (0, registry_1.Step)("I expect element to be enabled", expectActiveEnabled, "Then");
211
- (0, registry_1.Step)("I expect element to be disabled", expectActiveDisabled, "Then");
212
- (0, registry_1.Step)("I expect element to have text {string}", expectActiveText, "Then");
213
- (0, registry_1.Step)("I expect element to contain text {string}", expectActiveContainText, "Then");
214
- (0, registry_1.Step)("I expect element to have value {string}", expectActiveValue, "Then");
215
- (0, registry_1.Step)("I expect element to have attribute {string}", expectActiveAttribute, "Then");
216
- (0, registry_1.Step)("I expect element to have attribute {string} with value {string}", expectActiveAttributeValue, "Then");
217
- (0, registry_1.Step)("I expect the page screenshot to match {string}", expectPageScreenshotMatch, "Then");
218
- (0, registry_1.Step)("I expect the element screenshot to match {string}", expectElementScreenshotMatch, "Then");
219
- (0, registry_1.Step)("I expect {string} to be not visible", expectElementToNotBeVisible, "Then");
220
- (0, registry_1.Step)("I expect element {string} exists", expectElementExists, "Then");
221
- (0, registry_1.Step)("I expect element {string} does not exist", expectElementDoesNotExist, "Then");
207
+ (0, registry_1.Step)("I pw expect element to be visible", expectActiveVisible, "Then");
208
+ (0, registry_1.Step)("I pw expect {string} to be visible", expectStringVisible, "Then");
209
+ (0, registry_1.Step)("I pw expect element to be hidden", expectActiveHidden, "Then");
210
+ (0, registry_1.Step)("I pw expect element to be enabled", expectActiveEnabled, "Then");
211
+ (0, registry_1.Step)("I pw expect element to be disabled", expectActiveDisabled, "Then");
212
+ (0, registry_1.Step)("I pw expect element to have text {string}", expectActiveText, "Then");
213
+ (0, registry_1.Step)("I pw expect element to contain text {string}", expectActiveContainText, "Then");
214
+ (0, registry_1.Step)("I pw expect element to have value {string}", expectActiveValue, "Then");
215
+ (0, registry_1.Step)("I pw expect element to have attribute {string}", expectActiveAttribute, "Then");
216
+ (0, registry_1.Step)("I pw expect element to have attribute {string} with value {string}", expectActiveAttributeValue, "Then");
217
+ (0, registry_1.Step)("I pw expect the page screenshot to match {string}", expectPageScreenshotMatch, "Then");
218
+ (0, registry_1.Step)("I pw expect the element screenshot to match {string}", expectElementScreenshotMatch, "Then");
219
+ (0, registry_1.Step)("I pw expect {string} to be not visible", expectElementToNotBeVisible, "Then");
220
+ (0, registry_1.Step)("I pw expect element {string} exists", expectElementExists, "Then");
221
+ (0, registry_1.Step)("I pw expect element {string} does not exist", expectElementDoesNotExist, "Then");
@@ -91,5 +91,5 @@ async function loadBrowserState(page, filenameKey) {
91
91
  // ==================================================
92
92
  // GLUE STEPS
93
93
  // ==================================================
94
- (0, registry_1.Step)("I save the browser state to {string}", saveBrowserState);
95
- (0, registry_1.Step)("I load the browser state from {string}", loadBrowserState);
94
+ (0, registry_1.Step)("I pw save the browser state to {string}", saveBrowserState);
95
+ (0, registry_1.Step)("I pw load the browser state from {string}", loadBrowserState);
@@ -13,7 +13,7 @@ export declare function expectDbRecordCount(page: any, count: number): Promise<v
13
13
  * Asserts that the database query returned no records (empty result set).
14
14
  * @example Then I expect the database to return no records
15
15
  */
16
- export declare function expectDbNoRecords(page: any): Promise<void>;
16
+ export declare function expectDbNoRecords(_page: any): Promise<void>;
17
17
  /**
18
18
  * Asserts that the first record of the last database result set contains specific column values.
19
19
  * Performs a loose equality check (converts values to strings) to handle type mismatches.
@@ -1 +1 @@
1
- {"version":3,"file":"steps.d.ts","sourceRoot":"","sources":["../../../src/backend/db/steps.ts"],"names":[],"mappings":"AASA;;;;GAIG;AACH,wBAAsB,UAAU,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAM5E;AAED;;;GAGG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAQjF;AAED;;;GAGG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAOhE;AAED;;;;;;;;GAQG;AACH,wBAAsB,4BAA4B,CAChD,IAAI,EAAE,GAAG,EACT,SAAS,EAAE,MAAM,EAAE,EAAE,GACpB,OAAO,CAAC,IAAI,CAAC,CAyBf;AAED;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,GAAG,EACT,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,EAAE,EAAE,GACpB,OAAO,CAAC,IAAI,CAAC,CAgCf;AAED;;;;;;GAMG;AACH,wBAAsB,2BAA2B,CAAC,IAAI,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAgCjG;AAED;;;;GAIG;AACH,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,GAAG,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAkB1F;AAED;;;;;GAKG;AACH,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,GAAG,EACT,aAAa,EAAE,MAAM,EACrB,gBAAgB,EAAE,MAAM,GACvB,OAAO,CAAC,IAAI,CAAC,CAgCf;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,GAAG,EACT,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,IAAI,CAAC,CAyBf"}
1
+ {"version":3,"file":"steps.d.ts","sourceRoot":"","sources":["../../../src/backend/db/steps.ts"],"names":[],"mappings":"AASA;;;;GAIG;AACH,wBAAsB,UAAU,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAM5E;AAED;;;GAGG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAQjF;AAED;;;GAGG;AACH,wBAAsB,iBAAiB,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAOjE;AAED;;;;;;;;GAQG;AACH,wBAAsB,4BAA4B,CAChD,IAAI,EAAE,GAAG,EACT,SAAS,EAAE,MAAM,EAAE,EAAE,GACpB,OAAO,CAAC,IAAI,CAAC,CAyBf;AAED;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,GAAG,EACT,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,EAAE,EAAE,GACpB,OAAO,CAAC,IAAI,CAAC,CAgCf;AAED;;;;;;GAMG;AACH,wBAAsB,2BAA2B,CAAC,IAAI,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAgCjG;AAED;;;;GAIG;AACH,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,GAAG,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAkB1F;AAED;;;;;GAKG;AACH,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,GAAG,EACT,aAAa,EAAE,MAAM,EACrB,gBAAgB,EAAE,MAAM,GACvB,OAAO,CAAC,IAAI,CAAC,CAgCf;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,GAAG,EACT,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,IAAI,CAAC,CAyBf"}
@@ -46,7 +46,7 @@ async function expectDbRecordCount(page, count) {
46
46
  * Asserts that the database query returned no records (empty result set).
47
47
  * @example Then I expect the database to return no records
48
48
  */
49
- async function expectDbNoRecords(page) {
49
+ async function expectDbNoRecords(_page) {
50
50
  const result = state_1.dbState.getLastResult();
51
51
  if (!Array.isArray(result)) {
52
52
  throw new Error(`Expected array result from database but got: ${typeof result}`);
@@ -219,12 +219,12 @@ async function expectDbColumnType(page, columnNameKey, dataTypeKey) {
219
219
  // ==================================================
220
220
  // GLUE STEPS
221
221
  // ==================================================
222
- (0, registry_1.Step)("I run the database query {string}", runDbQuery, "When");
223
- (0, registry_1.Step)("I expect the database to return {int} record(s)", expectDbRecordCount, "Then");
224
- (0, registry_1.Step)("I expect the database to return no records", expectDbNoRecords, "Then");
225
- (0, registry_1.Step)("I expect the first database record to contain", expectFirstDbRecordToContain, "Then");
226
- (0, registry_1.Step)("I expect database row {int} to contain", expectDbRowToContain, "Then");
227
- (0, registry_1.Step)("I expect all database records to contain", expectAllDbRecordsToContain, "Then");
228
- (0, registry_1.Step)("I expect database column {string} to exist", expectDbColumnExists, "Then");
229
- (0, registry_1.Step)("I expect database column {string} to contain {string}", expectDbColumnContains, "Then");
230
- (0, registry_1.Step)("I expect database column {string} to be of type {string}", expectDbColumnType, "Then");
222
+ (0, registry_1.Step)("I pw run the database query {string}", runDbQuery, "When");
223
+ (0, registry_1.Step)("I pw expect the database to return {int} record(s)", expectDbRecordCount, "Then");
224
+ (0, registry_1.Step)("I pw expect the database to return no records", expectDbNoRecords, "Then");
225
+ (0, registry_1.Step)("I pw expect the first database record to contain", expectFirstDbRecordToContain, "Then");
226
+ (0, registry_1.Step)("I pw expect database row {int} to contain", expectDbRowToContain, "Then");
227
+ (0, registry_1.Step)("I pw expect all database records to contain", expectAllDbRecordsToContain, "Then");
228
+ (0, registry_1.Step)("I pw expect database column {string} to exist", expectDbColumnExists, "Then");
229
+ (0, registry_1.Step)("I pw expect database column {string} to contain {string}", expectDbColumnContains, "Then");
230
+ (0, registry_1.Step)("I pw expect database column {string} to be of type {string}", expectDbColumnType, "Then");
@@ -49,6 +49,6 @@ async function typeAndAcceptPrompt(page, textKey) {
49
49
  // ==================================================
50
50
  // GLUE STEPS
51
51
  // ==================================================
52
- (0, registry_1.Step)("I accept the next dialog", acceptNextDialog, "Given");
53
- (0, registry_1.Step)("I dismiss the next dialog", dismissNextDialog, "Given");
54
- (0, registry_1.Step)("I type {string} into the next prompt and accept", typeAndAcceptPrompt, "Given");
52
+ (0, registry_1.Step)("I pw accept the next dialog", acceptNextDialog, "Given");
53
+ (0, registry_1.Step)("I pw dismiss the next dialog", dismissNextDialog, "Given");
54
+ (0, registry_1.Step)("I pw type {string} into the next prompt and accept", typeAndAcceptPrompt, "Given");
@@ -318,29 +318,29 @@ async function findInputByName(page, name) {
318
318
  // ==================================================
319
319
  // GLUE STEPS
320
320
  // ==================================================
321
- (0, registry_1.Step)("I find element by selector {string}", findElementBySelector, "When");
322
- (0, registry_1.Step)("I get element by selector {string}", findElementBySelector, "When");
323
- (0, registry_1.Step)("I find element by text {string}", findElementByText, "When");
324
- (0, registry_1.Step)("I find element by title {string}", findElementByTitle, "When");
325
- (0, registry_1.Step)("I find element by testid {string}", findElementByTestId, "When");
326
- (0, registry_1.Step)("I find element by role {string}", findElementByRole, "When");
327
- (0, registry_1.Step)("I find element by placeholder text {string}", findElementByPlaceholder, "When");
328
- (0, registry_1.Step)("I find element by label text {string}", findElementByLabel, "When");
329
- (0, registry_1.Step)("I find element by alt text {string}", findElementByAltText, "When");
330
- (0, registry_1.Step)("I find link by text {string}", findLinkByText, "When");
331
- (0, registry_1.Step)("I find heading by text {string}", findHeadingByText, "When");
332
- (0, registry_1.Step)("I find element by name {string}", findElementByName, "When");
333
- (0, registry_1.Step)("I find elements by selector {string}", findElementsBySelector, "When");
334
- (0, registry_1.Step)("I get elements by selector {string}", findElementsBySelector, "When");
335
- (0, registry_1.Step)("I find buttons by text {string}", findButtonsByText, "When");
336
- (0, registry_1.Step)("I get first element", getFirstElement, "When");
337
- (0, registry_1.Step)("I get last element", getLastElement, "When");
338
- (0, registry_1.Step)("I get {int}(?:st|nd|rd|th) element", getNthElement, "When");
339
- (0, registry_1.Step)("I store element text as {string}", storeElementText, "When");
340
- (0, registry_1.Step)("I get focused element", getFocusedElement, "When");
341
- (0, registry_1.Step)("I find textarea by label text {string}", findTextareaByLabel, "When");
342
- (0, registry_1.Step)("I find input by display value {string}", findInputByValue, "When");
343
- (0, registry_1.Step)("I find input by placeholder text {string}", findInputByPlaceholder, "When");
344
- (0, registry_1.Step)("I find headings by text {string}", findHeadingsByText, "When");
345
- (0, registry_1.Step)("I find input by ID {string}", findInputById, "When");
346
- (0, registry_1.Step)("I find input by name {string}", findInputByName, "When");
321
+ (0, registry_1.Step)("I pw find element by selector {string}", findElementBySelector, "When");
322
+ (0, registry_1.Step)("I pw get element by selector {string}", findElementBySelector, "When");
323
+ (0, registry_1.Step)("I pw find element by text {string}", findElementByText, "When");
324
+ (0, registry_1.Step)("I pw find element by title {string}", findElementByTitle, "When");
325
+ (0, registry_1.Step)("I pw find element by testid {string}", findElementByTestId, "When");
326
+ (0, registry_1.Step)("I pw find element by role {string}", findElementByRole, "When");
327
+ (0, registry_1.Step)("I pw find element by placeholder text {string}", findElementByPlaceholder, "When");
328
+ (0, registry_1.Step)("I pw find element by label text {string}", findElementByLabel, "When");
329
+ (0, registry_1.Step)("I pw find element by alt text {string}", findElementByAltText, "When");
330
+ (0, registry_1.Step)("I pw find link by text {string}", findLinkByText, "When");
331
+ (0, registry_1.Step)("I pw find heading by text {string}", findHeadingByText, "When");
332
+ (0, registry_1.Step)("I pw find element by name {string}", findElementByName, "When");
333
+ (0, registry_1.Step)("I pw find elements by selector {string}", findElementsBySelector, "When");
334
+ (0, registry_1.Step)("I pw get elements by selector {string}", findElementsBySelector, "When");
335
+ (0, registry_1.Step)("I pw find buttons by text {string}", findButtonsByText, "When");
336
+ (0, registry_1.Step)("I pw get first element", getFirstElement, "When");
337
+ (0, registry_1.Step)("I pw get last element", getLastElement, "When");
338
+ (0, registry_1.Step)("I pw get {int}(?:st|nd|rd|th) element", getNthElement, "When");
339
+ (0, registry_1.Step)("I pw store element text as {string}", storeElementText, "When");
340
+ (0, registry_1.Step)("I pw get focused element", getFocusedElement, "When");
341
+ (0, registry_1.Step)("I pw find textarea by label text {string}", findTextareaByLabel, "When");
342
+ (0, registry_1.Step)("I pw find input by display value {string}", findInputByValue, "When");
343
+ (0, registry_1.Step)("I pw find input by placeholder text {string}", findInputByPlaceholder, "When");
344
+ (0, registry_1.Step)("I pw find headings by text {string}", findHeadingsByText, "When");
345
+ (0, registry_1.Step)("I pw find input by ID {string}", findInputById, "When");
346
+ (0, registry_1.Step)("I pw find input by name {string}", findInputByName, "When");
@@ -100,7 +100,7 @@ async function fileUpload(page, fileNameKey, selectorKey) {
100
100
  // ==================================================
101
101
  // GLUE STEPS
102
102
  // ==================================================
103
- (0, registry_1.Step)("I select option {string} from {string}", selectDropdownOption, "When");
104
- (0, registry_1.Step)("I check {string}", checkInput, "When");
105
- (0, registry_1.Step)("I uncheck {string}", uncheckInput, "When");
106
- (0, registry_1.Step)("I upload file {string} to {string}", fileUpload, "When");
103
+ (0, registry_1.Step)("I pw select option {string} from {string}", selectDropdownOption, "When");
104
+ (0, registry_1.Step)("I pw check {string}", checkInput, "When");
105
+ (0, registry_1.Step)("I pw uncheck {string}", uncheckInput, "When");
106
+ (0, registry_1.Step)("I pw upload file {string} to {string}", fileUpload, "When");
@@ -58,6 +58,6 @@ async function expectTextInsideFrame(page, elementSelectorKey, frameSelectorKey,
58
58
  // ==================================================
59
59
  // GLUE STEPS
60
60
  // ==================================================
61
- (0, registry_1.Step)("I click {string} inside frame {string}", clickInsideFrame, "When");
62
- (0, registry_1.Step)("I fill {string} inside frame {string} with {string}", fillInsideFrame, "When");
63
- (0, registry_1.Step)("I expect {string} inside frame {string} to have text {string}", expectTextInsideFrame, "Then");
61
+ (0, registry_1.Step)("I pw click {string} inside frame {string}", clickInsideFrame, "When");
62
+ (0, registry_1.Step)("I pw fill {string} inside frame {string} with {string}", fillInsideFrame, "When");
63
+ (0, registry_1.Step)("I pw expect {string} inside frame {string} to have text {string}", expectTextInsideFrame, "Then");
@@ -12,7 +12,7 @@ function resolveParam(key, fixtureFile) {
12
12
  // getFixtureValue handles the logic of returning the raw key if the value isn't found
13
13
  return (0, fixtures_1.getFixtureValue)(fixture, key);
14
14
  }
15
- catch (error) {
15
+ catch (_error) {
16
16
  // If fixture file is missing, fallback to the raw string
17
17
  return key;
18
18
  }
@@ -14,5 +14,5 @@ export interface ComponentRunnerOptions {
14
14
  * Runs component tests using Playwright's component testing capabilities
15
15
  * This allows testing individual UI components in isolation
16
16
  */
17
- export declare function runComponentTests(entryPoint: string, options?: ComponentRunnerOptions): void;
17
+ export declare function runComponentTests(entryPoint: string, options?: ComponentRunnerOptions): Promise<void>;
18
18
  //# sourceMappingURL=runner.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/component/runner.ts"],"names":[],"mappings":"AAMA,OAAO,0BAA0B,CAAC;AAClC,OAAO,6BAA6B,CAAC;AACrC,OAAO,2BAA2B,CAAC;AACnC,OAAO,sBAAsB,CAAC;AAC9B,OAAO,uBAAuB,CAAC;AAC/B,OAAO,wBAAwB,CAAC;AAChC,OAAO,qBAAqB,CAAC;AAE7B,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,sBAAsB,QAmCrF"}
1
+ {"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/component/runner.ts"],"names":[],"mappings":"AAMA,OAAO,0BAA0B,CAAC;AAClC,OAAO,6BAA6B,CAAC;AACrC,OAAO,2BAA2B,CAAC;AACnC,OAAO,sBAAsB,CAAC;AAC9B,OAAO,uBAAuB,CAAC;AAC/B,OAAO,wBAAwB,CAAC;AAChC,OAAO,qBAAqB,CAAC;AAE7B,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,wBAAsB,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,sBAAsB,iBAmC3F"}
@@ -1,4 +1,37 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
2
35
  Object.defineProperty(exports, "__esModule", { value: true });
3
36
  exports.runComponentTests = runComponentTests;
4
37
  // src/component/runner.ts
@@ -17,17 +50,17 @@ require("../backend/db/index");
17
50
  * Runs component tests using Playwright's component testing capabilities
18
51
  * This allows testing individual UI components in isolation
19
52
  */
20
- function runComponentTests(entryPoint, options) {
53
+ async function runComponentTests(entryPoint, options) {
21
54
  const files = (0, glob_1.globSync)(options?.componentGlob || entryPoint);
22
55
  if (files.length === 0) {
23
56
  console.log(`⚠️ No Component test files found for: ${entryPoint}`);
24
57
  }
25
58
  for (const file of files) {
26
59
  // Import the component test file to register any component-specific steps
27
- require(file);
60
+ await Promise.resolve(`${file}`).then(s => __importStar(require(s)));
28
61
  // Run tests using Playwright's component testing setup
29
62
  test_1.test.describe(`Component: ${file}`, () => {
30
- test_1.test.beforeEach(async ({ page }) => {
63
+ test_1.test.beforeEach(async ({ page: _page }) => {
31
64
  // Component testing setup would happen here
32
65
  // In actual component testing, we'd mount components directly
33
66
  console.log(`🔧 Preparing component test environment for: ${file}`);
@@ -36,7 +69,7 @@ function runComponentTests(entryPoint, options) {
36
69
  for (const step of registry_1.stepRegistry) {
37
70
  // Only run steps that are relevant to component testing
38
71
  if (isComponentRelevantStep(step)) {
39
- (0, test_1.test)(`Component step: ${typeof step.pattern === 'string' ? step.pattern : step.pattern.source}`, async ({ page }) => {
72
+ (0, test_1.test)(`Component step: ${typeof step.pattern === 'string' ? step.pattern : step.pattern.source}`, async ({ page: _page }) => {
40
73
  // In component testing context, we might have different parameters
41
74
  // For now, we'll just log that this would be a component test
42
75
  console.log(`🧪 Running component test for step: ${typeof step.pattern === 'string' ? step.pattern : step.pattern.source}`);
@@ -51,7 +84,7 @@ function runComponentTests(entryPoint, options) {
51
84
  /**
52
85
  * Determines if a step is relevant for component testing
53
86
  */
54
- function isComponentRelevantStep(step) {
87
+ function isComponentRelevantStep(_step) {
55
88
  // For now, consider all steps potentially relevant for component testing
56
89
  // In the future, we could have more specific logic
57
90
  return true;
@@ -179,7 +179,7 @@ function runTests(featureGlob, options) {
179
179
  // 3. SCENARIO REGEX
180
180
  // For scenario tags, we need to be more careful about comments
181
181
  // We'll process each scenario individually to check for comment lines
182
- const scenarioPattern = /(?:((?:@\S+\s*)+))?(?:Scenario|Scenario Outline):\s*(.+)/g;
182
+ const _scenarioPattern = /(?:((?:@\S+\s*)+))?(?:Scenario|Scenario Outline):\s*(.+)/g;
183
183
  let match;
184
184
  let foundCount = 0;
185
185
  // 3. SCENARIO REGEX
@@ -221,7 +221,7 @@ function runTests(featureGlob, options) {
221
221
  if (originalMatch) {
222
222
  // Find the exact position of this scenario in the original content
223
223
  const scenarioStartPattern = `(?:((?:@\\S+\\s*)+))?\\s*(?:Scenario|Scenario Outline):\\s*${escapeRegExp(scenarioName)}`;
224
- const scenarioStartRegex = new RegExp(scenarioStartPattern);
224
+ const _scenarioStartRegex = new RegExp(scenarioStartPattern);
225
225
  const scenarioStartMatch = content.match(scenarioStartPattern);
226
226
  if (scenarioStartMatch && scenarioStartMatch.index !== undefined) {
227
227
  const startIndex = scenarioStartMatch.index + scenarioStartMatch[0].length;
@@ -304,7 +304,7 @@ function findMatchingStep(text) {
304
304
  };
305
305
  }
306
306
  }
307
- catch (e) {
307
+ catch (_e) {
308
308
  // Continue to next step if Cucumber Expression fails
309
309
  continue;
310
310
  }