@saasquatch/mint-components 1.5.3-2 → 1.5.3-3

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 (25) hide show
  1. package/dist/cjs/sqm-big-stat_35.cjs.entry.js +5 -5
  2. package/dist/cjs/sqm-stencilbook.cjs.entry.js +26 -3
  3. package/dist/collection/components/sqm-checkbox-field/UseCheckboxField.stories.js +6 -0
  4. package/dist/collection/components/sqm-dropdown-field/UseDropdownField.stories.js +8 -0
  5. package/dist/collection/components/sqm-input-field/UseInputField.stories.js +6 -0
  6. package/dist/collection/utils/RequiredPropsError.js +5 -5
  7. package/dist/esm/sqm-big-stat_35.entry.js +5 -5
  8. package/dist/esm/sqm-stencilbook.entry.js +26 -3
  9. package/dist/esm-es5/sqm-big-stat_35.entry.js +1 -1
  10. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  11. package/dist/mint-components/mint-components.esm.js +1 -1
  12. package/dist/mint-components/p-436da6b8.system.js +1 -1
  13. package/dist/mint-components/{p-ff22834a.entry.js → p-581e2f18.entry.js} +2 -2
  14. package/dist/mint-components/p-a872cf92.system.entry.js +1 -0
  15. package/dist/mint-components/{p-e218474f.entry.js → p-d437fa7d.entry.js} +1 -1
  16. package/dist/mint-components/{p-aa5474be.system.entry.js → p-e459d237.system.entry.js} +1 -1
  17. package/dist/types/components/sqm-checkbox-field/UseCheckboxField.stories.d.ts +6 -0
  18. package/dist/types/components/sqm-dropdown-field/UseDropdownField.stories.d.ts +6 -0
  19. package/dist/types/components/sqm-input-field/UseInputField.stories.d.ts +6 -0
  20. package/dist/types/global/android.d.ts +7 -0
  21. package/dist/types/global/demo.d.ts +1 -0
  22. package/dist/types/stories/features.d.ts +4 -0
  23. package/dist/types/stories/templates.d.ts +4 -0
  24. package/package.json +1 -1
  25. package/dist/mint-components/p-9e34ff81.system.entry.js +0 -1
@@ -130,16 +130,16 @@ const style = {
130
130
  top: "23px",
131
131
  },
132
132
  DivStyle: {
133
- marginLeft: "30px",
133
+ marginLeft: "28px",
134
134
  },
135
135
  Details: {
136
- marginLeft: "30px",
136
+ marginLeft: "28px",
137
137
  },
138
138
  Heading: {
139
139
  display: "inline-block",
140
140
  },
141
141
  Alert: {
142
- margin: "30px",
142
+ margin: "28px",
143
143
  },
144
144
  };
145
145
  const sheet = JSS.createStyleSheet(style);
@@ -154,8 +154,8 @@ function RequiredPropsError({ missingProps }) {
154
154
  index.h("div", { slot: "icon", class: sheet.classes.IconStyle },
155
155
  index.h("sl-icon", { name: "exclamation-octagon" })),
156
156
  index.h("div", { class: sheet.classes.DivStyle },
157
- index.h("h2", { class: sheet.classes.Heading }, "There was a problem loading this page"),
158
- index.h("p", null, "There was a technical problem that prevented this page from loading. Please contact us with the link to this page.")),
157
+ index.h("h2", { class: sheet.classes.Heading }, "There was a problem loading this section"),
158
+ index.h("p", null, "There was a technical problem that prevented this section from loading. Please contact us with the link to this page.")),
159
159
  index.h("details", { class: sheet.classes.Details },
160
160
  index.h("summary", { onClick: () => setDetailsOpen(!detailsOpen) },
161
161
  detailsOpen ? "Less" : "More",
@@ -10048,6 +10048,12 @@ const OptionalCheckboxes = createHookStory(() => {
10048
10048
  index.h("sqm-checkbox-field", { slot: "formData", "checkbox-label": "I am not a robot", "checkbox-optional": "true", "checkbox-name": "isHuman" }),
10049
10049
  index.h("div", { slot: "terms" },
10050
10050
  index.h("sqm-checkbox-field", null))));
10051
+ });
10052
+ const MissingName = createHookStory(() => {
10053
+ setupGraphQL$9();
10054
+ return (index.h("sqm-portal-register", null,
10055
+ index.h("div", { slot: "terms" },
10056
+ index.h("sqm-checkbox-field", null))));
10051
10057
  });
10052
10058
 
10053
10059
  const UseCheckboxField = /*#__PURE__*/Object.freeze({
@@ -10056,7 +10062,8 @@ const UseCheckboxField = /*#__PURE__*/Object.freeze({
10056
10062
  TermsAndConditions: TermsAndConditions$2,
10057
10063
  TermsAndConditionsWithLabel: TermsAndConditionsWithLabel,
10058
10064
  MultipleCheckboxes: MultipleCheckboxes,
10059
- OptionalCheckboxes: OptionalCheckboxes
10065
+ OptionalCheckboxes: OptionalCheckboxes,
10066
+ MissingName: MissingName
10060
10067
  });
10061
10068
 
10062
10069
  const DropdownField_stories = {
@@ -10145,13 +10152,22 @@ const Countries = createHookStory(() => {
10145
10152
  index.h("sl-menu-item", { value: "CA" }, "Canada"),
10146
10153
  index.h("sl-menu-item", { value: "US" }, "United States"),
10147
10154
  index.h("sl-menu-item", { value: "GB" }, "United Kingdom"))));
10155
+ });
10156
+ const MissingName$1 = createHookStory(() => {
10157
+ setupGraphQL$a();
10158
+ return (index.h("sqm-portal-register", null,
10159
+ index.h("sqm-dropdown-field", { slot: "formData", "dropdown-label": "Country" },
10160
+ index.h("sl-menu-item", { value: "CA" }, "Canada"),
10161
+ index.h("sl-menu-item", { value: "US" }, "United States"),
10162
+ index.h("sl-menu-item", { value: "GB" }, "United Kingdom"))));
10148
10163
  });
10149
10164
 
10150
10165
  const UseDropdownField = /*#__PURE__*/Object.freeze({
10151
10166
  __proto__: null,
10152
10167
  'default': UseDropdownField_stories,
10153
10168
  SelectOptions: SelectOptions,
10154
- Countries: Countries
10169
+ Countries: Countries,
10170
+ MissingName: MissingName$1
10155
10171
  });
10156
10172
 
