@softure-ai/marketing-kit 0.1.9 → 0.1.10

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 (67) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +83 -4
  3. package/dist/cli/main.js +42 -6
  4. package/dist/cli/main.js.map +1 -1
  5. package/dist/config/config.d.ts +2 -0
  6. package/dist/config/config.d.ts.map +1 -1
  7. package/dist/config/config.js +1 -0
  8. package/dist/config/config.js.map +1 -1
  9. package/dist/config/placeholders.d.ts +32 -0
  10. package/dist/config/placeholders.d.ts.map +1 -0
  11. package/dist/config/placeholders.js +41 -0
  12. package/dist/config/placeholders.js.map +1 -0
  13. package/dist/config/schema.d.ts +2206 -0
  14. package/dist/config/schema.d.ts.map +1 -1
  15. package/dist/config/schema.js +80 -0
  16. package/dist/config/schema.js.map +1 -1
  17. package/dist/config/shot-steps.d.ts +637 -0
  18. package/dist/config/shot-steps.d.ts.map +1 -0
  19. package/dist/config/shot-steps.js +44 -0
  20. package/dist/config/shot-steps.js.map +1 -0
  21. package/dist/record/actions.d.ts +3 -10
  22. package/dist/record/actions.d.ts.map +1 -1
  23. package/dist/record/actions.js +7 -23
  24. package/dist/record/actions.js.map +1 -1
  25. package/dist/record/locator.d.ts +10 -0
  26. package/dist/record/locator.d.ts.map +1 -0
  27. package/dist/record/locator.js +24 -0
  28. package/dist/record/locator.js.map +1 -0
  29. package/dist/screenshot/gates.d.ts +46 -5
  30. package/dist/screenshot/gates.d.ts.map +1 -1
  31. package/dist/screenshot/gates.js +41 -5
  32. package/dist/screenshot/gates.js.map +1 -1
  33. package/dist/screenshot/prepare.d.ts +18 -0
  34. package/dist/screenshot/prepare.d.ts.map +1 -0
  35. package/dist/screenshot/prepare.js +60 -0
  36. package/dist/screenshot/prepare.js.map +1 -0
  37. package/dist/screenshot/screenshot.d.ts +9 -2
  38. package/dist/screenshot/screenshot.d.ts.map +1 -1
  39. package/dist/screenshot/screenshot.js +86 -7
  40. package/dist/screenshot/screenshot.js.map +1 -1
  41. package/dist/screenshot/shot-texts.d.ts +26 -0
  42. package/dist/screenshot/shot-texts.d.ts.map +1 -0
  43. package/dist/screenshot/shot-texts.js +55 -0
  44. package/dist/screenshot/shot-texts.js.map +1 -0
  45. package/dist/screenshot/sign-in.d.ts +34 -0
  46. package/dist/screenshot/sign-in.d.ts.map +1 -0
  47. package/dist/screenshot/sign-in.js +66 -0
  48. package/dist/screenshot/sign-in.js.map +1 -0
  49. package/dist/screenshot/steps.d.ts +12 -0
  50. package/dist/screenshot/steps.d.ts.map +1 -0
  51. package/dist/screenshot/steps.js +38 -0
  52. package/dist/screenshot/steps.js.map +1 -0
  53. package/package.json +2 -2
  54. package/schema/marketing.schema.json +1842 -10
  55. package/src/cli/main.ts +40 -6
  56. package/src/config/config.ts +3 -0
  57. package/src/config/placeholders.ts +60 -0
  58. package/src/config/schema.ts +85 -0
  59. package/src/config/shot-steps.ts +58 -0
  60. package/src/record/actions.ts +5 -31
  61. package/src/record/locator.ts +37 -0
  62. package/src/screenshot/gates.ts +60 -5
  63. package/src/screenshot/prepare.ts +64 -0
  64. package/src/screenshot/screenshot.ts +89 -8
  65. package/src/screenshot/shot-texts.ts +72 -0
  66. package/src/screenshot/sign-in.ts +91 -0
  67. package/src/screenshot/steps.ts +44 -0
@@ -2637,7 +2637,6 @@
2637
2637
  "additionalProperties": false
2638
2638
  },
