@kindly/react-chat 2.40.2 → 2.40.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kindly/react-chat",
3
- "version": "2.40.2",
3
+ "version": "2.40.3",
4
4
  "description": "Kindly Chat react component",
5
5
  "repository": "https://github.com/kindly-ai/kindly-chat/tree/main/packages/react-chat",
6
6
  "main": "dist/index.js",
@@ -126,5 +126,5 @@
126
126
  "silent": true,
127
127
  "webpackConfig": "./webpack.config.js"
128
128
  },
129
- "gitHead": "68d497621b07acae27ea7d19a25d032515afc3de"
129
+ "gitHead": "d8642172547ebfaca577aa785bd7b4334439e176"
130
130
  }
@@ -821,6 +821,44 @@ Form.parameters = {
821
821
  },
822
822
  ],
823
823
  },
824
+ {
825
+ input_type: FIELDS.SELECT,
826
+ order: 5,
827
+ affix: '',
828
+ required: true,
829
+ slug: 'select-field',
830
+ attributes: {
831
+ default_value: '5',
832
+ options: [
833
+ {
834
+ value: 1,
835
+ label: 1,
836
+ },
837
+ {
838
+ value: 2,
839
+ label: 2,
840
+ },
841
+ {
842
+ value: 3,
843
+ label: 3,
844
+ },
845
+ {
846
+ value: 4,
847
+ label: 4,
848
+ },
849
+ {
850
+ value: 5,
851
+ label: 5,
852
+ },
853
+ ],
854
+ },
855
+ texts: {
856
+ label: 'Select',
857
+ affix_value: '',
858
+ placeholder_text: 'Please select option',
859
+ },
860
+ validators: [],
861
+ },
824
862
  ],
825
863
  },
826
864
  },
@@ -845,6 +883,13 @@ Form.play = async () => {
845
883
  const emailPlaceholderValue = 'Email';
846
884
  const emailInput = await screen.findByPlaceholderText(emailPlaceholderValue);
847
885
  await userEvent.type(emailInput, 'this@is@not@an@email');
886
+ const selectPlaceholderValue = 'Please select option';
887
+ const selectInput = await screen.findByPlaceholderText(selectPlaceholderValue);
888
+ const selectInputStyle = window.getComputedStyle(selectInput);
889
+ expect(selectInputStyle.border).not.toContain('#00000000');
890
+ expect(selectInputStyle.border).not.toContain('transparent');
891
+ await userEvent.selectOptions(selectInput, '2');
892
+ await expect(selectInputStyle.border).toContain('rgba(0, 0, 0, 0)');
848
893
  };
849
894
 
850
895
  export const LeaveContactDetails = Template.bind({});