Skip to content

Commit 85c6d8c

Browse files
authored
remove behavioural story tests covered by playwright (#13538)
* remove redundant tests * format * restore textbox
1 parent 53cb4ca commit 85c6d8c

36 files changed

Lines changed: 254 additions & 1320 deletions

‎js/audio/Audio.stories.svelte‎

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,6 @@
4848
}}
4949
{template}
5050
/>
51-
<Story
52-
name="Audio Player without recording waveform"
53-
args={{
54-
value: {
55-
path: audio_sample,
56-
url: audio_sample,
57-
orig_name: "audio_sample.mp3"
58-
},
59-
waveform_options: { show_recording_waveform: false },
60-
label: "Audio Player",
61-
sources: ["upload", "microphone"]
62-
}}
63-
{template}
64-
/>
6551
<Story
6652
name="Audio Recorder"
6753
args={{
@@ -73,22 +59,6 @@
7359
}}
7460
{template}
7561
/>
76-
<Story
77-
name="Audio Recorder with download button"
78-
args={{
79-
value: {
80-
path: audio_sample,
81-
url: audio_sample,
82-
orig_name: "audio_sample.mp3"
83-
},
84-
interactive: true,
85-
buttons: ["download"],
86-
sources: ["microphone"],
87-
label: "Audio Recorder",
88-
waveform_options: { show_recording_waveform: true }
89-
}}
90-
{template}
91-
/>
9262
<Story
9363
name="Output with hidden download button"
9464
args={{
@@ -116,22 +86,6 @@
11686
}}
11787
{template}
11888
/>
119-
<Story
120-
name="With autoplay"
121-
args={{
122-
value: {
123-
path: audio_sample,
124-
url: audio_sample,
125-
orig_name: "audio_sample.mp3"
126-
},
127-
interactive: true,
128-
sources: ["microphone", "upload"],
129-
label: "Audio Upload",
130-
autoplay: true,
131-
waveform_options: { show_recording_waveform: true }
132-
}}
133-
{template}
134-
/>
13589
<Story
13690
name="Upload with disabled editing"
13791
args={{
@@ -148,14 +102,3 @@
148102
}}
149103
{template}
150104
/>
151-
<Story
152-
name="With hidden recording waveform"
153-
args={{
154-
value: null,
155-
interactive: true,
156-
sources: ["microphone"],
157-
waveform_options: { show_recording_waveform: false },
158-
label: "Audio Recorder"
159-
}}
160-
{template}
161-
/>

