Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,14 @@ const DeployButton = ({project}: {project: Project}) => {
return (
<Tooltip>
<TooltipTrigger asChild>
<span className="ml-2 inline-flex">
<Button disabled icon={<RocketIcon />} label="Deploy" variant="outline" />
<span className="inline-flex">
<Button
className="rounded-l-none border-l-0"
disabled
icon={<RocketIcon />}
label="Deploy"
variant="outline"
/>
</span>
</TooltipTrigger>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ const Property = ({
name,
options,
optionsDataSource,
optionsLoadedDynamically,
placeholder,
propertiesDataSource,
propertyParameterValue,
Expand Down Expand Up @@ -527,6 +528,7 @@ const Property = ({
minLength={minLength}
onBlur={() => {
field.onBlur();

handleControlledBlur(field.value);
}}
onChange={(event) => {
Expand Down Expand Up @@ -639,6 +641,7 @@ const Property = ({
}}
options={(formattedOptions as Array<Option>) || []}
optionsDataSource={optionsDataSource}
optionsLoadedDynamically={optionsLoadedDynamically}
path={calculatedPath}
required={required}
showInputTypeSwitchButton={isToolsClusterElement}
Expand Down Expand Up @@ -830,6 +833,7 @@ const Property = ({
onValueChange={(value: string) => handleSelectChange(value, name!)}
options={(formattedOptions as Array<Option>) || []}
optionsDataSource={optionsDataSource}
optionsLoadedDynamically={optionsLoadedDynamically}
path={calculatedPath}
required={required}
showInputTypeSwitchButton={showInputTypeSwitchButton}
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ type UsePropertyReturnType = {
name: string | undefined;
options?: PropertyAllType['options'];
optionsDataSource?: OptionsDataSource;
optionsLoadedDynamically?: boolean;
placeholder: string;
propertiesDataSource?: PropertiesDataSource;
/* eslint-disable @typescript-eslint/no-explicit-any */
Expand Down Expand Up @@ -297,6 +298,7 @@ export const useProperty = ({
numberPrecision,
options,
optionsDataSource,
optionsLoadedDynamically,
placeholder = '',
properties,
propertiesDataSource,
Expand All @@ -317,6 +319,10 @@ export const useProperty = ({

let {displayCondition} = property;

if (optionsLoadedDynamically) {
console.log(property);
}

const {
deleteClusterElementParameterMutation,
deleteWorkflowNodeParameterMutation,
Expand Down Expand Up @@ -1815,6 +1821,7 @@ export const useProperty = ({
name,
options,
optionsDataSource,
optionsLoadedDynamically,
placeholder,
propertiesDataSource,
propertyParameterValue,
Expand Down
1 change: 1 addition & 0 deletions client/src/shared/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ export type PropertyAllType = Omit<PropertyTypeAllType, 'controlType'> & {
controlType?: ControlType;
custom?: boolean;
expressionEnabled?: boolean;
optionsLoadedDynamically?: boolean;
properties?: Array<PropertyAllType>;
};

Expand Down
4 changes: 4 additions & 0 deletions client/test/playwright/pages/workflowPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ export class WorkflowPage {
return this.arrayPropertyItemAt(index).getByRole('textbox');
}

arrayPropertyItemSpinbuttonAt(index: number): Locator {
return this.arrayPropertyItemAt(index).getByRole('spinbutton');
}

async addArrayItemsToReachRowCount({
itemType = 'STRING',
targetRowCount,
Expand Down
6 changes: 3 additions & 3 deletions client/test/playwright/tests/properties/arrayProperty.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -402,15 +402,15 @@ test.describe('ArrayProperty - Array property type (ArrayProperty.tsx)', () => {
});

await test.step('Set first INTEGER row to a value and leave the second INTEGER row empty', async () => {
const firstIntegerInput = workflowPage.arrayPropertyItemTextboxAt(1);
const firstIntegerInput = workflowPage.arrayPropertyItemSpinbuttonAt(1);

await replaceMentionsInputValue({
input: firstIntegerInput,
page: authenticatedPage,
value: valueOnDeletedIntegerRow,
});

const secondIntegerInput = workflowPage.arrayPropertyItemTextboxAt(2);
const secondIntegerInput = workflowPage.arrayPropertyItemSpinbuttonAt(2);

await replaceMentionsInputValue({
input: secondIntegerInput,
Expand All @@ -434,7 +434,7 @@ test.describe('ArrayProperty - Array property type (ArrayProperty.tsx)', () => {

await expect(arrayItems).toHaveCount(2);

const remainingIntegerRowAfterDeleted = workflowPage.arrayPropertyItemTextboxAt(1);
const remainingIntegerRowAfterDeleted = workflowPage.arrayPropertyItemSpinbuttonAt(1);

await expect(remainingIntegerRowAfterDeleted).toHaveValue('');
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ test.describe('ObjectProperty - Object property type (ObjectProperty.tsx)', () =
const integerProperty =
workflowPage.firstTaskComponentConfigurationPanel.getByLabel('Integer property');

const integerInput = integerProperty.getByRole('textbox');
const integerInput = integerProperty.getByRole('spinbutton');

await expect(integerInput).toHaveValue(expectedValues.Integer);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {WorkflowPage} from '../../pages/workflowPage';
import sampleWorkflow from '../../sampleWorkflow.json';
import {clickAndExpectToBeVisible} from '../../utils/clickAndExpectToBeVisible';
import {type TestProjectI, type TestWorkflowI} from '../../utils/projectUtils';
import {fillPropertyInput} from '../../utils/propertyValidationUtils';
import {getWorkflowDefinition, openPropertiesTab, reopenConfigurationPanel} from '../../utils/workflowUtils';

export const test = mergeTests(loginTest(), projectTest, importWorkflowTest);
Expand Down Expand Up @@ -69,7 +70,7 @@ test.describe('Reading from Workflow Definition', () => {
await test.step('integer property', async () => {
const integerProperty = configurationPanel.getByLabel('Integer property');

const integerInput = integerProperty.getByRole('textbox');
const integerInput = integerProperty.getByRole('spinbutton');

await expect(integerInput).toHaveValue(expectedValues.Integer);
});
Expand Down Expand Up @@ -216,6 +217,10 @@ test.describe('Saving to Workflow Definition', () => {

expect(expectedPropertyType).toBe('object');
expect(propertyInputValue).toBe(expectedPropertyValue[0].toString());
} else if (expectedPropertyName === 'Integer') {
const integerInput = property.getByRole('spinbutton');

await expect(integerInput).toHaveValue(expectedPropertyValue!.toString());
} else {
const propertyInputValue = await propertyInput.inputValue();

Expand Down Expand Up @@ -244,7 +249,7 @@ test.describe('Saving to Workflow Definition', () => {
test('should save basic INTEGER property', async () => {
const integerProperty = configurationPanel.getByLabel('Integer property');

const integerInput = integerProperty.getByRole('textbox');
const integerInput = integerProperty.getByRole('spinbutton');

const testValue = 123;

Expand All @@ -259,7 +264,7 @@ test.describe('Saving to Workflow Definition', () => {
test('should save negative value to the INTEGER property', async () => {
const integerProperty = configurationPanel.getByLabel('Integer property');

const integerInput = integerProperty.getByRole('textbox');
const integerInput = integerProperty.getByRole('spinbutton');

const testValue = -123;

Expand Down
Loading
Loading