10157
10173
  const scenario$j = "@author:derek\r\n@owner:derek\r\nFeature: Form Input Field\r\n\r\n This component is used as a custom registration field during registration. The field can be text, a number,\r\n date or phone number. A motivating use case is to ask for a users company name, this value would then be mapped\r\n through the Managed Identity Service and upserted on the user after registration.\r\n\r\n Background: A user exists and is viewing the hosted portal registration\r\n Given a user is viewing \"/register\"\r\n And \"/register\" contains the registration form\r\n And the registration form has a custom input field\r\n\r\n @motivating\r\n Scenario Outline: Input fields are required by default but can be optional\r\n Given the input has prop \"field-optional\" with <value>\r\n And the input is empty\r\n When the user tries to register\r\n Then the input <mayBe> highlighted in red\r\n And an error message <mayAppear> in red below\r\n And form submission <mayBe> blocked\r\n Examples:\r\n | value | mayBe | mayAppear |\r\n | false | is | appears |\r\n | | is | appears |\r\n | true | isn't | doesn't appear |\r\n\r\n @motivating\r\n Scenario: Input field labels are configurable\r\n Given the input has prop \"field-label\" with value \"My Custom Input\"\r\n When the user views the registration form\r\n Then they see the input field\r\n And it has label \"My Custom Input\" above the input\r\n\r\n @minutae\r\n Scenario Outline: The validation error message is configurable\r\n Given the input is required\r\n And it has prop \"error-message\" with <value>\r\n When the user tries to register\r\n But they haven't filled in the input\r\n Then they see <errorMessage> below\r\n Examples:\r\n | value | errorMessage |\r\n | | Cannot be empty |\r\n | My Custom Message | My Custom Message |\r\n\r\n @motivating\r\n Scenario: Form data attribute name is configurable\r\n Given the input has prop \"field-name\" with value \"myCustomField\"\r\n When the user types \"testing testing\" into the input\r\n And they register\r\n Then \"testing testing\" is submitted under \"myCustomField\" in the form data\r\n\r\n @motivating\r\n Scenario Outline: The input field is a text input by default\r\n Given the input <mayHave> prop \"field-type\" with <value>\r\n When the user views the input field\r\n Then it is a text input\r\n Examples:\r\n | mayHave | value |\r\n | has | text |\r\n | doesn't have | |\r\n\r\n @motivating\r\n Scenario: Number type inputs are supported\r\n Given the input has prop \"field-type\" with value \"number\"\r\n When the user views the input field\r\n And the hover over it\r\n Then they see up and down arrows on the right hand side\r\n When they click the up arrow\r\n Then the number in the input field increments\r\n When they click the down arrow\r\n Then the number in the input field decrements\r\n When they click the input\r\n And try to enter text characters\r\n Then nothing happens\r\n When they click the input field\r\n Then they are able to input numbers\r\n\r\n @motivating\r\n Scenario: Date type inputs are supported\r\n Given the input has prop \"field-type\" \"date\"\r\n When the user views the input field\r\n Then they see \"mm/dd/yyyy\" as a placeholder\r\n And they see a calendar icon on the right\r\n When they start typing a date\r\n Then it maintains the \"mm/dd/yyyy\" format\r\n When they click the calendar icon\r\n Then a dropdown appears\r\n And they see a calendar\r\n When they select a date\r\n Then it is applied to the input\r\n\r\n @motivating\r\n Scenario: Phone number type inputs are supported\r\n Given the input has prop \"field-type\" with value \"tel\"\r\n When the user starts typing a phone number in the input\r\n Then it is formatted into the following form \"(XXX) XXX-XXXX\"\r\n When they pre-fix their phone number with a \"1\"\r\n Then it is formatted into the following form \"1 (XXX) XXX-XXXX\"\r\n\r\n @landmine\r\n Scenario: Telephone formatting is removed after 10 numbers\r\n Given a user using a phone number input field\r\n And they entered their 10 character phone number\r\n And it was not prefixed with a 1\r\n When they add another character\r\n Then the formatting is removed\r\n\r\n @landmine\r\n Scenario Outline: Input values are always recorded as strings in the form data\r\n Given the input has prop \"field-type\" with <value>\r\n And it has a \"field-name\"\r\n When the user inputs <formInput>\r\n And they register\r\n Then <formInput> is recorded in the form data as a string\r\n Examples:\r\n | value | formInput |\r\n | text | Hello there |\r\n | number | 123 |\r\n | date | 05/07/2021 |\r\n | tel | (250) 234-9877 |\r\n\r\n @landmine\r\n Scenario: Input fields without field names appear under \"/undefined\" in the form data\r\n Given the input does not have prop \"field-name\"\r\n When the users enters a value in the input\r\n And they register\r\n Then the value of the input is recorded under \"/undefined\" in the form data";
@@ -10312,6 +10328,12 @@ const TelType$1 = createHookStory(() => {
10312
10328
  return (index.h("sqm-portal-register", null,
10313
10329
  index.h("sqm-name-fields", { slot: "formData" }),
10314
10330
  index.h("sqm-input-field", { slot: "formData", "field-label": "Phone Number", "field-name": "tel", "field-type": "tel" })));
10331
+ });
10332
+ const MissingName$2 = createHookStory(() => {
10333
+ setupGraphQL$b();
10334
+ return (index.h("sqm-portal-register", null,
10335
+ index.h("sqm-name-fields", { slot: "formData" }),
10336
+ index.h("sqm-input-field", { slot: "formData", "field-label": "Phone Number", "field-type": "tel" })));
10315
10337
  });
10316
10338
 