‎js/audio/AudioExample.stories.svelte‎

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,3 @@
1818
<Audio {...args} />
1919
{/snippet}
2020
</Story>
21-
22-
<Story
23-
name="Null"
24-
args={{
25-
value: null
26-
}}
27-
>
28-
{#snippet template(args)}
29-
<Audio {...args} />
30-
{/snippet}
31-
</Story>

‎js/button/Button.stories.svelte‎

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,6 @@
6161
args={{ variant: "stop", size: "lg", value: "Stop Button" }}
6262
{template}
6363
/>
64-
<Story
65-
name="Small"
66-
args={{ variant: "primary", size: "sm", value: "Small Button" }}
67-
{template}
68-
/>
69-
<Story
70-
name="Medium"
71-
args={{ variant: "primary", size: "md", value: "Medium Button" }}
72-
{template}
73-
/>
7464
<Story
7565
name="Disabled"
7666
args={{
@@ -81,23 +71,8 @@
8171
}}
8272
{template}
8373
/>
84-
<Story
85-
name="Button with link"
86-
args={{
87-
variant: "primary",
88-
size: "lg",
89-
link: "https://huggingface.co",
90-
value: "Link Button"
91-
}}
92-
{template}
93-
/>
9474
<Story
9575
name="Huggingface variant"
9676
args={{ variant: "huggingface", size: "lg", value: "Huggingface Button" }}
9777
{template}
9878
/>
99-
<Story
100-
name="Hidden"
101-
args={{ variant: "primary", visible: false, value: "Hidden Button" }}
102-
{template}
103-
/>

‎js/chatbot/Chatbot.stories.svelte‎

Lines changed: 0 additions & 143 deletions
Original file line numberDiff line numberDiff line change
@@ -69,21 +69,6 @@
6969
}}
7070
{template}
7171
/>
72-
<Story
73-
name="Chatbot with math disabled, small height"
74-
args={{
75-
latex_delimiters: [],
76-
height: 200,
77-
show_copy_button: false,
78-
value: defaultValue
79-
}}
80-
{template}
81-
/>
82-
<Story
83-
name="Chatbot with math disabled, small max_height"
84-
args={{ latex_delimiters: [], max_height: 200, value: defaultValue }}
85-
{template}
86-
/>
8772
<Story
8873
name="Chatbot with text rendered right-to-left"
8974
args={{
@@ -166,75 +151,6 @@
166151
}}
167152
{template}
168153
/>
169-
<Story
170-
name="Chatbot with headers and lists"
171-
args={{
172-
value: [
173-
{
174-
role: "user",
175-
content: [
176-
{
177-
type: "text",
178-
text: "# Markdown Example\n\nThis document is a showcase of various Markdown capabilities."
179-
}
180-
]
181-
},
182-
{
183-
role: "assistant",
184-
content: [
185-
{
186-
type: "text",
187-
text: "## Table of Contents\n\n1. [Text Formatting](#text-formating)\n2. [Code Blocks](#code-blocks)\n3. [Tables](#tables)"
188-
}
189-
]
190-
}
191-
]
192-
}}
193-
{template}
194-
/>
195-
<Story
196-
name="Chatbot with tables and nested lists"
197-
args={{
198-
value: [
199-
{
200-
role: "user",
201-
content: [
202-
{
203-
type: "text",
204-
text: "Creating tables in Markdown is straightforward:\n\n| Header 1 | Header 2 | Header 3 |\n|----------|----------|----------|\n| Row 1, Cell 1 | Row 1, Cell 2 | Row 1, Cell 3 |\n| Row 2, Cell 1 | Row 2, Cell 2 | Row 2, Cell 3 |\n| Row 3, Cell 1 | Row 3, Cell 2 | Row 3, Cell 3 |"
205-
}
206-
]
207-
},
208-
{
209-
role: "assistant",
210-
content: [
211-
{
212-
type: "text",
213-
text: "### Unordered List\n\n- Item 1\n- Item 2\n - Subitem 2.1\n - Subitem 2.2\n- Item 3\n\n### Ordered List\n\n1. First Item\n2. Second Item\n 1. Subitem 2.1\n 2. Subitem 2.2\n3. Third Item"
214-
}
215-
]
216-
}
217-
]
218-
}}
219-
{template}
220-
/>
221-
<Story
222-
name="Chatbot with image in markdown"
223-
args={{
224-
value: [
225-
{
226-
role: "user",
227-
content: [
228-
{
229-
type: "text",
230-
text: `![A cheetah](${cheetah})`
231-
}
232-
]
233-
}
234-
]
235-
}}
236-
{template}
237-
/>
238154
<Story
239155
name="Uploaded text files"
240156
args={{
@@ -399,65 +315,6 @@
399315
}}
400316
{template}
401317
/>
402-
<Story
403-
name="Consecutive messages not grouped in same bubble"
404-
args={{
405-
type: "messages",
406-
display_consecutive_in_same_bubble: false,
407-
value: [
408-
{ role: "user", content: [{ type: "text", text: "Show me the file." }] },
409-
{
410-
role: "user",
411-
content: [{ type: "text", text: "Second user message" }]
412-
},
413-
{
414-
role: "assistant",
415-
content: [{ type: "text", text: "Here is the file you requested" }]
416-
},
417-
{
418-
role: "assistant",
419-
content: [
420-
{
421-
type: "file",
422-
file: { path: "abc/qwerty.txt", url: "" },
423-
alt_text: null
424-
}
425-
]
426-
}
427-
]
428-
}}
429-
{template}
430-
/>
431-
<Story
432-
name="Chatbot with examples (not multimodal)"
433-
args={{
434-
value: [],
435-
examples: [
436-
{ text: "What is machine learning?" },
437-
{
438-
text: "Analyze this image",
439-
files: [
440-
{
441-
mime_type: "image/jpeg",
442-
url: bus,
443-
orig_name: "bus.png"
444-
}
445-
]
446-
},
447-
{
448-
text: "Process this document",
449-
files: [
450-
{
451-
mime_type: "application/pdf",
452-
url: "/document.pdf",
453-
orig_name: "document.pdf"
454-
}
455-
]
456-
}
457-
]
458-
}}
459-
{template}
460-
/>
461318
<Story
462319
name="Displaying Tool Message"
463320
args={{

‎js/checkbox/Checkbox.stories.svelte‎

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -52,36 +52,6 @@
5252
<Checkbox {...wrapProps(args)} />
5353
{/snippet}
5454

55-
<Story
56-
name="Checkbox with label"
57-
args={{
58-
value: false,
59-
interactive: true,
60-
label: "Accept terms and conditions",
61-
show_label: true
62-
}}
63-
{template}
64-
/>
65-
<Story
66-
name="Checkbox with info"
67-
args={{
68-
value: false,
69-
interactive: true,
70-
info: "You must accept to continue",
71-
show_label: false
72-
}}
73-
{template}
74-
/>
75-
<Story
76-
name="Checkbox without label or info"
77-
args={{
78-
value: false,
79-
interactive: true,
80-
label: "Hidden label",
81-
show_label: false
82-
}}
83-
{template}
84-
/>
8555
<Story
8656
name="Checkbox with label and info"
8757
args={{

‎js/checkboxgroup/Checkboxgroup.stories.svelte‎

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -103,21 +103,6 @@
103103
}}
104104
{template}
105105
/>
106-
<Story
107-
name="CheckboxGroup without label"
108-
args={{
109-
value: ["swim", "run"],
110-
choices: [
111-
["Run", "run"],
112-
["Swim", "swim"],
113-
["Jump", "jump"]
114-
],
115-
label: "Select your activities",
116-
interactive: true,
117-
show_label: false
118-
}}
119-
{template}
120-
/>
121106
<Story
122107
name="CheckboxGroup disabled"
123108
args={{
@@ -154,20 +139,3 @@
154139
}}
155140
{template}
156141
/>
157-
<Story
158-
name="CheckboxGroup with different display and internal values"
159-
args={{
160-
value: ["jump", "jump_again"],
161-
choices: [
162-
["Running (Cardio)", "run"],
163-
["Swimming (Full Body)", "swim"],
164-
["Jumping (Beginner)", "jump"],
165-
["Jumping (Advanced)", "jump_again"]
166-
],
167-
label: "Exercise Selection",
168-
info: "Internal values differ from display text",
169-
interactive: true,
170-
show_label: true
171-
}}
172-
{template}
173-
/>

0 commit comments

Comments
 (0)