2639
2639
  "screenshots": {
2640
- "default": [],
2641
2640
  "description": "Screenshots taken by softure-marketing shots.",
2642
2641
  "type": "array",
2643
2642
  "items": {
@@ -2727,17 +2726,1850 @@
2727
2726
  "description": "A Playwright storage state (cookies and localStorage as JSON), relative to the folder of marketing.json, to capture a signed-in screen. It holds a session: keep it out of git.",
2728
2727
  "type": "string",
2729
2728
  "minLength": 1
2729
+ },
2730
+ "signedIn": {
2731
+ "default": false,
2732
+ "description": "Capture signed in through the signIn block: shots signs in once per run and keeps the session in memory. Not with storageState.",
2733
+ "type": "boolean"
2734
+ },
2735
+ "steps": {
2736
+ "description": "Done in order after the page loaded, before any gate reads it, e.g. a click that opens a collapsed section; a failing step refuses the shot.",
2737
+ "type": "array",
2738
+ "items": {
2739
+ "oneOf": [
2740
+ {
2741
+ "type": "object",
2742
+ "properties": {
2743
+ "do": {
2744
+ "type": "string",
2745
+ "const": "fill",
2746
+ "description": "Replaces the value of an input, e.g. the e-mail of the sign-in form."
2747
+ },
2748
+ "target": {
2749
+ "description": "The element, as a locator descriptor with exactly one of role, text, label, testId, css.",
2750
+ "type": "object",
2751
+ "properties": {
2752
+ "role": {
2753
+ "description": "Find by ARIA role (Playwright getByRole), e.g. button; narrow it with name.",
2754
+ "type": "string",
2755
+ "enum": [
2756
+ "alert",
2757
+ "alertdialog",
2758
+ "application",
2759
+ "article",
2760
+ "banner",
2761
+ "blockquote",
2762
+ "button",
2763
+ "caption",
2764
+ "cell",
2765
+ "checkbox",
2766
+ "code",
2767
+ "columnheader",
2768
+ "combobox",
2769
+ "complementary",
2770
+ "contentinfo",
2771
+ "definition",
2772
+ "deletion",
2773
+ "dialog",
2774
+ "directory",
2775
+ "document",
2776
+ "emphasis",
2777
+ "feed",
2778
+ "figure",
2779
+ "form",
2780
+ "generic",
2781
+ "grid",
2782
+ "gridcell",
2783
+ "group",
2784
+ "heading",
2785
+ "img",
2786
+ "insertion",
2787
+ "link",
2788
+ "list",
2789
+ "listbox",
2790
+ "listitem",
2791
+ "log",
2792
+ "main",
2793
+ "marquee",
2794
+ "math",
2795
+ "meter",
2796
+ "menu",
2797
+ "menubar",
2798
+ "menuitem",
2799
+ "menuitemcheckbox",
2800
+ "menuitemradio",
2801
+ "navigation",
2802
+ "none",
2803
+ "note",
2804
+ "option",
2805
+ "paragraph",
2806
+ "presentation",
2807
+ "progressbar",
2808
+ "radio",
2809
+ "radiogroup",
2810
+ "region",
2811
+ "row",
2812
+ "rowgroup",
2813
+ "rowheader",
2814
+ "scrollbar",
2815
+ "search",
2816
+ "searchbox",
2817
+ "separator",
2818
+ "slider",
2819
+ "spinbutton",
2820
+ "status",
2821
+ "strong",
2822
+ "subscript",
2823
+ "superscript",
2824
+ "switch",
2825
+ "tab",
2826
+ "table",
2827
+ "tablist",
2828
+ "tabpanel",
2829
+ "term",
2830
+ "textbox",
2831
+ "time",
2832
+ "timer",
2833
+ "toolbar",
2834
+ "tooltip",
2835
+ "tree",
2836
+ "treegrid",
2837
+ "treeitem"
2838
+ ]
2839
+ },
2840
+ "name": {
2841
+ "description": "The accessible name, with role: a string or { regex, flags }.",
2842
+ "anyOf": [
2843
+ {
2844
+ "type": "string",
2845
+ "minLength": 1
2846
+ },
2847
+ {
2848
+ "type": "object",
2849
+ "properties": {
2850
+ "regex": {
2851
+ "type": "string",
2852
+ "minLength": 1,
2853
+ "description": "A JavaScript regular expression source, without slashes."
2854
+ },
2855
+ "flags": {
2856
+ "default": "",
2857
+ "description": "Any of i, m, s, u, each at most once.",
2858
+ "type": "string",
2859
+ "pattern": "^(?!.*(.).*\\1)[imsu]*$"
2860
+ }
2861
+ },
2862
+ "required": [
2863
+ "regex"
2864
+ ],
2865
+ "additionalProperties": false
2866
+ }
2867
+ ]
2868
+ },
2869
+ "text": {
2870
+ "description": "Find by visible text (Playwright getByText): a substring, or { regex, flags }.",
2871
+ "anyOf": [
2872
+ {
2873
+ "type": "string",
2874
+ "minLength": 1
2875
+ },
2876
+ {
2877
+ "type": "object",
2878
+ "properties": {
2879
+ "regex": {
2880
+ "type": "string",
2881
+ "minLength": 1,
2882
+ "description": "A JavaScript regular expression source, without slashes."
2883
+ },
2884
+ "flags": {
2885
+ "default": "",
2886
+ "description": "Any of i, m, s, u, each at most once.",
2887
+ "type": "string",
2888
+ "pattern": "^(?!.*(.).*\\1)[imsu]*$"
2889
+ }
2890
+ },
2891
+ "required": [
2892
+ "regex"
2893
+ ],
2894
+ "additionalProperties": false
2895
+ }
2896
+ ]
2897
+ },
2898
+ "label": {
2899
+ "description": "Find a form control by its label (Playwright getByLabel): a substring, or { regex, flags }.",
2900
+ "anyOf": [
2901
+ {
2902
+ "type": "string",
2903
+ "minLength": 1
2904
+ },
2905
+ {
2906
+ "type": "object",
2907
+ "properties": {
2908
+ "regex": {
2909
+ "type": "string",
2910
+ "minLength": 1,
2911
+ "description": "A JavaScript regular expression source, without slashes."
2912
+ },
2913
+ "flags": {
2914
+ "default": "",
2915
+ "description": "Any of i, m, s, u, each at most once.",
2916
+ "type": "string",
2917
+ "pattern": "^(?!.*(.).*\\1)[imsu]*$"
2918
+ }
2919
+ },
2920
+ "required": [
2921
+ "regex"
2922
+ ],
2923
+ "additionalProperties": false
2924
+ }
2925
+ ]
2926
+ },
2927
+ "testId": {
2928
+ "description": "Find by data-testid (Playwright getByTestId).",
2929
+ "type": "string",
2930
+ "minLength": 1
2931
+ },
2932
+ "css": {
2933
+ "description": "Find by CSS selector; narrow it with hasText.",
2934
+ "type": "string",
2935
+ "minLength": 1
2936
+ },
2937
+ "hasText": {
2938
+ "description": "Only elements containing this text, with css.",
2939
+ "anyOf": [
2940
+ {
2941
+ "type": "string",
2942
+ "minLength": 1
2943
+ },
2944
+ {
2945
+ "type": "object",
2946
+ "properties": {
2947
+ "regex": {
2948
+ "type": "string",
2949
+ "minLength": 1,
2950
+ "description": "A JavaScript regular expression source, without slashes."
2951
+ },
2952
+ "flags": {
2953
+ "default": "",
2954
+ "description": "Any of i, m, s, u, each at most once.",
2955
+ "type": "string",
2956
+ "pattern": "^(?!.*(.).*\\1)[imsu]*$"
2957
+ }
2958
+ },
2959
+ "required": [
2960
+ "regex"
2961
+ ],
2962
+ "additionalProperties": false
2963
+ }
2964
+ ]
2965
+ },
2966
+ "exact": {
2967
+ "description": "Whole and case-sensitive match of a string name, text or label (default false).",
2968
+ "type": "boolean"
2969
+ },
2970
+ "nth": {
2971
+ "description": "The n-th match (0 = the first); without it, a locator that matches several elements fails.",
2972
+ "type": "integer",
2973
+ "minimum": 0,
2974
+ "maximum": 9007199254740991
2975
+ }
2976
+ },
2977
+ "additionalProperties": false
2978
+ },
2979
+ "value": {
2980
+ "type": "string",
2981
+ "description": "The value; {env:NAME} and {data:key} are replaced. Never printed, so a password may go here as {env:NAME}."
2982
+ }
2983
+ },
2984
+ "required": [
2985
+ "do",
2986
+ "target",
2987
+ "value"
2988
+ ],
2989
+ "additionalProperties": false
2990
+ },
2991
+ {
2992
+ "type": "object",
2993
+ "properties": {
2994
+ "do": {
2995
+ "type": "string",
2996
+ "const": "click",
2997
+ "description": "Clicks the element, e.g. the submit button or a collapsed section's summary."
2998
+ },
2999
+ "target": {
3000
+ "description": "The element, as a locator descriptor with exactly one of role, text, label, testId, css.",
3001
+ "type": "object",
3002
+ "properties": {
3003
+ "role": {
3004
+ "description": "Find by ARIA role (Playwright getByRole), e.g. button; narrow it with name.",
3005
+ "type": "string",
3006
+ "enum": [
3007
+ "alert",
3008
+ "alertdialog",
3009
+ "application",
3010
+ "article",
3011
+ "banner",
3012
+ "blockquote",
3013
+ "button",
3014
+ "caption",
3015
+ "cell",
3016
+ "checkbox",
3017
+ "code",
3018
+ "columnheader",
3019
+ "combobox",
3020
+ "complementary",
3021
+ "contentinfo",
3022
+ "definition",
3023
+ "deletion",
3024
+ "dialog",
3025
+ "directory",
3026
+ "document",
3027
+ "emphasis",
3028
+ "feed",
3029
+ "figure",
3030
+ "form",
3031
+ "generic",
3032
+ "grid",
3033
+ "gridcell",
3034
+ "group",
3035
+ "heading",
3036
+ "img",
3037
+ "insertion",
3038
+ "link",
3039
+ "list",
3040
+ "listbox",
3041
+ "listitem",
3042
+ "log",
3043
+ "main",
3044
+ "marquee",
3045
+ "math",
3046
+ "meter",
3047
+ "menu",
3048
+ "menubar",
3049
+ "menuitem",
3050
+ "menuitemcheckbox",
3051
+ "menuitemradio",
3052
+ "navigation",
3053
+ "none",
3054
+ "note",
3055
+ "option",
3056
+ "paragraph",
3057
+ "presentation",
3058
+ "progressbar",
3059
+ "radio",
3060
+ "radiogroup",
3061
+ "region",
3062
+ "row",
3063
+ "rowgroup",
3064
+ "rowheader",
3065
+ "scrollbar",
3066
+ "search",
3067
+ "searchbox",
3068
+ "separator",
3069
+ "slider",
3070
+ "spinbutton",
3071
+ "status",
3072
+ "strong",
3073
+ "subscript",
3074
+ "superscript",
3075
+ "switch",
3076
+ "tab",
3077
+ "table",
3078
+ "tablist",
3079
+ "tabpanel",
3080
+ "term",
3081
+ "textbox",
3082
+ "time",
3083
+ "timer",
3084
+ "toolbar",
3085
+ "tooltip",
3086
+ "tree",
3087
+ "treegrid",
3088
+ "treeitem"
3089
+ ]
3090
+ },
3091
+ "name": {
3092
+ "description": "The accessible name, with role: a string or { regex, flags }.",
3093
+ "anyOf": [
3094
+ {
3095
+ "type": "string",
3096
+ "minLength": 1
3097
+ },
3098
+ {
3099
+ "type": "object",
3100
+ "properties": {
3101
+ "regex": {
3102
+ "type": "string",
3103
+ "minLength": 1,
3104
+ "description": "A JavaScript regular expression source, without slashes."
3105
+ },
3106
+ "flags": {
3107
+ "default": "",
3108
+ "description": "Any of i, m, s, u, each at most once.",
3109
+ "type": "string",
3110
+ "pattern": "^(?!.*(.).*\\1)[imsu]*$"
3111
+ }
3112
+ },
3113
+ "required": [
3114
+ "regex"
3115
+ ],
3116
+ "additionalProperties": false
3117
+ }
3118
+ ]
3119
+ },
3120
+ "text": {
3121
+ "description": "Find by visible text (Playwright getByText): a substring, or { regex, flags }.",
3122
+ "anyOf": [
3123
+ {
3124
+ "type": "string",
3125
+ "minLength": 1
3126
+ },
3127
+ {
3128
+ "type": "object",
3129
+ "properties": {
3130
+ "regex": {
3131
+ "type": "string",
3132
+ "minLength": 1,
3133
+ "description": "A JavaScript regular expression source, without slashes."
3134
+ },
3135
+ "flags": {
3136
+ "default": "",
3137
+ "description": "Any of i, m, s, u, each at most once.",
3138
+ "type": "string",
3139
+ "pattern": "^(?!.*(.).*\\1)[imsu]*$"
3140
+ }
3141
+ },
3142
+ "required": [
3143
+ "regex"
3144
+ ],
3145
+ "additionalProperties": false
3146
+ }
3147
+ ]
3148
+ },
3149
+ "label": {
3150
+ "description": "Find a form control by its label (Playwright getByLabel): a substring, or { regex, flags }.",
3151
+ "anyOf": [
3152
+ {
3153
+ "type": "string",
3154
+ "minLength": 1
3155
+ },
3156
+ {
3157
+ "type": "object",
3158
+ "properties": {
3159
+ "regex": {
3160
+ "type": "string",
3161
+ "minLength": 1,
3162
+ "description": "A JavaScript regular expression source, without slashes."
3163
+ },
3164
+ "flags": {
3165
+ "default": "",
3166
+ "description": "Any of i, m, s, u, each at most once.",
3167
+ "type": "string",
3168
+ "pattern": "^(?!.*(.).*\\1)[imsu]*$"
3169
+ }
3170
+ },
3171
+ "required": [
3172
+ "regex"
3173
+ ],
3174
+ "additionalProperties": false
3175
+ }
3176
+ ]
3177
+ },
3178
+ "testId": {
3179
+ "description": "Find by data-testid (Playwright getByTestId).",
3180
+ "type": "string",
3181
+ "minLength": 1
3182
+ },
3183
+ "css": {
3184
+ "description": "Find by CSS selector; narrow it with hasText.",
3185
+ "type": "string",
3186
+ "minLength": 1
3187
+ },
3188
+ "hasText": {
3189
+ "description": "Only elements containing this text, with css.",
3190
+ "anyOf": [
3191
+ {
3192
+ "type": "string",
3193
+ "minLength": 1
3194
+ },
3195
+ {
3196
+ "type": "object",
3197
+ "properties": {
3198
+ "regex": {
3199
+ "type": "string",
3200
+ "minLength": 1,
3201
+ "description": "A JavaScript regular expression source, without slashes."
3202
+ },
3203
+ "flags": {
3204
+ "default": "",
3205
+ "description": "Any of i, m, s, u, each at most once.",
3206
+ "type": "string",
3207
+ "pattern": "^(?!.*(.).*\\1)[imsu]*$"
3208
+ }
3209
+ },
3210
+ "required": [
3211
+ "regex"
3212
+ ],
3213
+ "additionalProperties": false
3214
+ }
3215
+ ]
3216
+ },
3217
+ "exact": {
3218
+ "description": "Whole and case-sensitive match of a string name, text or label (default false).",
3219
+ "type": "boolean"
3220
+ },
3221
+ "nth": {
3222
+ "description": "The n-th match (0 = the first); without it, a locator that matches several elements fails.",
3223
+ "type": "integer",
3224
+ "minimum": 0,
3225
+ "maximum": 9007199254740991
3226
+ }
3227
+ },
3228
+ "additionalProperties": false
3229
+ }
3230
+ },
3231
+ "required": [
3232
+ "do",
3233
+ "target"
3234
+ ],
3235
+ "additionalProperties": false
3236
+ },
3237
+ {
3238
+ "type": "object",
3239
+ "properties": {
3240
+ "do": {
3241
+ "type": "string",
3242
+ "const": "check",
3243
+ "description": "Ticks a checkbox or radio button, e.g. the terms of a sign-up form."
3244
+ },
3245
+ "target": {
3246
+ "description": "The element, as a locator descriptor with exactly one of role, text, label, testId, css.",
3247
+ "type": "object",
3248
+ "properties": {
3249
+ "role": {
3250
+ "description": "Find by ARIA role (Playwright getByRole), e.g. button; narrow it with name.",
3251
+ "type": "string",
3252
+ "enum": [
3253
+ "alert",
3254
+ "alertdialog",
3255
+ "application",
3256
+ "article",
3257
+ "banner",
3258
+ "blockquote",
3259
+ "button",
3260
+ "caption",
3261
+ "cell",
3262
+ "checkbox",
3263
+ "code",
3264
+ "columnheader",
3265
+ "combobox",
3266
+ "complementary",
3267
+ "contentinfo",
3268
+ "definition",
3269
+ "deletion",
3270
+ "dialog",
3271
+ "directory",
3272
+ "document",
3273
+ "emphasis",
3274
+ "feed",
3275
+ "figure",
3276
+ "form",
3277
+ "generic",
3278
+ "grid",
3279
+ "gridcell",
3280
+ "group",
3281
+ "heading",
3282
+ "img",
3283
+ "insertion",
3284
+ "link",
3285
+ "list",
3286
+ "listbox",
3287
+ "listitem",
3288
+ "log",
3289
+ "main",
3290
+ "marquee",
3291
+ "math",
3292
+ "meter",
3293
+ "menu",
3294
+ "menubar",
3295
+ "menuitem",
3296
+ "menuitemcheckbox",
3297
+ "menuitemradio",
3298
+ "navigation",
3299
+ "none",
3300
+ "note",
3301
+ "option",
3302
+ "paragraph",
3303
+ "presentation",
3304
+ "progressbar",
3305
+ "radio",
3306
+ "radiogroup",
3307
+ "region",
3308
+ "row",
3309
+ "rowgroup",
3310
+ "rowheader",
3311
+ "scrollbar",
3312
+ "search",
3313
+ "searchbox",
3314
+ "separator",
3315
+ "slider",
3316
+ "spinbutton",
3317
+ "status",
3318
+ "strong",
3319
+ "subscript",
3320
+ "superscript",
3321
+ "switch",
3322
+ "tab",
3323
+ "table",
3324
+ "tablist",
3325
+ "tabpanel",
3326
+ "term",
3327
+ "textbox",
3328
+ "time",
3329
+ "timer",
3330
+ "toolbar",
3331
+ "tooltip",
3332
+ "tree",
3333
+ "treegrid",
3334
+ "treeitem"
3335
+ ]
3336
+ },
3337
+ "name": {
3338
+ "description": "The accessible name, with role: a string or { regex, flags }.",
3339
+ "anyOf": [
3340
+ {
3341
+ "type": "string",
3342
+ "minLength": 1
3343
+ },
3344
+ {
3345
+ "type": "object",
3346
+ "properties": {
3347
+ "regex": {
3348
+ "type": "string",
3349
+ "minLength": 1,
3350
+ "description": "A JavaScript regular expression source, without slashes."
3351
+ },
3352
+ "flags": {
3353
+ "default": "",
3354
+ "description": "Any of i, m, s, u, each at most once.",
3355
+ "type": "string",
3356
+ "pattern": "^(?!.*(.).*\\1)[imsu]*$"
3357
+ }
3358
+ },
3359
+ "required": [
3360
+ "regex"
3361
+ ],
3362
+ "additionalProperties": false
3363
+ }
3364
+ ]
3365
+ },
3366
+ "text": {
3367
+ "description": "Find by visible text (Playwright getByText): a substring, or { regex, flags }.",
3368
+ "anyOf": [
3369
+ {
3370
+ "type": "string",
3371
+ "minLength": 1
3372
+ },
3373
+ {
3374
+ "type": "object",
3375
+ "properties": {
3376
+ "regex": {
3377
+ "type": "string",
3378
+ "minLength": 1,
3379
+ "description": "A JavaScript regular expression source, without slashes."
3380
+ },
3381
+ "flags": {
3382
+ "default": "",
3383
+ "description": "Any of i, m, s, u, each at most once.",
3384
+ "type": "string",
3385
+ "pattern": "^(?!.*(.).*\\1)[imsu]*$"
3386
+ }
3387
+ },
3388
+ "required": [
3389
+ "regex"
3390
+ ],
3391
+ "additionalProperties": false
3392
+ }
3393
+ ]
3394
+ },
3395
+ "label": {
3396
+ "description": "Find a form control by its label (Playwright getByLabel): a substring, or { regex, flags }.",
3397
+ "anyOf": [
3398
+ {
3399
+ "type": "string",
3400
+ "minLength": 1
3401
+ },
3402
+ {
3403
+ "type": "object",
3404
+ "properties": {
3405
+ "regex": {
3406
+ "type": "string",
3407
+ "minLength": 1,
3408
+ "description": "A JavaScript regular expression source, without slashes."
3409
+ },
3410
+ "flags": {
3411
+ "default": "",
3412
+ "description": "Any of i, m, s, u, each at most once.",
3413
+ "type": "string",
3414
+ "pattern": "^(?!.*(.).*\\1)[imsu]*$"
3415
+ }
3416
+ },
3417
+ "required": [
3418
+ "regex"
3419
+ ],
3420
+ "additionalProperties": false
3421
+ }
3422
+ ]
3423
+ },
3424
+ "testId": {
3425
+ "description": "Find by data-testid (Playwright getByTestId).",
3426
+ "type": "string",
3427
+ "minLength": 1
3428
+ },
3429
+ "css": {
3430
+ "description": "Find by CSS selector; narrow it with hasText.",
3431
+ "type": "string",
3432
+ "minLength": 1
3433
+ },
3434
+ "hasText": {
3435
+ "description": "Only elements containing this text, with css.",
3436
+ "anyOf": [
3437
+ {
3438
+ "type": "string",
3439
+ "minLength": 1
3440
+ },
3441
+ {
3442
+ "type": "object",
3443
+ "properties": {
3444
+ "regex": {
3445
+ "type": "string",
3446
+ "minLength": 1,
3447
+ "description": "A JavaScript regular expression source, without slashes."
3448
+ },
3449
+ "flags": {
3450
+ "default": "",
3451
+ "description": "Any of i, m, s, u, each at most once.",
3452
+ "type": "string",
3453
+ "pattern": "^(?!.*(.).*\\1)[imsu]*$"
3454
+ }
3455
+ },
3456
+ "required": [
3457
+ "regex"
3458
+ ],
3459
+ "additionalProperties": false
3460
+ }
3461
+ ]
3462
+ },
3463
+ "exact": {
3464
+ "description": "Whole and case-sensitive match of a string name, text or label (default false).",
3465
+ "type": "boolean"
3466
+ },
3467
+ "nth": {
3468
+ "description": "The n-th match (0 = the first); without it, a locator that matches several elements fails.",
3469
+ "type": "integer",
3470
+ "minimum": 0,
3471
+ "maximum": 9007199254740991
3472
+ }
3473
+ },
3474
+ "additionalProperties": false
3475
+ }
3476
+ },
3477
+ "required": [
3478
+ "do",
3479
+ "target"
3480
+ ],
3481
+ "additionalProperties": false
3482
+ },
3483
+ {
3484
+ "type": "object",
3485
+ "properties": {
3486
+ "do": {
3487
+ "type": "string",
3488
+ "const": "press",
3489
+ "description": "Presses a key on the focused element, e.g. Enter."
3490
+ },
3491
+ "key": {
3492
+ "type": "string",
3493
+ "pattern": "^\\S+$",
3494
+ "description": "A Playwright key name; modifiers joined with +."
3495
+ }
3496
+ },
3497
+ "required": [
3498
+ "do",
3499
+ "key"
3500
+ ],
3501
+ "additionalProperties": false
3502
+ }
3503
+ ]
3504
+ }
3505
+ },
3506
+ "crop": {
3507
+ "description": "Capture one element at a fixed aspect ratio (e.g. 4:3 around a chart) instead of the viewport: as wide as the element, from its top edge. Not with full or scrollTo.",
3508
+ "type": "object",
3509
+ "properties": {
3510
+ "target": {
3511
+ "description": "The element framed: exactly one match (nth picks one of several).",
3512
+ "type": "object",
3513
+ "properties": {
3514
+ "role": {
3515
+ "description": "Find by ARIA role (Playwright getByRole), e.g. button; narrow it with name.",
3516
+ "type": "string",
3517
+ "enum": [
3518
+ "alert",
3519
+ "alertdialog",
3520
+ "application",
3521
+ "article",
3522
+ "banner",
3523
+ "blockquote",
3524
+ "button",
3525
+ "caption",
3526
+ "cell",
3527
+ "checkbox",
3528
+ "code",
3529
+ "columnheader",
3530
+ "combobox",
3531
+ "complementary",
3532
+ "contentinfo",
3533
+ "definition",
3534
+ "deletion",
3535
+ "dialog",
3536
+ "directory",
3537
+ "document",
3538
+ "emphasis",
3539
+ "feed",
3540
+ "figure",
3541
+ "form",
3542
+ "generic",
3543
+ "grid",
3544
+ "gridcell",
3545
+ "group",
3546
+ "heading",
3547
+ "img",
3548
+ "insertion",
3549
+ "link",
3550
+ "list",
3551
+ "listbox",
3552
+ "listitem",
3553
+ "log",
3554
+ "main",
3555
+ "marquee",
3556
+ "math",
3557
+ "meter",
3558
+ "menu",
3559
+ "menubar",
3560
+ "menuitem",
3561
+ "menuitemcheckbox",
3562
+ "menuitemradio",
3563
+ "navigation",
3564
+ "none",
3565
+ "note",
3566
+ "option",
3567
+ "paragraph",
3568
+ "presentation",
3569
+ "progressbar",
3570
+ "radio",
3571
+ "radiogroup",
3572
+ "region",
3573
+ "row",
3574
+ "rowgroup",
3575
+ "rowheader",
3576
+ "scrollbar",
3577
+ "search",
3578
+ "searchbox",
3579
+ "separator",
3580
+ "slider",
3581
+ "spinbutton",
3582
+ "status",
3583
+ "strong",
3584
+ "subscript",
3585
+ "superscript",
3586
+ "switch",
3587
+ "tab",
3588
+ "table",
3589
+ "tablist",
3590
+ "tabpanel",
3591
+ "term",
3592
+ "textbox",
3593
+ "time",
3594
+ "timer",
3595
+ "toolbar",
3596
+ "tooltip",
3597
+ "tree",
3598
+ "treegrid",
3599
+ "treeitem"
3600
+ ]
3601
+ },
3602
+ "name": {
3603
+ "description": "The accessible name, with role: a string or { regex, flags }.",
3604
+ "anyOf": [
3605
+ {
3606
+ "type": "string",
3607
+ "minLength": 1
3608
+ },
3609
+ {
3610
+ "type": "object",
3611
+ "properties": {
3612
+ "regex": {
3613
+ "type": "string",
3614
+ "minLength": 1,
3615
+ "description": "A JavaScript regular expression source, without slashes."
3616
+ },
3617
+ "flags": {
3618
+ "default": "",
3619
+ "description": "Any of i, m, s, u, each at most once.",
3620
+ "type": "string",
3621
+ "pattern": "^(?!.*(.).*\\1)[imsu]*$"
3622
+ }
3623
+ },
3624
+ "required": [
3625
+ "regex"
3626
+ ],
3627
+ "additionalProperties": false
3628
+ }
3629
+ ]
3630
+ },
3631
+ "text": {
3632
+ "description": "Find by visible text (Playwright getByText): a substring, or { regex, flags }.",
3633
+ "anyOf": [
3634
+ {
3635
+ "type": "string",
3636
+ "minLength": 1
3637
+ },
3638
+ {
3639
+ "type": "object",
3640
+ "properties": {
3641
+ "regex": {
3642
+ "type": "string",
3643
+ "minLength": 1,
3644
+ "description": "A JavaScript regular expression source, without slashes."
3645
+ },
3646
+ "flags": {
3647
+ "default": "",
3648
+ "description": "Any of i, m, s, u, each at most once.",
3649
+ "type": "string",
3650
+ "pattern": "^(?!.*(.).*\\1)[imsu]*$"
3651
+ }
3652
+ },
3653
+ "required": [
3654
+ "regex"
3655
+ ],
3656
+ "additionalProperties": false
3657
+ }
3658
+ ]
3659
+ },
3660
+ "label": {
3661
+ "description": "Find a form control by its label (Playwright getByLabel): a substring, or { regex, flags }.",
3662
+ "anyOf": [
3663
+ {
3664
+ "type": "string",
3665
+ "minLength": 1
3666
+ },
3667
+ {
3668
+ "type": "object",
3669
+ "properties": {
3670
+ "regex": {
3671
+ "type": "string",
3672
+ "minLength": 1,
3673
+ "description": "A JavaScript regular expression source, without slashes."
3674
+ },
3675
+ "flags": {
3676
+ "default": "",
3677
+ "description": "Any of i, m, s, u, each at most once.",
3678
+ "type": "string",
3679
+ "pattern": "^(?!.*(.).*\\1)[imsu]*$"
3680
+ }
3681
+ },
3682
+ "required": [
3683
+ "regex"
3684
+ ],
3685
+ "additionalProperties": false
3686
+ }
3687
+ ]
3688
+ },
3689
+ "testId": {
3690
+ "description": "Find by data-testid (Playwright getByTestId).",
3691
+ "type": "string",
3692
+ "minLength": 1
3693
+ },
3694
+ "css": {
3695
+ "description": "Find by CSS selector; narrow it with hasText.",
3696
+ "type": "string",
3697
+ "minLength": 1
3698
+ },
3699
+ "hasText": {
3700
+ "description": "Only elements containing this text, with css.",
3701
+ "anyOf": [
3702
+ {
3703
+ "type": "string",
3704
+ "minLength": 1
3705
+ },
3706
+ {
3707
+ "type": "object",
3708
+ "properties": {
3709
+ "regex": {
3710
+ "type": "string",
3711
+ "minLength": 1,
3712
+ "description": "A JavaScript regular expression source, without slashes."
3713
+ },
3714
+ "flags": {
3715
+ "default": "",
3716
+ "description": "Any of i, m, s, u, each at most once.",
3717
+ "type": "string",
3718
+ "pattern": "^(?!.*(.).*\\1)[imsu]*$"
3719
+ }
3720
+ },
3721
+ "required": [
3722
+ "regex"
3723
+ ],
3724
+ "additionalProperties": false
3725
+ }
3726
+ ]
3727
+ },
3728
+ "exact": {
3729
+ "description": "Whole and case-sensitive match of a string name, text or label (default false).",
3730
+ "type": "boolean"
3731
+ },
3732
+ "nth": {
3733
+ "description": "The n-th match (0 = the first); without it, a locator that matches several elements fails.",
3734
+ "type": "integer",
3735
+ "minimum": 0,
3736
+ "maximum": 9007199254740991
3737
+ }
3738
+ },
3739
+ "additionalProperties": false
3740
+ },
3741
+ "aspect": {
3742
+ "description": "The frame's width to height, e.g. 4:3: as wide as the element (plus padding), from its top edge down.",
3743
+ "type": "string",
3744
+ "pattern": "^[1-9]\\d{0,3}:[1-9]\\d{0,3}$"
3745
+ },
3746
+ "padding": {
3747
+ "default": 0,
3748
+ "description": "CSS pixels of the page around the element on the left, right and top (0-200, default 0).",
3749
+ "type": "integer",
3750
+ "minimum": 0,
3751
+ "maximum": 200
3752
+ }
3753
+ },
3754
+ "required": [
3755
+ "target",
3756
+ "aspect"
3757
+ ],
3758
+ "additionalProperties": false
3759
+ }
3760
+ },
3761
+ "required": [
3762
+ "id",
3763
+ "path",
3764
+ "width",
3765
+ "height",
3766
+ "expect"
3767
+ ],
3768
+ "additionalProperties": false
3769
+ }
3770
+ },
3771
+ "signIn": {
3772
+ "description": "How softure-marketing shots signs in for the screenshots with signedIn: true, and the optional command that prepares the account.",
3773
+ "type": "object",
3774
+ "properties": {
3775
+ "prepare": {
3776
+ "description": "A command (arguments, no shell, run in the folder of marketing.json once the app answers, with MARKETING_BASE_URL set) that creates and seeds the account; its last line of output is a JSON object of strings or numbers, read as {data:key}. Its output is not printed.",
3777
+ "minItems": 1,
3778
+ "type": "array",
3779
+ "items": {
3780
+ "type": "string",
3781
+ "minLength": 1
2730
3782
  }
2731
3783
  },
2732
- "required": [
2733
- "id",
2734
- "path",
2735
- "width",
2736
- "height",
2737
- "expect"
2738
- ],
2739
- "additionalProperties": false
2740
- }
3784
+ "path": {
3785
+ "type": "string",
3786
+ "format": "starts_with",
3787
+ "pattern": "^\\/.*",
3788
+ "description": "The sign-in page, e.g. /login."
3789
+ },
3790
+ "steps": {
3791
+ "minItems": 1,
3792
+ "type": "array",
3793
+ "items": {
3794
+ "oneOf": [
3795
+ {
3796
+ "type": "object",
3797
+ "properties": {
3798
+ "do": {
3799
+ "type": "string",
3800
+ "const": "fill",
3801
+ "description": "Replaces the value of an input, e.g. the e-mail of the sign-in form."
3802
+ },
3803
+ "target": {
3804
+ "description": "The element, as a locator descriptor with exactly one of role, text, label, testId, css.",
3805
+ "type": "object",
3806
+ "properties": {
3807
+ "role": {
3808
+ "description": "Find by ARIA role (Playwright getByRole), e.g. button; narrow it with name.",
3809
+ "type": "string",
3810
+ "enum": [
3811
+ "alert",
3812
+ "alertdialog",
3813
+ "application",
3814
+ "article",
3815
+ "banner",
3816
+ "blockquote",
3817
+ "button",
3818
+ "caption",
3819
+ "cell",
3820
+ "checkbox",
3821
+ "code",
3822
+ "columnheader",
3823
+ "combobox",
3824
+ "complementary",
3825
+ "contentinfo",
3826
+ "definition",
3827
+ "deletion",
3828
+ "dialog",
3829
+ "directory",
3830
+ "document",
3831
+ "emphasis",
3832
+ "feed",
3833
+ "figure",
3834
+ "form",
3835
+ "generic",
3836
+ "grid",
3837
+ "gridcell",
3838
+ "group",
3839
+ "heading",
3840
+ "img",
3841
+ "insertion",
3842
+ "link",
3843
+ "list",
3844
+ "listbox",
3845
+ "listitem",
3846
+ "log",
3847
+ "main",
3848
+ "marquee",
3849
+ "math",
3850
+ "meter",
3851
+ "menu",
3852
+ "menubar",
3853
+ "menuitem",
3854
+ "menuitemcheckbox",
3855
+ "menuitemradio",
3856
+ "navigation",
3857
+ "none",
3858
+ "note",
3859
+ "option",
3860
+ "paragraph",
3861
+ "presentation",
3862
+ "progressbar",
3863
+ "radio",
3864
+ "radiogroup",
3865
+ "region",
3866
+ "row",
3867
+ "rowgroup",
3868
+ "rowheader",
3869
+ "scrollbar",
3870
+ "search",
3871
+ "searchbox",
3872
+ "separator",
3873
+ "slider",
3874
+ "spinbutton",
3875
+ "status",
3876
+ "strong",
3877
+ "subscript",
3878
+ "superscript",
3879
+ "switch",
3880
+ "tab",
3881
+ "table",
3882
+ "tablist",
3883
+ "tabpanel",
3884
+ "term",
3885
+ "textbox",
3886
+ "time",
3887
+ "timer",
3888
+ "toolbar",
3889
+ "tooltip",
3890
+ "tree",
3891
+ "treegrid",
3892
+ "treeitem"
3893
+ ]
3894
+ },
3895
+ "name": {
3896
+ "description": "The accessible name, with role: a string or { regex, flags }.",
3897
+ "anyOf": [
3898
+ {
3899
+ "type": "string",
3900
+ "minLength": 1
3901
+ },
3902
+ {
3903
+ "type": "object",
3904
+ "properties": {
3905
+ "regex": {
3906
+ "type": "string",
3907
+ "minLength": 1,
3908
+ "description": "A JavaScript regular expression source, without slashes."
3909
+ },
3910
+ "flags": {
3911
+ "default": "",
3912
+ "description": "Any of i, m, s, u, each at most once.",
3913
+ "type": "string",
3914
+ "pattern": "^(?!.*(.).*\\1)[imsu]*$"
3915
+ }
3916
+ },
3917
+ "required": [
3918
+ "regex"
3919
+ ],
3920
+ "additionalProperties": false
3921
+ }
3922
+ ]
3923
+ },
3924
+ "text": {
3925
+ "description": "Find by visible text (Playwright getByText): a substring, or { regex, flags }.",
3926
+ "anyOf": [
3927
+ {
3928
+ "type": "string",
3929
+ "minLength": 1
3930
+ },
3931
+ {
3932
+ "type": "object",
3933
+ "properties": {
3934
+ "regex": {
3935
+ "type": "string",
3936
+ "minLength": 1,
3937
+ "description": "A JavaScript regular expression source, without slashes."
3938
+ },
3939
+ "flags": {
3940
+ "default": "",
3941
+ "description": "Any of i, m, s, u, each at most once.",
3942
+ "type": "string",
3943
+ "pattern": "^(?!.*(.).*\\1)[imsu]*$"
3944
+ }
3945
+ },
3946
+ "required": [
3947
+ "regex"
3948
+ ],
3949
+ "additionalProperties": false
3950
+ }
3951
+ ]
3952
+ },
3953
+ "label": {
3954
+ "description": "Find a form control by its label (Playwright getByLabel): a substring, or { regex, flags }.",
3955
+ "anyOf": [
3956
+ {
3957
+ "type": "string",
3958
+ "minLength": 1
3959
+ },
3960
+ {
3961
+ "type": "object",
3962
+ "properties": {
3963
+ "regex": {
3964
+ "type": "string",
3965
+ "minLength": 1,
3966
+ "description": "A JavaScript regular expression source, without slashes."
3967
+ },
3968
+ "flags": {
3969
+ "default": "",
3970
+ "description": "Any of i, m, s, u, each at most once.",
3971
+ "type": "string",
3972
+ "pattern": "^(?!.*(.).*\\1)[imsu]*$"
3973
+ }
3974
+ },
3975
+ "required": [
3976
+ "regex"
3977
+ ],
3978
+ "additionalProperties": false
3979
+ }
3980
+ ]
3981
+ },
3982
+ "testId": {
3983
+ "description": "Find by data-testid (Playwright getByTestId).",
3984
+ "type": "string",
3985
+ "minLength": 1
3986
+ },
3987
+ "css": {
3988
+ "description": "Find by CSS selector; narrow it with hasText.",
3989
+ "type": "string",
3990
+ "minLength": 1
3991
+ },
3992
+ "hasText": {
3993
+ "description": "Only elements containing this text, with css.",
3994
+ "anyOf": [
3995
+ {
3996
+ "type": "string",
3997
+ "minLength": 1
3998
+ },
3999
+ {
4000
+ "type": "object",
4001
+ "properties": {
4002
+ "regex": {
4003
+ "type": "string",
4004
+ "minLength": 1,
4005
+ "description": "A JavaScript regular expression source, without slashes."
4006
+ },
4007
+ "flags": {
4008
+ "default": "",
4009
+ "description": "Any of i, m, s, u, each at most once.",
4010
+ "type": "string",
4011
+ "pattern": "^(?!.*(.).*\\1)[imsu]*$"
4012
+ }
4013
+ },
4014
+ "required": [
4015
+ "regex"
4016
+ ],
4017
+ "additionalProperties": false
4018
+ }
4019
+ ]
4020
+ },
4021
+ "exact": {
4022
+ "description": "Whole and case-sensitive match of a string name, text or label (default false).",
4023
+ "type": "boolean"
4024
+ },
4025
+ "nth": {
4026
+ "description": "The n-th match (0 = the first); without it, a locator that matches several elements fails.",
4027
+ "type": "integer",
4028
+ "minimum": 0,
4029
+ "maximum": 9007199254740991
4030
+ }
4031
+ },
4032
+ "additionalProperties": false
4033
+ },
4034
+ "value": {
4035
+ "type": "string",
4036
+ "description": "The value; {env:NAME} and {data:key} are replaced. Never printed, so a password may go here as {env:NAME}."
4037
+ }
4038
+ },
4039
+ "required": [
4040
+ "do",
4041
+ "target",
4042
+ "value"
4043
+ ],
4044
+ "additionalProperties": false
4045
+ },
4046
+ {
4047
+ "type": "object",
4048
+ "properties": {
4049
+ "do": {
4050
+ "type": "string",
4051
+ "const": "click",
4052
+ "description": "Clicks the element, e.g. the submit button or a collapsed section's summary."
4053
+ },
4054
+ "target": {
4055
+ "description": "The element, as a locator descriptor with exactly one of role, text, label, testId, css.",
4056
+ "type": "object",
4057
+ "properties": {
4058
+ "role": {
4059
+ "description": "Find by ARIA role (Playwright getByRole), e.g. button; narrow it with name.",
4060
+ "type": "string",
4061
+ "enum": [
4062
+ "alert",
4063
+ "alertdialog",
4064
+ "application",
4065
+ "article",
4066
+ "banner",
4067
+ "blockquote",
4068
+ "button",
4069
+ "caption",
4070
+ "cell",
4071
+ "checkbox",
4072
+ "code",
4073
+ "columnheader",
4074
+ "combobox",
4075
+ "complementary",
4076
+ "contentinfo",
4077
+ "definition",
4078
+ "deletion",
4079
+ "dialog",
4080
+ "directory",
4081
+ "document",
4082
+ "emphasis",
4083
+ "feed",
4084
+ "figure",
4085
+ "form",
4086
+ "generic",
4087
+ "grid",
4088
+ "gridcell",
4089
+ "group",
4090
+ "heading",
4091
+ "img",
4092
+ "insertion",
4093
+ "link",
4094
+ "list",
4095
+ "listbox",
4096
+ "listitem",
4097
+ "log",
4098
+ "main",
4099
+ "marquee",
4100
+ "math",
4101
+ "meter",
4102
+ "menu",
4103
+ "menubar",
4104
+ "menuitem",
4105
+ "menuitemcheckbox",
4106
+ "menuitemradio",
4107
+ "navigation",
4108
+ "none",
4109
+ "note",
4110
+ "option",
4111
+ "paragraph",
4112
+ "presentation",
4113
+ "progressbar",
4114
+ "radio",
4115
+ "radiogroup",
4116
+ "region",
4117
+ "row",
4118
+ "rowgroup",
4119
+ "rowheader",
4120
+ "scrollbar",
4121
+ "search",
4122
+ "searchbox",
4123
+ "separator",
4124
+ "slider",
4125
+ "spinbutton",
4126
+ "status",
4127
+ "strong",
4128
+ "subscript",
4129
+ "superscript",
4130
+ "switch",
4131
+ "tab",
4132
+ "table",
4133
+ "tablist",
4134
+ "tabpanel",
4135
+ "term",
4136
+ "textbox",
4137
+ "time",
4138
+ "timer",
4139
+ "toolbar",
4140
+ "tooltip",
4141
+ "tree",
4142
+ "treegrid",
4143
+ "treeitem"
4144
+ ]
4145
+ },
4146
+ "name": {
4147
+ "description": "The accessible name, with role: a string or { regex, flags }.",
4148
+ "anyOf": [
4149
+ {
4150
+ "type": "string",
4151
+ "minLength": 1
4152
+ },
4153
+ {
4154
+ "type": "object",
4155
+ "properties": {
4156
+ "regex": {
4157
+ "type": "string",
4158
+ "minLength": 1,
4159
+ "description": "A JavaScript regular expression source, without slashes."
4160
+ },
4161
+ "flags": {
4162
+ "default": "",
4163
+ "description": "Any of i, m, s, u, each at most once.",
4164
+ "type": "string",
4165
+ "pattern": "^(?!.*(.).*\\1)[imsu]*$"
4166
+ }
4167
+ },
4168
+ "required": [
4169
+ "regex"
4170
+ ],
4171
+ "additionalProperties": false
4172
+ }
4173
+ ]
4174
+ },
4175
+ "text": {
4176
+ "description": "Find by visible text (Playwright getByText): a substring, or { regex, flags }.",
4177
+ "anyOf": [
4178
+ {
4179
+ "type": "string",
4180
+ "minLength": 1
4181
+ },
4182
+ {
4183
+ "type": "object",
4184
+ "properties": {
4185
+ "regex": {
4186
+ "type": "string",
4187
+ "minLength": 1,
4188
+ "description": "A JavaScript regular expression source, without slashes."
4189
+ },
4190
+ "flags": {
4191
+ "default": "",
4192
+ "description": "Any of i, m, s, u, each at most once.",
4193
+ "type": "string",
4194
+ "pattern": "^(?!.*(.).*\\1)[imsu]*$"
4195
+ }
4196
+ },
4197
+ "required": [
4198
+ "regex"
4199
+ ],
4200
+ "additionalProperties": false
4201
+ }
4202
+ ]
4203
+ },
4204
+ "label": {
4205
+ "description": "Find a form control by its label (Playwright getByLabel): a substring, or { regex, flags }.",
4206
+ "anyOf": [
4207
+ {
4208
+ "type": "string",
4209
+ "minLength": 1
4210
+ },
4211
+ {
4212
+ "type": "object",
4213
+ "properties": {
4214
+ "regex": {
4215
+ "type": "string",
4216
+ "minLength": 1,
4217
+ "description": "A JavaScript regular expression source, without slashes."
4218
+ },
4219
+ "flags": {
4220
+ "default": "",
4221
+ "description": "Any of i, m, s, u, each at most once.",
4222
+ "type": "string",
4223
+ "pattern": "^(?!.*(.).*\\1)[imsu]*$"
4224
+ }
4225
+ },
4226
+ "required": [
4227
+ "regex"
4228
+ ],
4229
+ "additionalProperties": false
4230
+ }
4231
+ ]
4232
+ },
4233
+ "testId": {
4234
+ "description": "Find by data-testid (Playwright getByTestId).",
4235
+ "type": "string",
4236
+ "minLength": 1
4237
+ },
4238
+ "css": {
4239
+ "description": "Find by CSS selector; narrow it with hasText.",
4240
+ "type": "string",
4241
+ "minLength": 1
4242
+ },
4243
+ "hasText": {
4244
+ "description": "Only elements containing this text, with css.",
4245
+ "anyOf": [
4246
+ {
4247
+ "type": "string",
4248
+ "minLength": 1
4249
+ },
4250
+ {
4251
+ "type": "object",
4252
+ "properties": {
4253
+ "regex": {
4254
+ "type": "string",
4255
+ "minLength": 1,
4256
+ "description": "A JavaScript regular expression source, without slashes."
4257
+ },
4258
+ "flags": {
4259
+ "default": "",
4260
+ "description": "Any of i, m, s, u, each at most once.",
4261
+ "type": "string",
4262
+ "pattern": "^(?!.*(.).*\\1)[imsu]*$"
4263
+ }
4264
+ },
4265
+ "required": [
4266
+ "regex"
4267
+ ],
4268
+ "additionalProperties": false
4269
+ }
4270
+ ]
4271
+ },
4272
+ "exact": {
4273
+ "description": "Whole and case-sensitive match of a string name, text or label (default false).",
4274
+ "type": "boolean"
4275
+ },
4276
+ "nth": {
4277
+ "description": "The n-th match (0 = the first); without it, a locator that matches several elements fails.",
4278
+ "type": "integer",
4279
+ "minimum": 0,
4280
+ "maximum": 9007199254740991
4281
+ }
4282
+ },
4283
+ "additionalProperties": false
4284
+ }
4285
+ },
4286
+ "required": [
4287
+ "do",
4288
+ "target"
4289
+ ],
4290
+ "additionalProperties": false
4291
+ },
4292
+ {
4293
+ "type": "object",
4294
+ "properties": {
4295
+ "do": {
4296
+ "type": "string",
4297
+ "const": "check",
4298
+ "description": "Ticks a checkbox or radio button, e.g. the terms of a sign-up form."
4299
+ },
4300
+ "target": {
4301
+ "description": "The element, as a locator descriptor with exactly one of role, text, label, testId, css.",
4302
+ "type": "object",
4303
+ "properties": {
4304
+ "role": {
4305
+ "description": "Find by ARIA role (Playwright getByRole), e.g. button; narrow it with name.",
4306
+ "type": "string",
4307
+ "enum": [
4308
+ "alert",
4309
+ "alertdialog",
4310
+ "application",
4311
+ "article",
4312
+ "banner",
4313
+ "blockquote",
4314
+ "button",
4315
+ "caption",
4316
+ "cell",
4317
+ "checkbox",
4318
+ "code",
4319
+ "columnheader",
4320
+ "combobox",
4321
+ "complementary",
4322
+ "contentinfo",
4323
+ "definition",
4324
+ "deletion",
4325
+ "dialog",
4326
+ "directory",
4327
+ "document",
4328
+ "emphasis",
4329
+ "feed",
4330
+ "figure",
4331
+ "form",
4332
+ "generic",
4333
+ "grid",
4334
+ "gridcell",
4335
+ "group",
4336
+ "heading",
4337
+ "img",
4338
+ "insertion",
4339
+ "link",
4340
+ "list",
4341
+ "listbox",
4342
+ "listitem",
4343
+ "log",
4344
+ "main",
4345
+ "marquee",
4346
+ "math",
4347
+ "meter",
4348
+ "menu",
4349
+ "menubar",
4350
+ "menuitem",
4351
+ "menuitemcheckbox",
4352
+ "menuitemradio",
4353
+ "navigation",
4354
+ "none",
4355
+ "note",
4356
+ "option",
4357
+ "paragraph",
4358
+ "presentation",
4359
+ "progressbar",
4360
+ "radio",
4361
+ "radiogroup",
4362
+ "region",
4363
+ "row",
4364
+ "rowgroup",
4365
+ "rowheader",
4366
+ "scrollbar",
4367
+ "search",
4368
+ "searchbox",
4369
+ "separator",
4370
+ "slider",
4371
+ "spinbutton",
4372
+ "status",
4373
+ "strong",
4374
+ "subscript",
4375
+ "superscript",
4376
+ "switch",
4377
+ "tab",
4378
+ "table",
4379
+ "tablist",
4380
+ "tabpanel",
4381
+ "term",
4382
+ "textbox",
4383
+ "time",
4384
+ "timer",
4385
+ "toolbar",
4386
+ "tooltip",
4387
+ "tree",
4388
+ "treegrid",
4389
+ "treeitem"
4390
+ ]
4391
+ },
4392
+ "name": {
4393
+ "description": "The accessible name, with role: a string or { regex, flags }.",
4394
+ "anyOf": [
4395
+ {
4396
+ "type": "string",
4397
+ "minLength": 1
4398
+ },
4399
+ {
4400
+ "type": "object",
4401
+ "properties": {
4402
+ "regex": {
4403
+ "type": "string",
4404
+ "minLength": 1,
4405
+ "description": "A JavaScript regular expression source, without slashes."
4406
+ },
4407
+ "flags": {
4408
+ "default": "",
4409
+ "description": "Any of i, m, s, u, each at most once.",
4410
+ "type": "string",
4411
+ "pattern": "^(?!.*(.).*\\1)[imsu]*$"
4412
+ }
4413
+ },
4414
+ "required": [
4415
+ "regex"
4416
+ ],
4417
+ "additionalProperties": false
4418
+ }
4419
+ ]
4420
+ },
4421
+ "text": {
4422
+ "description": "Find by visible text (Playwright getByText): a substring, or { regex, flags }.",
4423
+ "anyOf": [
4424
+ {
4425
+ "type": "string",
4426
+ "minLength": 1
4427
+ },
4428
+ {
4429
+ "type": "object",
4430
+ "properties": {
4431
+ "regex": {
4432
+ "type": "string",
4433
+ "minLength": 1,
4434
+ "description": "A JavaScript regular expression source, without slashes."
4435
+ },
4436
+ "flags": {
4437
+ "default": "",
4438
+ "description": "Any of i, m, s, u, each at most once.",
4439
+ "type": "string",
4440
+ "pattern": "^(?!.*(.).*\\1)[imsu]*$"
4441
+ }
4442
+ },
4443
+ "required": [
4444
+ "regex"
4445
+ ],
4446
+ "additionalProperties": false
4447
+ }
4448
+ ]
4449
+ },
4450
+ "label": {
4451
+ "description": "Find a form control by its label (Playwright getByLabel): a substring, or { regex, flags }.",
4452
+ "anyOf": [
4453
+ {
4454
+ "type": "string",
4455
+ "minLength": 1
4456
+ },
4457
+ {
4458
+ "type": "object",
4459
+ "properties": {
4460
+ "regex": {
4461
+ "type": "string",
4462
+ "minLength": 1,
4463
+ "description": "A JavaScript regular expression source, without slashes."
4464
+ },
4465
+ "flags": {
4466
+ "default": "",
4467
+ "description": "Any of i, m, s, u, each at most once.",
4468
+ "type": "string",
4469
+ "pattern": "^(?!.*(.).*\\1)[imsu]*$"
4470
+ }
4471
+ },
4472
+ "required": [
4473
+ "regex"
4474
+ ],
4475
+ "additionalProperties": false
4476
+ }
4477
+ ]
4478
+ },
4479
+ "testId": {
4480
+ "description": "Find by data-testid (Playwright getByTestId).",
4481
+ "type": "string",
4482
+ "minLength": 1
4483
+ },
4484
+ "css": {
4485
+ "description": "Find by CSS selector; narrow it with hasText.",
4486
+ "type": "string",
4487
+ "minLength": 1
4488
+ },
4489
+ "hasText": {
4490
+ "description": "Only elements containing this text, with css.",
4491
+ "anyOf": [
4492
+ {
4493
+ "type": "string",
4494
+ "minLength": 1
4495
+ },
4496
+ {
4497
+ "type": "object",
4498
+ "properties": {
4499
+ "regex": {
4500
+ "type": "string",
4501
+ "minLength": 1,
4502
+ "description": "A JavaScript regular expression source, without slashes."
4503
+ },
4504
+ "flags": {
4505
+ "default": "",
4506
+ "description": "Any of i, m, s, u, each at most once.",
4507
+ "type": "string",
4508
+ "pattern": "^(?!.*(.).*\\1)[imsu]*$"
4509
+ }
4510
+ },
4511
+ "required": [
4512
+ "regex"
4513
+ ],
4514
+ "additionalProperties": false
4515
+ }
4516
+ ]
4517
+ },
4518
+ "exact": {
4519
+ "description": "Whole and case-sensitive match of a string name, text or label (default false).",
4520
+ "type": "boolean"
4521
+ },
4522
+ "nth": {
4523
+ "description": "The n-th match (0 = the first); without it, a locator that matches several elements fails.",
4524
+ "type": "integer",
4525
+ "minimum": 0,
4526
+ "maximum": 9007199254740991
4527
+ }
4528
+ },
4529
+ "additionalProperties": false
4530
+ }
4531
+ },
4532
+ "required": [
4533
+ "do",
4534
+ "target"
4535
+ ],
4536
+ "additionalProperties": false
4537
+ },
4538
+ {
4539
+ "type": "object",
4540
+ "properties": {
4541
+ "do": {
4542
+ "type": "string",
4543
+ "const": "press",
4544
+ "description": "Presses a key on the focused element, e.g. Enter."
4545
+ },
4546
+ "key": {
4547
+ "type": "string",
4548
+ "pattern": "^\\S+$",
4549
+ "description": "A Playwright key name; modifiers joined with +."
4550
+ }
4551
+ },
4552
+ "required": [
4553
+ "do",
4554
+ "key"
4555
+ ],
4556
+ "additionalProperties": false
4557
+ }
4558
+ ]
4559
+ },
4560
+ "description": "What signs in on that page: fill the e-mail and password ({env:NAME} or {data:key}), click the button."
4561
+ },
4562
+ "expect": {
4563
+ "type": "string",
4564
+ "description": "A phrase only a signed-in page shows, within 15 s of the last step; without it the sign-in fails and so does every signedIn screenshot."
4565
+ }
4566
+ },
4567
+ "required": [
4568
+ "path",
4569
+ "steps",
4570
+ "expect"
4571
+ ],
4572
+ "additionalProperties": false
2741
4573
  },
2742
4574
  "ogImages": {
2743
4575
  "description": "Open Graph images rendered by softure-marketing og.",