10317
10339
  const UseInputField = /*#__PURE__*/Object.freeze({
@@ -10322,7 +10344,8 @@ const UseInputField = /*#__PURE__*/Object.freeze({
10322
10344
  MultipleInputs: MultipleInputs,
10323
10345
  OptionalInputs: OptionalInputs,
10324
10346
  DateType: DateType$1,
10325
- TelType: TelType$1
10347
+ TelType: TelType$1,
10348
+ MissingName: MissingName$2
10326
10349
  });
10327
10350
 
10328
10351
  const scenario$k = "@author:derek\r\n@owner:derek\r\nFeature: Reward Exchange List\r\n\r\n The Reward Exchange List gives end users the power to exchange their rewards for other rewards.\r\n It populates a list from the reward exchange rules set up on a given tenant.\r\n\r\n Background:\r\n Given a tenant with reward exchange rules\r\n\r\n @motivating\r\n @ui\r\n Scenario: The empty state is shown if there are no visible exchanges\r\n Given a user with no visible exchanges\r\n When they view the reward exchange\r\n Then no exchange options are displayed\r\n And they see an image of a present\r\n And \"Redeem Rewards\" in bold\r\n And \"Use your points to redeem rewards once they become available\" below the bolded text\r\n And the pagination buttons are disabled\r\n\r\n @minutae\r\n @ui\r\n Scenario: A custom empty state can be provided\r\n Given a user with no visible exchanges\r\n And a custom empty state has been supplied in the \"empty\" slot\r\n When they view the reward exchange\r\n Then they see the custom empty state\r\n\r\n @motivating\r\n @ui\r\n Scenario: A Loading Skeleton is displayed when the reward exchange rules are loading\r\n Given a user\r\n When they load the reward exchange list\r\n Then they see a loading Skeleton\r\n And it has 8 skeleton cards\r\n When the reward exchange rules have loaded\r\n Then the skeleton is replaced with reward exchange options\r\n\r\n @motivating\r\n Scenario: An error banner appears when the reward exchange list fails to load\r\n Given a user trying to view the reward exchange list\r\n But it fails to load\r\n Then an error banner is displayed\r\n And it displays \"Unable to load reward exchange list. Please try again\"\r\n\r\n @motivating\r\n @ui\r\n Scenario: The exchange progress bar progresses through the exchange process\r\n Given a user who is eligible for the tenants reward exchange rules\r\n When they view the reward exchange list\r\n Then the process bar displays the following elements\r\n | elements |\r\n | Step 1 `Rewards` title in black |\r\n | Step 1 circle with green outline, white fill and number 1 in green |\r\n | Step 2 `Select` title in grey |\r\n | Step 2 circle with grey fill and number 2 in white |\r\n | Step 3 `Confirm` title in grey |\r\n | Step 3 circle with grey fill and number 3 in white |\r\n | lines between all steps are greyed out |\r\n When they continue to the selection page\r\n Then the progress bar displays the following elements\r\n | elements |\r\n | Step 1 `Rewards` title in black |\r\n | Step 1 circle with white checkmark and green fill |\r\n | Step 2 `Select` title in black |\r\n | Step 2 circle with green outline, white fill and number 2 in green |\r\n | Step 3 `Confirm` title in grey |\r\n | Step 3 circle with grey fill and number 3 in white |\r\n | Green line between step 1 and 2 |\r\n | Grey line between step 2 and 3 |\r\n When they continue to the confirmation page\r\n Then the progress bar displays the following elements\r\n | elements |\r\n | Step 1 `Rewards` title in black |\r\n | Step 1 circle with white checkmark and green fill |\r\n | Step 2 `Select` title in black |\r\n | Step 2 circle with white checkmark and green fill |\r\n | Step 3 `Confirm` title in black |\r\n | Step 3 circle with green outline, white fill and number 3 in green |\r\n | Green line between all steps |\r\n When they continue to the redemption page\r\n Then the progress bar displays the following elements\r\n | elements |\r\n | Step 1 `Rewards` title in black |\r\n | Step 1 circle with white checkmark and green fill |\r\n | Step 2 `Select` title in black |\r\n | Step 2 circle with white checkmark and green fill |\r\n | Step 3 `Confirm` title in black |\r\n | Step 3 circle with white checkmark and green fill |\r\n | Green line between all steps |\r\n\r\n @motivating\r\n Scenario: Users must choose a reward exchange option to continue to the selection page\r\n Given a user who is eligible for the tenants reward exchange rules\r\n When they view the reward exchange list\r\n Then the 'Continue' button is disabled\r\n When they select a reward exchange card\r\n Then the card is outlined in brand colour with a brand colour cirlcular check box icon in the top right\r\n And the continue button is no longer disabled\r\n When they click \"Continue\"\r\n Then they are brought to the selection page\r\n\r\n @motivating\r\n @ui\r\n Scenario: Reward exchange rule names and images are used in the reward exchange cards\r\n Given a tenant reward exchange rule\r\n And it has name \"My Visa Exchange Rule\"\r\n And it has an image\r\n When a user views the reward exchange list\r\n Then they see a exchange card with title \"My Visa Exchange Rule\"\r\n And the exchange image on the left hand side of the card\r\n\r\n @motivating\r\n Scenario Outline: Reward exchange source values are displayed on reward exchange cards\r\n Given a <type> reward exchange rule\r\n When a user views the reward exchange list\r\n Then they see <text> under the name on the exchange option cards\r\n And the pretty values are localized to a user locale\r\n Examples:\r\n | type | text |\r\n | FIXED_GLOBAL_REWARD | the exchange source pretty value |\r\n | STEPPED_FIXED_GLOBAL_REWARD | the exchange source min pretty value to the source max pretty value |\r\n | VARIABLE_GLOBAL_REWARD | the exchange source min pretty value to the source max pretty value |\r\n | VARIABLE_CREDIT_REWARD | the exchange source min pretty value to the source max pretty value |\r\n\r\n @motivating\r\n Scenario Outline: Reward exchange cards can display customized error messages\r\n Given a reward exchange rule\r\n And it has <availabilityPredicate>\r\n And the reward exchange list has prop \"not-available-error\" with <value>\r\n When the user views the reward exchange list\r\n Then the card for the reward exchange rule is disabled\r\n And <message> is displayed\r\n Examples:\r\n | availabilityPredicate | value | message |\r\n | 'champion' in user.segments ? \"NOT_CHAMPION\" : true | {unavailableReasonCode, select, NOT_CHAMPION {Sorry must be a champion!} other {unavailableReasonCode} } | Sorry must be a champion! |\r\n | user.customFields.purchaseCount < 10 ? \"MORE_PURCHASE\" : true | {unavailableReasonCode, select, MORE_PURCHASE {Complete 10 purchases to unlock} other {unavailableReasonCode} } | Complete 10 purchases to unlock |\r\n\r\n @motivating\r\n Scenario: Exchange options are disabled if they put a user over the W9 limit\r\n Given a user who is approaching their W9 limit\r\n And a reward exchange rule\r\n And its destination reward has a US taxable value that would put the user over their limit\r\n When they view the reward exchange list\r\n Then the reward exchange card is disabled\r\n And a \"US Tax Limit\" error message is displayed on to the right of a exclamation triangle icon\r\n And the text is orange\r\n And the icon is orange\r\n\r\n @motivating\r\n Scenario Outline: Exchange options are disabled if a users lacks enough credit to redeem\r\n Given a <type> reward exchange rule\r\n But the user lacks enough credit to exchange for it\r\n When they view the reward exchange list\r\n Then the reward exchange card is disabled\r\n And a <text> error message is displayed on to the right of a exclamation triangle icon\r\n And the text is orange\r\n And the icon is orange\r\n Examples:\r\n | type | text |\r\n | FIXED_GLOBAL_REWARD | {prettySourceValue} required |\r\n | STEPPED_FIXED_GLOBAL_REWARD | {prettySourceMinValue} required |\r\n | VARIABLE_GLOBAL_REWARD | {prettySourceMinValue} required |\r\n | VARIABLE_CREDIT_REWARD | {prettySourceMinValue} required |\r\n\r\n @motivating\r\n Scenario: Users can go back to the Rewards page from the Select page\r\n Given a user viewing the Select page\r\n Then they see a \"Cancel\" text button\r\n And a \"Continue to confirmation\" brand colour button in the bottom right corner\r\n When they click \"Cancel\"\r\n Then they return to the Rewards page\r\n\r\n @motivating\r\n Scenario: Users can go back to the Select Page from the Confirm page\r\n Given a user viewing the Confirm page\r\n Then they see a \"Back\" text button\r\n And a \"Redeem\" brand colour button in the bottom right corner\r\n When they click \"Back\"\r\n Then they return to the Select Page\r\n\r\n @motivating\r\n Scenario: Reward rules with visibility predicates that evaluates to false are not shown\r\n Given a tenant reward exchange rule with visibility predicates that evaluates to false\r\n When a user views the reward exchange list\r\n Then they do not see the card for that reward exchange rule\r\n\r\n @motivating\r\n Scenario Outline: Users can choose their reward option for variable rewards on the Select page\r\n Given a <type> exchange rule\r\n And it has the following fields\r\n | fields |\r\n | name |\r\n | description |\r\n | image |\r\n When a user views the reward exchange list\r\n And they progress to the Select page for this exchange\r\n Then they see the exchange rule image on the left hand side\r\n And on the right hand side they see the following in this order from top to bottom\r\n | elements |\r\n | exchange name |\r\n | exchange description |\r\n | select list with all exchange options using pretty values, destination reward above source reward |\r\n Examples:\r\n | type |\r\n | STEPPED_FIXED_GLOBAL_REWARD |\r\n | VARIABLE_GLOBAL_REWARD |\r\n | VARIABLE_CREDIT_REWARD |\r\n\r\n @motivating\r\n Scenario: Users who selected a fixed exchange rule see exchange information on the Select page\r\n Given a \"FIXED_GLOBAL_REWARD\" exchange rule\r\n And it has the following fields\r\n | fields |\r\n | name |\r\n | description |\r\n | image |\r\n When a user views the reward exchange list\r\n And they progress to the Select page for this exchange\r\n Then they see the exchange rule image on the left hand side\r\n And on the right hand side they see the following in this order from top to bottom\r\n | elements |\r\n | exchange name |\r\n | exchange source pretty value displayed in brand colour |\r\n | exchange description |\r\n\r\n @motivating\r\n Scenario Outline: Users selection variable rewards can only select rewards they are eligible to exchange for\r\n Given a <type> exchange rule\r\n When a user views the reward exchange list\r\n And they progress to the Select page for this exchange\r\n Then they see a drop down with all the reward exchange selections\r\n When they click on the drop down\r\n But they are not eligible for all of the exchanges options <dueToReason>\r\n Then the ineligble options are disabled\r\n And under the source value is <text>\r\n Examples:\r\n | type | dueToReason | text |\r\n | STEPPED_FIXED_GLOBAL_REWARD | due to insufficent source value | {prettySourceValue} required |\r\n | VARIABLE_GLOBAL_REWARD | due to insufficent source value | {prettySourceValue} required |\r\n | VARIABLE_CREDIT_REWARD | due to insufficent source value | {prettySourceValue} required |\r\n | STEPPED_FIXED_GLOBAL_REWARD | W9 | US Tax Limit |\r\n | VARIABLE_GLOBAL_REWARD | W9 | US Tax Limit |\r\n | VARIABLE_CREDIT_REWARD | W9 | US Tax Limit |\r\n\r\n @motivating\r\n Scenario Outline: The Confirm page allows users to view their exchange before committing\r\n Given a <type> exchange rule\r\n When a user views the reward exchange list\r\n And they select the exchange\r\n And they progress to Confirm page\r\n Then they see a row with title \"Reward\"\r\n And it contains the exchange name\r\n And it contains the exchange image\r\n And they <maySee> a row with title \"Reward Amount\"\r\n And it <mayContain> <amountTitle>\r\n And they see a row with title \"Cost to Redeem\"\r\n And it contains the source reward pretty value in bolded text\r\n Examples:\r\n | type | maySee | mayContain | amountTitle |\r\n | FIXED_GLOBAL_REWARD | don't | doesn't contain | N/A |\r\n | VARIABLE_GLOBAL_REWARD | see | contains | the pretty destination value |\r\n | STEPPED_FIXED_GLOBAL_REWARD | see | contains | the pretty destination value |\r\n | VARIABLE_CREDIT_REWARD | see | contains | the pretty destination value |\r\n\r\n @motivating\r\n Scenario: An error banner is displayed if an error occurs during redemeption\r\n Given a user has selected a reward to exchange\r\n And is on the confirmation page\r\n When they click \"Redeem\"\r\n But an error occurs\r\n Then an error banner appears\r\n And it contains details about the error\r\n And the reward exchange is not completed\r\n\r\n @motivating\r\n Scenario: Confetti is displayed when a reward exchange succeeds\r\n Given a user has selected a reward to exchange\r\n And they are on the confirmation page\r\n When they click \"Redeem\"\r\n And the exchange is successful\r\n Then they see confetti centered on the success page\r\n And they see text describing what they exchanged for their new reward\r\n And they see a \"Done\" brand colour button\r\n When they click \"Done\"\r\n Then they see the Rewards page\r\n\r\n @motivating\r\n Scenario: Fuel tank codes are shown when a reward exchange succeeds\r\n Given a user has selected to exchange for a fuel tank reward\r\n When they complete the reward exchange\r\n And are on the success page\r\n Then they see a textbox with their fuel tank code\r\n And a clipboard icon\r\n When they click the clipboard icon\r\n Then their fuel tank code is copied to their clipboard\r\n\r\n @motivating\r\n Scenario Outline: Users can exchange for any type of reward\r\n Given a <type> reward exchange rule for a <reward>\r\n And a user who has enough source credit to exchange for the reward\r\n When they go through the exchange flow\r\n And exchange for their reward\r\n Then their credit is exchanged for the <reward>\r\n Examples:\r\n | type | reward |\r\n | FIXED_GLOBAL_REWARD | gift card |\r\n | FIXED_GLOBAL_REWARD | fuel tank code |\r\n | FIXED_GLOBAL_REWARD | discount |\r\n | FIXED_GLOBAL_REWARD | credit reward |\r\n | STEPPED_FIXED_GLOBAL_REWARD | gift card |\r\n | STEPPED_FIXED_GLOBAL_REWARD | discount |\r\n | STEPPED_FIXED_GLOBAL_REWARD | credit reward |\r\n | VARIABLE_GLOBAL_REWARD | gift card |\r\n | VARIABLE_GLOBAL_REWARD | discount |\r\n | VARIABLE_GLOBAL_REWARD | credit reward |\r\n | VARIABLE_CREDIT_REWARD | credit reward |";
@@ -60,3 +60,9 @@ export const OptionalCheckboxes = createHookStory(() => {
60
60
  h("div", { slot: "terms" },
61
61
  h("sqm-checkbox-field", null))));
62
62
  });
