mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-04 06:40:29 +08:00
playwright : add data-testids for new test (#13364)
### What problem does this PR solve? add data-testids for new test ### Type of change - [x] Other (please describe): add data-testids for new test
This commit is contained in:
@@ -147,7 +147,11 @@ const GraphRagItems = ({
|
||||
></UseGraphRagFormField>
|
||||
{useRaptor && (
|
||||
<>
|
||||
<EntityTypesFormField name="parser_config.graphrag.entity_types"></EntityTypesFormField>
|
||||
<EntityTypesFormField
|
||||
name="parser_config.graphrag.entity_types"
|
||||
addButtonTestId="ds-settings-graph-entity-types-add-btn"
|
||||
inputTestId="ds-settings-graph-entity-types-input"
|
||||
></EntityTypesFormField>
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="parser_config.graphrag.method"
|
||||
@@ -171,6 +175,7 @@ const GraphRagItems = ({
|
||||
<RAGFlowSelect
|
||||
{...field}
|
||||
options={methodOptions}
|
||||
triggerTestId="ds-settings-graph-method-select"
|
||||
></RAGFlowSelect>
|
||||
</FormControl>
|
||||
</div>
|
||||
@@ -200,6 +205,7 @@ const GraphRagItems = ({
|
||||
<Switch
|
||||
checked={field.value}
|
||||
onCheckedChange={field.onChange}
|
||||
data-testid="ds-settings-graph-entity-resolution-switch"
|
||||
></Switch>
|
||||
</FormControl>
|
||||
</div>
|
||||
@@ -229,6 +235,7 @@ const GraphRagItems = ({
|
||||
<Switch
|
||||
checked={field.value}
|
||||
onCheckedChange={field.onChange}
|
||||
data-testid="ds-settings-graph-community-reports-switch"
|
||||
></Switch>
|
||||
</FormControl>
|
||||
</div>
|
||||
|
||||
@@ -129,8 +129,18 @@ const RaptorFormFields = ({
|
||||
<FormControl>
|
||||
<Radio.Group {...field} disabled={!!data?.finish_at}>
|
||||
<div className={'flex gap-4 w-full text-text-secondary '}>
|
||||
<Radio value="dataset">{t('scopeDataset')}</Radio>
|
||||
<Radio value="file">{t('scopeSingleFile')}</Radio>
|
||||
<Radio
|
||||
value="dataset"
|
||||
testId="ds-settings-raptor-generation-scope-option-dataset"
|
||||
>
|
||||
{t('scopeDataset')}
|
||||
</Radio>
|
||||
<Radio
|
||||
value="file"
|
||||
testId="ds-settings-raptor-generation-scope-option-document"
|
||||
>
|
||||
{t('scopeSingleFile')}
|
||||
</Radio>
|
||||
</div>
|
||||
</Radio.Group>
|
||||
</FormControl>
|
||||
@@ -167,6 +177,7 @@ const RaptorFormFields = ({
|
||||
onChange={(e) => {
|
||||
field.onChange(e?.target?.value);
|
||||
}}
|
||||
data-testid="ds-settings-raptor-prompt-textarea"
|
||||
/>
|
||||
</FormControl>
|
||||
</div>
|
||||
@@ -186,6 +197,8 @@ const RaptorFormFields = ({
|
||||
max={2048}
|
||||
min={0}
|
||||
layout={FormLayout.Horizontal}
|
||||
sliderTestId="ds-settings-raptor-max-token-slider"
|
||||
numberInputTestId="ds-settings-raptor-max-token-input"
|
||||
></SliderInputFormField>
|
||||
<SliderInputFormField
|
||||
name={'parser_config.raptor.threshold'}
|
||||
@@ -195,6 +208,8 @@ const RaptorFormFields = ({
|
||||
max={1}
|
||||
min={0}
|
||||
layout={FormLayout.Horizontal}
|
||||
sliderTestId="ds-settings-raptor-threshold-slider"
|
||||
numberInputTestId="ds-settings-raptor-threshold-input"
|
||||
></SliderInputFormField>
|
||||
<SliderInputFormField
|
||||
name={'parser_config.raptor.max_cluster'}
|
||||
@@ -203,6 +218,8 @@ const RaptorFormFields = ({
|
||||
max={1024}
|
||||
min={1}
|
||||
layout={FormLayout.Horizontal}
|
||||
sliderTestId="ds-settings-raptor-max-cluster-slider"
|
||||
numberInputTestId="ds-settings-raptor-max-cluster-input"
|
||||
></SliderInputFormField>
|
||||
<FormField
|
||||
control={form.control}
|
||||
@@ -220,11 +237,13 @@ const RaptorFormFields = ({
|
||||
className="w-full"
|
||||
defaultValue={0}
|
||||
type="number"
|
||||
data-testid="ds-settings-raptor-seed-input"
|
||||
suffix={
|
||||
<div className="w-7 flex justify-center items-center">
|
||||
<Shuffle
|
||||
className="size-3.5 cursor-pointer"
|
||||
onClick={handleGenerate}
|
||||
data-testid="ds-settings-raptor-seed-randomize-btn"
|
||||
/>
|
||||
</div>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user