63
+ export const MissingName = createHookStory(() => {
64
+ setupGraphQL();
65
+ return (h("sqm-portal-register", null,
66
+ h("div", { slot: "terms" },
67
+ h("sqm-checkbox-field", null))));
68
+ });
@@ -44,3 +44,11 @@ export const Countries = createHookStory(() => {
44
44
  h("sl-menu-item", { value: "US" }, "United States"),
45
45
  h("sl-menu-item", { value: "GB" }, "United Kingdom"))));
46
46
  });
47
+ export const MissingName = createHookStory(() => {
48
+ setupGraphQL();
49
+ return (h("sqm-portal-register", null,
50
+ h("sqm-dropdown-field", { slot: "formData", "dropdown-label": "Country" },
51
+ h("sl-menu-item", { value: "CA" }, "Canada"),
52
+ h("sl-menu-item", { value: "US" }, "United States"),
53
+ h("sl-menu-item", { value: "GB" }, "United Kingdom"))));
54
+ });
@@ -69,3 +69,9 @@ export const TelType = createHookStory(() => {
69
69
  h("sqm-name-fields", { slot: "formData" }),
70
70
  h("sqm-input-field", { slot: "formData", "field-label": "Phone Number", "field-name": "tel", "field-type": "tel" })));
71
71
  });
72
+ export const MissingName = createHookStory(() => {
73
+ setupGraphQL();
74
+ return (h("sqm-portal-register", null,
75
+ h("sqm-name-fields", { slot: "formData" }),
76
+ h("sqm-input-field", { slot: "formData", "field-label": "Phone Number", "field-type": "tel" })));
77
+ });
@@ -9,16 +9,16 @@ const style = {
9
9
  top: "23px",
10
10
  },
11
11
  DivStyle: {
12
- marginLeft: "30px",
12
+ marginLeft: "28px",
13
13
  },
14
14
  Details: {
15
- marginLeft: "30px",
15
+ marginLeft: "28px",
16
16
  },
17
17
  Heading: {
18
18
  display: "inline-block",
19
19
  },
20
20
  Alert: {
21
- margin: "30px",
21
+ margin: "28px",
22
22
  },
23
23
  };
24
24
  const sheet = createStyleSheet(style);
@@ -33,8 +33,8 @@ export function RequiredPropsError({ missingProps }) {
33
33
  h("div", { slot: "icon", class: sheet.classes.IconStyle },
34
34
  h("sl-icon", { name: "exclamation-octagon" })),
35
35
  h("div", { class: sheet.classes.DivStyle },
36
- h("h2", { class: sheet.classes.Heading }, "There was a problem loading this page"),
37
- h("p", null, "There was a technical problem that prevented this page from loading. Please contact us with the link to this page.")),
36
+ h("h2", { class: sheet.classes.Heading }, "There was a problem loading this section"),
37
+ h("p", null, "There was a technical problem that prevented this section from loading. Please contact us with the link to this page.")),
38
38
  h("details", { class: sheet.classes.Details },
39
39
  h("summary", { onClick: () => setDetailsOpen(!detailsOpen) },
40
40
  detailsOpen ? "Less" : "More",
@@ -126,16 +126,16 @@ const style = {
126
126
  top: "23px",
127
127
  },
128
128
  DivStyle: {
129
- marginLeft: "30px",
129
+ marginLeft: "28px",
130
130
  },
131
131
  Details: {
132
- marginLeft: "30px",
132
+ marginLeft: "28px",
133
133
  },
134
134
  Heading: {
135
135
  display: "inline-block",
136
136
  },
137
137
  Alert: {
138
- margin: "30px",
138
+ margin: "28px",
139
139
  },
140
140
  };
141
141
  const sheet = createStyleSheet(style);
@@ -150,8 +150,8 @@ function RequiredPropsError({ missingProps }) {
150
150
  h$1("div", { slot: "icon", class: sheet.classes.IconStyle },
151
151
  h$1("sl-icon", { name: "exclamation-octagon" })),
152
152
  h$1("div", { class: sheet.classes.DivStyle },
153
- h$1("h2", { class: sheet.classes.Heading }, "There was a problem loading this page"),
154
- h$1("p", null, "There was a technical problem that prevented this page from loading. Please contact us with the link to this page.")),
153
+ h$1("h2", { class: sheet.classes.Heading }, "There was a problem loading this section"),
154
+ h$1("p", null, "There was a technical problem that prevented this section from loading. Please contact us with the link to this page.")),
155
155
  h$1("details", { class: sheet.classes.Details },
156
156
  h$1("summary", { onClick: () => setDetailsOpen(!detailsOpen) },
157
157
  detailsOpen ? "Less" : "More",
@@ -10044,6 +10044,12 @@ const OptionalCheckboxes = createHookStory(() => {
10044
10044
  h("sqm-checkbox-field", { slot: "formData", "checkbox-label": "I am not a robot", "checkbox-optional": "true", "checkbox-name": "isHuman" }),
10045
10045
  h("div", { slot: "terms" },
10046
10046
  h("sqm-checkbox-field", null))));
10047
+ });
10048
+ const MissingName = createHookStory(() => {
10049
+ setupGraphQL$9();
10050
+ return (h("sqm-portal-register", null,
10051
+ h("div", { slot: "terms" },
10052
+ h("sqm-checkbox-field", null))));
10047
10053
  });
10048
10054
 
10049
10055
  const UseCheckboxField = /*#__PURE__*/Object.freeze({
@@ -10052,7 +10058,8 @@ const UseCheckboxField = /*#__PURE__*/Object.freeze({
10052
10058
  TermsAndConditions: TermsAndConditions$2,
10053
10059
  TermsAndConditionsWithLabel: TermsAndConditionsWithLabel,
10054
10060
  MultipleCheckboxes: MultipleCheckboxes,
10055
- OptionalCheckboxes: OptionalCheckboxes
10061
+ OptionalCheckboxes: OptionalCheckboxes,
10062
+ MissingName: MissingName
10056
10063
  });
10057
10064
 
10058
10065
  const DropdownField_stories = {
@@ -10141,13 +10148,22 @@ const Countries = createHookStory(() => {
10141
10148
  h("sl-menu-item", { value: "CA" }, "Canada"),
10142
10149
  h("sl-menu-item", { value: "US" }, "United States"),
10143
10150
  h("sl-menu-item", { value: "GB" }, "United Kingdom"))));
10151
+ });
10152
+ const MissingName$1 = createHookStory(() => {
10153
+ setupGraphQL$a();
10154
+ return (h("sqm-portal-register", null,
10155
+ h("sqm-dropdown-field", { slot: "formData", "dropdown-label": "Country" },
10156
+ h("sl-menu-item", { value: "CA" }, "Canada"),
10157
+ h("sl-menu-item", { value: "US" }, "United States"),
10158
+ h("sl-menu-item", { value: "GB" }, "United Kingdom"))));
10144
10159
  });
10145
10160
 
10146
10161
  const UseDropdownField = /*#__PURE__*/Object.freeze({
10147
10162
  __proto__: null,
10148
10163
  'default': UseDropdownField_stories,
10149
10164
  SelectOptions: SelectOptions,
10150
- Countries: Countries
10165
+ Countries: Countries,
10166
+ MissingName: MissingName$1
10151
10167
  });
10152
10168
 
10153
10169
  const scenario$j = "@author:derek\r\n@owner:derek\r\nFeature: Form Input Field\r\n\r\n This component is used as a custom registration field during registration. The field can be text, a number,\r\n date or phone number. A motivating use case is to ask for a users company name, this value would then be mapped\r\n through the Managed Identity Service and upserted on the user after registration.\r\n\r\n Background: A user exists and is viewing the hosted portal registration\r\n Given a user is viewing \"/register\"\r\n And \"/register\" contains the registration form\r\n And the registration form has a custom input field\r\n\r\n @motivating\r\n Scenario Outline: Input fields are required by default but can be optional\r\n Given the input has prop \"field-optional\" with <value>\r\n And the input is empty\r\n When the user tries to register\r\n Then the input <mayBe> highlighted in red\r\n And an error message <mayAppear> in red below\r\n And form submission <mayBe> blocked\r\n Examples:\r\n | value | mayBe | mayAppear |\r\n | false | is | appears |\r\n | | is | appears |\r\n | true | isn't | doesn't appear |\r\n\r\n @motivating\r\n Scenario: Input field labels are configurable\r\n Given the input has prop \"field-label\" with value \"My Custom Input\"\r\n When the user views the registration form\r\n Then they see the input field\r\n And it has label \"My Custom Input\" above the input\r\n\r\n @minutae\r\n Scenario Outline: The validation error message is configurable\r\n Given the input is required\r\n And it has prop \"error-message\" with <value>\r\n When the user tries to register\r\n But they haven't filled in the input\r\n Then they see <errorMessage> below\r\n Examples:\r\n | value | errorMessage |\r\n | | Cannot be empty |\r\n | My Custom Message | My Custom Message |\r\n\r\n @motivating\r\n Scenario: Form data attribute name is configurable\r\n Given the input has prop \"field-name\" with value \"myCustomField\"\r\n When the user types \"testing testing\" into the input\r\n And they register\r\n Then \"testing testing\" is submitted under \"myCustomField\" in the form data\r\n\r\n @motivating\r\n Scenario Outline: The input field is a text input by default\r\n Given the input <mayHave> prop \"field-type\" with <value>\r\n When the user views the input field\r\n Then it is a text input\r\n Examples:\r\n | mayHave | value |\r\n | has | text |\r\n | doesn't have | |\r\n\r\n @motivating\r\n Scenario: Number type inputs are supported\r\n Given the input has prop \"field-type\" with value \"number\"\r\n When the user views the input field\r\n And the hover over it\r\n Then they see up and down arrows on the right hand side\r\n When they click the up arrow\r\n Then the number in the input field increments\r\n When they click the down arrow\r\n Then the number in the input field decrements\r\n When they click the input\r\n And try to enter text characters\r\n Then nothing happens\r\n When they click the input field\r\n Then they are able to input numbers\r\n\r\n @motivating\r\n Scenario: Date type inputs are supported\r\n Given the input has prop \"field-type\" \"date\"\r\n When the user views the input field\r\n Then they see \"mm/dd/yyyy\" as a placeholder\r\n And they see a calendar icon on the right\r\n When they start typing a date\r\n Then it maintains the \"mm/dd/yyyy\" format\r\n When they click the calendar icon\r\n Then a dropdown appears\r\n And they see a calendar\r\n When they select a date\r\n Then it is applied to the input\r\n\r\n @motivating\r\n Scenario: Phone number type inputs are supported\r\n Given the input has prop \"field-type\" with value \"tel\"\r\n When the user starts typing a phone number in the input\r\n Then it is formatted into the following form \"(XXX) XXX-XXXX\"\r\n When they pre-fix their phone number with a \"1\"\r\n Then it is formatted into the following form \"1 (XXX) XXX-XXXX\"\r\n\r\n @landmine\r\n Scenario: Telephone formatting is removed after 10 numbers\r\n Given a user using a phone number input field\r\n And they entered their 10 character phone number\r\n And it was not prefixed with a 1\r\n When they add another character\r\n Then the formatting is removed\r\n\r\n @landmine\r\n Scenario Outline: Input values are always recorded as strings in the form data\r\n Given the input has prop \"field-type\" with <value>\r\n And it has a \"field-name\"\r\n When the user inputs <formInput>\r\n And they register\r\n Then <formInput> is recorded in the form data as a string\r\n Examples:\r\n | value | formInput |\r\n | text | Hello there |\r\n | number | 123 |\r\n | date | 05/07/2021 |\r\n | tel | (250) 234-9877 |\r\n\r\n @landmine\r\n Scenario: Input fields without field names appear under \"/undefined\" in the form data\r\n Given the input does not have prop \"field-name\"\r\n When the users enters a value in the input\r\n And they register\r\n Then the value of the input is recorded under \"/undefined\" in the form data";
@@ -10308,6 +10324,12 @@ const TelType$1 = createHookStory(() => {
10308
10324
  return (h("sqm-portal-register", null,
10309
10325
  h("sqm-name-fields", { slot: "formData" }),
10310
10326
  h("sqm-input-field", { slot: "formData", "field-label": "Phone Number", "field-name": "tel", "field-type": "tel" })));
10327
+ });
10328
+ const MissingName$2 = createHookStory(() => {
10329
+ setupGraphQL$b();
10330
+ return (h("sqm-portal-register", null,
10331
+ h("sqm-name-fields", { slot: "formData" }),
10332
+ h("sqm-input-field", { slot: "formData", "field-label": "Phone Number", "field-type": "tel" })));
10311
10333
  });
10312
10334
 
10313
10335
  const UseInputField = /*#__PURE__*/Object.freeze({
@@ -10318,7 +10340,8 @@ const UseInputField = /*#__PURE__*/Object.freeze({
10318
10340
  MultipleInputs: MultipleInputs,
10319
10341
  OptionalInputs: OptionalInputs,
10320
10342
  DateType: DateType$1,
10321
- TelType: TelType$1
10343
+ TelType: TelType$1,
10344
+ MissingName: MissingName$2
10322
10345
  });
10323
10346
 
10324
10347
  const scenario$k = "@author:derek\r\n@owner:derek\r\nFeature: Reward Exchange List\r\n\r\n The Reward Exchange List gives end users the power to exchange their rewards for other rewards.\r\n It populates a list from the reward exchange rules set up on a given tenant.\r\n\r\n Background:\r\n Given a tenant with reward exchange rules\r\n\r\n @motivating\r\n @ui\r\n Scenario: The empty state is shown if there are no visible exchanges\r\n Given a user with no visible exchanges\r\n When they view the reward exchange\r\n Then no exchange options are displayed\r\n And they see an image of a present\r\n And \"Redeem Rewards\" in bold\r\n And \"Use your points to redeem rewards once they become available\" below the bolded text\r\n And the pagination buttons are disabled\r\n\r\n @minutae\r\n @ui\r\n Scenario: A custom empty state can be provided\r\n Given a user with no visible exchanges\r\n And a custom empty state has been supplied in the \"empty\" slot\r\n When they view the reward exchange\r\n Then they see the custom empty state\r\n\r\n @motivating\r\n @ui\r\n Scenario: A Loading Skeleton is displayed when the reward exchange rules are loading\r\n Given a user\r\n When they load the reward exchange list\r\n Then they see a loading Skeleton\r\n And it has 8 skeleton cards\r\n When the reward exchange rules have loaded\r\n Then the skeleton is replaced with reward exchange options\r\n\r\n @motivating\r\n Scenario: An error banner appears when the reward exchange list fails to load\r\n Given a user trying to view the reward exchange list\r\n But it fails to load\r\n Then an error banner is displayed\r\n And it displays \"Unable to load reward exchange list. Please try again\"\r\n\r\n @motivating\r\n @ui\r\n Scenario: The exchange progress bar progresses through the exchange process\r\n Given a user who is eligible for the tenants reward exchange rules\r\n When they view the reward exchange list\r\n Then the process bar displays the following elements\r\n | elements |\r\n | Step 1 `Rewards` title in black |\r\n | Step 1 circle with green outline, white fill and number 1 in green |\r\n | Step 2 `Select` title in grey |\r\n | Step 2 circle with grey fill and number 2 in white |\r\n | Step 3 `Confirm` title in grey |\r\n | Step 3 circle with grey fill and number 3 in white |\r\n | lines between all steps are greyed out |\r\n When they continue to the selection page\r\n Then the progress bar displays the following elements\r\n | elements |\r\n | Step 1 `Rewards` title in black |\r\n | Step 1 circle with white checkmark and green fill |\r\n | Step 2 `Select` title in black |\r\n | Step 2 circle with green outline, white fill and number 2 in green |\r\n | Step 3 `Confirm` title in grey |\r\n | Step 3 circle with grey fill and number 3 in white |\r\n | Green line between step 1 and 2 |\r\n | Grey line between step 2 and 3 |\r\n When they continue to the confirmation page\r\n Then the progress bar displays the following elements\r\n | elements |\r\n | Step 1 `Rewards` title in black |\r\n | Step 1 circle with white checkmark and green fill |\r\n | Step 2 `Select` title in black |\r\n | Step 2 circle with white checkmark and green fill |\r\n | Step 3 `Confirm` title in black |\r\n | Step 3 circle with green outline, white fill and number 3 in green |\r\n | Green line between all steps |\r\n When they continue to the redemption page\r\n Then the progress bar displays the following elements\r\n | elements |\r\n | Step 1 `Rewards` title in black |\r\n | Step 1 circle with white checkmark and green fill |\r\n | Step 2 `Select` title in black |\r\n | Step 2 circle with white checkmark and green fill |\r\n | Step 3 `Confirm` title in black |\r\n | Step 3 circle with white checkmark and green fill |\r\n | Green line between all steps |\r\n\r\n @motivating\r\n Scenario: Users must choose a reward exchange option to continue to the selection page\r\n Given a user who is eligible for the tenants reward exchange rules\r\n When they view the reward exchange list\r\n Then the 'Continue' button is disabled\r\n When they select a reward exchange card\r\n Then the card is outlined in brand colour with a brand colour cirlcular check box icon in the top right\r\n And the continue button is no longer disabled\r\n When they click \"Continue\"\r\n Then they are brought to the selection page\r\n\r\n @motivating\r\n @ui\r\n Scenario: Reward exchange rule names and images are used in the reward exchange cards\r\n Given a tenant reward exchange rule\r\n And it has name \"My Visa Exchange Rule\"\r\n And it has an image\r\n When a user views the reward exchange list\r\n Then they see a exchange card with title \"My Visa Exchange Rule\"\r\n And the exchange image on the left hand side of the card\r\n\r\n @motivating\r\n Scenario Outline: Reward exchange source values are displayed on reward exchange cards\r\n Given a <type> reward exchange rule\r\n When a user views the reward exchange list\r\n Then they see <text> under the name on the exchange option cards\r\n And the pretty values are localized to a user locale\r\n Examples:\r\n | type | text |\r\n | FIXED_GLOBAL_REWARD | the exchange source pretty value |\r\n | STEPPED_FIXED_GLOBAL_REWARD | the exchange source min pretty value to the source max pretty value |\r\n | VARIABLE_GLOBAL_REWARD | the exchange source min pretty value to the source max pretty value |\r\n | VARIABLE_CREDIT_REWARD | the exchange source min pretty value to the source max pretty value |\r\n\r\n @motivating\r\n Scenario Outline: Reward exchange cards can display customized error messages\r\n Given a reward exchange rule\r\n And it has <availabilityPredicate>\r\n And the reward exchange list has prop \"not-available-error\" with <value>\r\n When the user views the reward exchange list\r\n Then the card for the reward exchange rule is disabled\r\n And <message> is displayed\r\n Examples:\r\n | availabilityPredicate | value | message |\r\n | 'champion' in user.segments ? \"NOT_CHAMPION\" : true | {unavailableReasonCode, select, NOT_CHAMPION {Sorry must be a champion!} other {unavailableReasonCode} } | Sorry must be a champion! |\r\n | user.customFields.purchaseCount < 10 ? \"MORE_PURCHASE\" : true | {unavailableReasonCode, select, MORE_PURCHASE {Complete 10 purchases to unlock} other {unavailableReasonCode} } | Complete 10 purchases to unlock |\r\n\r\n @motivating\r\n Scenario: Exchange options are disabled if they put a user over the W9 limit\r\n Given a user who is approaching their W9 limit\r\n And a reward exchange rule\r\n And its destination reward has a US taxable value that would put the user over their limit\r\n When they view the reward exchange list\r\n Then the reward exchange card is disabled\r\n And a \"US Tax Limit\" error message is displayed on to the right of a exclamation triangle icon\r\n And the text is orange\r\n And the icon is orange\r\n\r\n @motivating\r\n Scenario Outline: Exchange options are disabled if a users lacks enough credit to redeem\r\n Given a <type> reward exchange rule\r\n But the user lacks enough credit to exchange for it\r\n When they view the reward exchange list\r\n Then the reward exchange card is disabled\r\n And a <text> error message is displayed on to the right of a exclamation triangle icon\r\n And the text is orange\r\n And the icon is orange\r\n Examples:\r\n | type | text |\r\n | FIXED_GLOBAL_REWARD | {prettySourceValue} required |\r\n | STEPPED_FIXED_GLOBAL_REWARD | {prettySourceMinValue} required |\r\n | VARIABLE_GLOBAL_REWARD | {prettySourceMinValue} required |\r\n | VARIABLE_CREDIT_REWARD | {prettySourceMinValue} required |\r\n\r\n @motivating\r\n Scenario: Users can go back to the Rewards page from the Select page\r\n Given a user viewing the Select page\r\n Then they see a \"Cancel\" text button\r\n And a \"Continue to confirmation\" brand colour button in the bottom right corner\r\n When they click \"Cancel\"\r\n Then they return to the Rewards page\r\n\r\n @motivating\r\n Scenario: Users can go back to the Select Page from the Confirm page\r\n Given a user viewing the Confirm page\r\n Then they see a \"Back\" text button\r\n And a \"Redeem\" brand colour button in the bottom right corner\r\n When they click \"Back\"\r\n Then they return to the Select Page\r\n\r\n @motivating\r\n Scenario: Reward rules with visibility predicates that evaluates to false are not shown\r\n Given a tenant reward exchange rule with visibility predicates that evaluates to false\r\n When a user views the reward exchange list\r\n Then they do not see the card for that reward exchange rule\r\n\r\n @motivating\r\n Scenario Outline: Users can choose their reward option for variable rewards on the Select page\r\n Given a <type> exchange rule\r\n And it has the following fields\r\n | fields |\r\n | name |\r\n | description |\r\n | image |\r\n When a user views the reward exchange list\r\n And they progress to the Select page for this exchange\r\n Then they see the exchange rule image on the left hand side\r\n And on the right hand side they see the following in this order from top to bottom\r\n | elements |\r\n | exchange name |\r\n | exchange description |\r\n | select list with all exchange options using pretty values, destination reward above source reward |\r\n Examples:\r\n | type |\r\n | STEPPED_FIXED_GLOBAL_REWARD |\r\n | VARIABLE_GLOBAL_REWARD |\r\n | VARIABLE_CREDIT_REWARD |\r\n\r\n @motivating\r\n Scenario: Users who selected a fixed exchange rule see exchange information on the Select page\r\n Given a \"FIXED_GLOBAL_REWARD\" exchange rule\r\n And it has the following fields\r\n | fields |\r\n | name |\r\n | description |\r\n | image |\r\n When a user views the reward exchange list\r\n And they progress to the Select page for this exchange\r\n Then they see the exchange rule image on the left hand side\r\n And on the right hand side they see the following in this order from top to bottom\r\n | elements |\r\n | exchange name |\r\n | exchange source pretty value displayed in brand colour |\r\n | exchange description |\r\n\r\n @motivating\r\n Scenario Outline: Users selection variable rewards can only select rewards they are eligible to exchange for\r\n Given a <type> exchange rule\r\n When a user views the reward exchange list\r\n And they progress to the Select page for this exchange\r\n Then they see a drop down with all the reward exchange selections\r\n When they click on the drop down\r\n But they are not eligible for all of the exchanges options <dueToReason>\r\n Then the ineligble options are disabled\r\n And under the source value is <text>\r\n Examples:\r\n | type | dueToReason | text |\r\n | STEPPED_FIXED_GLOBAL_REWARD | due to insufficent source value | {prettySourceValue} required |\r\n | VARIABLE_GLOBAL_REWARD | due to insufficent source value | {prettySourceValue} required |\r\n | VARIABLE_CREDIT_REWARD | due to insufficent source value | {prettySourceValue} required |\r\n | STEPPED_FIXED_GLOBAL_REWARD | W9 | US Tax Limit |\r\n | VARIABLE_GLOBAL_REWARD | W9 | US Tax Limit |\r\n | VARIABLE_CREDIT_REWARD | W9 | US Tax Limit |\r\n\r\n @motivating\r\n Scenario Outline: The Confirm page allows users to view their exchange before committing\r\n Given a <type> exchange rule\r\n When a user views the reward exchange list\r\n And they select the exchange\r\n And they progress to Confirm page\r\n Then they see a row with title \"Reward\"\r\n And it contains the exchange name\r\n And it contains the exchange image\r\n And they <maySee> a row with title \"Reward Amount\"\r\n And it <mayContain> <amountTitle>\r\n And they see a row with title \"Cost to Redeem\"\r\n And it contains the source reward pretty value in bolded text\r\n Examples:\r\n | type | maySee | mayContain | amountTitle |\r\n | FIXED_GLOBAL_REWARD | don't | doesn't contain | N/A |\r\n | VARIABLE_GLOBAL_REWARD | see | contains | the pretty destination value |\r\n | STEPPED_FIXED_GLOBAL_REWARD | see | contains | the pretty destination value |\r\n | VARIABLE_CREDIT_REWARD | see | contains | the pretty destination value |\r\n\r\n @motivating\r\n Scenario: An error banner is displayed if an error occurs during redemeption\r\n Given a user has selected a reward to exchange\r\n And is on the confirmation page\r\n When they click \"Redeem\"\r\n But an error occurs\r\n Then an error banner appears\r\n And it contains details about the error\r\n And the reward exchange is not completed\r\n\r\n @motivating\r\n Scenario: Confetti is displayed when a reward exchange succeeds\r\n Given a user has selected a reward to exchange\r\n And they are on the confirmation page\r\n When they click \"Redeem\"\r\n And the exchange is successful\r\n Then they see confetti centered on the success page\r\n And they see text describing what they exchanged for their new reward\r\n And they see a \"Done\" brand colour button\r\n When they click \"Done\"\r\n Then they see the Rewards page\r\n\r\n @motivating\r\n Scenario: Fuel tank codes are shown when a reward exchange succeeds\r\n Given a user has selected to exchange for a fuel tank reward\r\n When they complete the reward exchange\r\n And are on the success page\r\n Then they see a textbox with their fuel tank code\r\n And a clipboard icon\r\n When they click the clipboard icon\r\n Then their fuel tank code is copied to their clipboard\r\n\r\n @motivating\r\n Scenario Outline: Users can exchange for any type of reward\r\n Given a <type> reward exchange rule for a <reward>\r\n And a user who has enough source credit to exchange for the reward\r\n When they go through the exchange flow\r\n And exchange for their reward\r\n Then their credit is exchanged for the <reward>\r\n Examples:\r\n | type | reward |\r\n | FIXED_GLOBAL_REWARD | gift card |\r\n | FIXED_GLOBAL_REWARD | fuel tank code |\r\n | FIXED_GLOBAL_REWARD | discount |\r\n | FIXED_GLOBAL_REWARD | credit reward |\r\n | STEPPED_FIXED_GLOBAL_REWARD | gift card |\r\n | STEPPED_FIXED_GLOBAL_REWARD | discount |\r\n | STEPPED_FIXED_GLOBAL_REWARD | credit reward |\r\n | VARIABLE_GLOBAL_REWARD | gift card |\r\n | VARIABLE_GLOBAL_REWARD | discount |\r\n | VARIABLE_GLOBAL_REWARD | credit reward |\r\n | VARIABLE_CREDIT_REWARD | credit reward |";