fix(client): fix variable textarea ime state under edge (#3458)
* fix(client): fix variable textarea ime state under edge * test(plugin-workflow): adjust delay for typing in test case * test(plugin-workflow): adjust delay for typing in test case
This commit is contained in:
parent
3c4000fdad
commit
644039ba53
@ -1,6 +1,6 @@
|
|||||||
import { css, cx } from '@emotion/css';
|
import { css, cx } from '@emotion/css';
|
||||||
import { useForm } from '@formily/react';
|
import { useForm } from '@formily/react';
|
||||||
import { Input } from 'antd';
|
import { Input, Space } from 'antd';
|
||||||
import { cloneDeep } from 'lodash';
|
import { cloneDeep } from 'lodash';
|
||||||
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
||||||
import sanitizeHTML from 'sanitize-html';
|
import sanitizeHTML from 'sanitize-html';
|
||||||
@ -308,15 +308,22 @@ export function TextArea(props) {
|
|||||||
if (ev.key === 'Enter') {
|
if (ev.key === 'Enter') {
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
}
|
}
|
||||||
setIME(ev.keyCode === 229 && ![' ', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', 'Enter'].includes(ev.key));
|
|
||||||
// if (ev.key === 'Control') {
|
|
||||||
// console.debug(getSelection().getRangeAt(0));
|
|
||||||
// }
|
|
||||||
// if (ev.key === 'Alt') {
|
|
||||||
// console.debug(getCurrentRange(ev.currentTarget));
|
|
||||||
// }
|
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
const onCompositionStart = useCallback(function () {
|
||||||
|
setIME(true);
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
const onCompositionEnd = useCallback(
|
||||||
|
({ currentTarget }) => {
|
||||||
|
setIME(false);
|
||||||
|
setChanged(true);
|
||||||
|
setRange(getCurrentRange(currentTarget));
|
||||||
|
onChange(getValue(currentTarget));
|
||||||
|
},
|
||||||
|
[onChange],
|
||||||
|
);
|
||||||
|
|
||||||
const onPaste = useCallback(
|
const onPaste = useCallback(
|
||||||
function (ev) {
|
function (ev) {
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
@ -353,8 +360,7 @@ export function TextArea(props) {
|
|||||||
const disabled = props.disabled || form.disabled;
|
const disabled = props.disabled || form.disabled;
|
||||||
|
|
||||||
return wrapSSR(
|
return wrapSSR(
|
||||||
<Input.Group
|
<Space.Compact
|
||||||
compact
|
|
||||||
className={cx(
|
className={cx(
|
||||||
componentCls,
|
componentCls,
|
||||||
hashId,
|
hashId,
|
||||||
@ -386,6 +392,8 @@ export function TextArea(props) {
|
|||||||
onBlur={onBlur}
|
onBlur={onBlur}
|
||||||
onKeyDown={onKeyDown}
|
onKeyDown={onKeyDown}
|
||||||
onPaste={onPaste}
|
onPaste={onPaste}
|
||||||
|
onCompositionStart={onCompositionStart}
|
||||||
|
onCompositionEnd={onCompositionEnd}
|
||||||
className={cx(
|
className={cx(
|
||||||
hashId,
|
hashId,
|
||||||
'ant-input',
|
'ant-input',
|
||||||
@ -416,7 +424,7 @@ export function TextArea(props) {
|
|||||||
changeOnSelect={changeOnSelect}
|
changeOnSelect={changeOnSelect}
|
||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
</Input.Group>,
|
</Space.Compact>,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ const useStyles = genStyleHook('nb-variable-select', (token) => {
|
|||||||
'.ant-select.ant-cascader': {
|
'.ant-select.ant-cascader': {
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
top: '-1px',
|
top: '-1px',
|
||||||
left: '-1px',
|
right: '-1px',
|
||||||
minWidth: 'auto',
|
minWidth: 'auto',
|
||||||
width: 'calc(100% + 2px)',
|
width: 'calc(100% + 2px)',
|
||||||
height: 'calc(100% + 2px)',
|
height: 'calc(100% + 2px)',
|
||||||
|
@ -72,7 +72,7 @@ test('Collection event Add Data Trigger, determines that the trigger node single
|
|||||||
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
||||||
const conditionalRightConstant = faker.lorem.words();
|
const conditionalRightConstant = faker.lorem.words();
|
||||||
await page.keyboard.type(`=='${conditionalRightConstant}'`);
|
await page.keyboard.type(`=='${conditionalRightConstant}'`, { delay: 50 });
|
||||||
await expect(conditionNode.conditionExpressionEditBox).toHaveText(
|
await expect(conditionNode.conditionExpressionEditBox).toHaveText(
|
||||||
`Trigger variables / Trigger data / ${triggerNodeFieldDisplayName}=='${conditionalRightConstant}'`,
|
`Trigger variables / Trigger data / ${triggerNodeFieldDisplayName}=='${conditionalRightConstant}'`,
|
||||||
);
|
);
|
||||||
@ -188,7 +188,7 @@ test('Collection event Add Data Trigger, determines that the trigger node single
|
|||||||
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
||||||
const conditionalRightConstant = faker.lorem.words();
|
const conditionalRightConstant = faker.lorem.words();
|
||||||
await page.keyboard.type(`=='${conditionalRightConstant}'`);
|
await page.keyboard.type(`=='${conditionalRightConstant}'`, { delay: 50 });
|
||||||
await expect(conditionNode.conditionExpressionEditBox).toHaveText(
|
await expect(conditionNode.conditionExpressionEditBox).toHaveText(
|
||||||
`Trigger variables / Trigger data / ${triggerNodeFieldDisplayName}=='${conditionalRightConstant}'`,
|
`Trigger variables / Trigger data / ${triggerNodeFieldDisplayName}=='${conditionalRightConstant}'`,
|
||||||
);
|
);
|
||||||
@ -304,7 +304,7 @@ test('Collection event Add Data Trigger, determines that the trigger node single
|
|||||||
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
||||||
const conditionalRightConstant = faker.lorem.words();
|
const conditionalRightConstant = faker.lorem.words();
|
||||||
await page.keyboard.type(`!='${conditionalRightConstant}'`);
|
await page.keyboard.type(`!='${conditionalRightConstant}'`, { delay: 50 });
|
||||||
await expect(conditionNode.conditionExpressionEditBox).toHaveText(
|
await expect(conditionNode.conditionExpressionEditBox).toHaveText(
|
||||||
`Trigger variables / Trigger data / ${triggerNodeFieldDisplayName}!='${conditionalRightConstant}'`,
|
`Trigger variables / Trigger data / ${triggerNodeFieldDisplayName}!='${conditionalRightConstant}'`,
|
||||||
);
|
);
|
||||||
@ -420,7 +420,7 @@ test('Collection event Add Data Trigger, determines that the trigger node single
|
|||||||
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
||||||
const conditionalRightConstant = faker.lorem.words();
|
const conditionalRightConstant = faker.lorem.words();
|
||||||
await page.keyboard.type(`!='${conditionalRightConstant}'`);
|
await page.keyboard.type(`!='${conditionalRightConstant}'`, { delay: 50 });
|
||||||
await expect(conditionNode.conditionExpressionEditBox).toHaveText(
|
await expect(conditionNode.conditionExpressionEditBox).toHaveText(
|
||||||
`Trigger variables / Trigger data / ${triggerNodeFieldDisplayName}!='${conditionalRightConstant}'`,
|
`Trigger variables / Trigger data / ${triggerNodeFieldDisplayName}!='${conditionalRightConstant}'`,
|
||||||
);
|
);
|
||||||
@ -559,7 +559,7 @@ test('Collection event add data trigger, determine the trigger node integer vari
|
|||||||
await page.getByRole('menuitemcheckbox', { name: 'Trigger variables' }).click();
|
await page.getByRole('menuitemcheckbox', { name: 'Trigger variables' }).click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
||||||
await page.keyboard.type('==');
|
await page.keyboard.type('==', { delay: 50 });
|
||||||
await page.getByLabel('variable-button').click();
|
await page.getByLabel('variable-button').click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: 'Node result' }).click();
|
await page.getByRole('menuitemcheckbox', { name: 'Node result' }).click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: preQueryRecordNodeTitle }).click();
|
await page.getByRole('menuitemcheckbox', { name: preQueryRecordNodeTitle }).click();
|
||||||
@ -709,7 +709,7 @@ test('Collection event add data trigger, determine trigger node integer variable
|
|||||||
await page.getByRole('menuitemcheckbox', { name: 'Trigger variables' }).click();
|
await page.getByRole('menuitemcheckbox', { name: 'Trigger variables' }).click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
||||||
await page.keyboard.type('==');
|
await page.keyboard.type('==', { delay: 50 });
|
||||||
await page.getByLabel('variable-button').click();
|
await page.getByLabel('variable-button').click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: 'Node result' }).click();
|
await page.getByRole('menuitemcheckbox', { name: 'Node result' }).click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: preQueryRecordNodeTitle }).click();
|
await page.getByRole('menuitemcheckbox', { name: preQueryRecordNodeTitle }).click();
|
||||||
@ -849,7 +849,7 @@ test('Collection event add data trigger, determine trigger node integer variable
|
|||||||
await page.getByRole('menuitemcheckbox', { name: 'Trigger variables' }).click();
|
await page.getByRole('menuitemcheckbox', { name: 'Trigger variables' }).click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
||||||
await page.keyboard.type('!=');
|
await page.keyboard.type('!=', { delay: 50 });
|
||||||
await page.getByLabel('variable-button').click();
|
await page.getByLabel('variable-button').click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: 'Node result' }).click();
|
await page.getByRole('menuitemcheckbox', { name: 'Node result' }).click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: preQueryRecordNodeTitle }).click();
|
await page.getByRole('menuitemcheckbox', { name: preQueryRecordNodeTitle }).click();
|
||||||
@ -993,7 +993,7 @@ test('Collection event add data trigger, determine the trigger node integer vari
|
|||||||
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
||||||
const conditionalRightConstant = faker.lorem.words();
|
const conditionalRightConstant = faker.lorem.words();
|
||||||
await page.keyboard.type(`!='${conditionalRightConstant}'`);
|
await page.keyboard.type(`!='${conditionalRightConstant}'`, { delay: 50 });
|
||||||
await expect(conditionNode.conditionExpressionEditBox).toHaveText(
|
await expect(conditionNode.conditionExpressionEditBox).toHaveText(
|
||||||
`Trigger variables / Trigger data / ${triggerNodeFieldDisplayName}!='${conditionalRightConstant}'`,
|
`Trigger variables / Trigger data / ${triggerNodeFieldDisplayName}!='${conditionalRightConstant}'`,
|
||||||
);
|
);
|
||||||
|
@ -73,7 +73,7 @@ test('Collection event add data trigger, determine trigger node integer field va
|
|||||||
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
||||||
const conditionalRightConstant = faker.number.int();
|
const conditionalRightConstant = faker.number.int();
|
||||||
await page.keyboard.type(`==${conditionalRightConstant}`);
|
await page.keyboard.type(`==${conditionalRightConstant}`, { delay: 50 });
|
||||||
await expect(conditionNode.conditionExpressionEditBox).toHaveText(
|
await expect(conditionNode.conditionExpressionEditBox).toHaveText(
|
||||||
`Trigger variables / Trigger data / ${triggerNodeFieldDisplayName}==${conditionalRightConstant}`,
|
`Trigger variables / Trigger data / ${triggerNodeFieldDisplayName}==${conditionalRightConstant}`,
|
||||||
);
|
);
|
||||||
@ -189,7 +189,7 @@ test('Collection event Add Data Trigger, determines that the trigger node intege
|
|||||||
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
||||||
const conditionalRightConstant = faker.number.int();
|
const conditionalRightConstant = faker.number.int();
|
||||||
await page.keyboard.type(`==${conditionalRightConstant}`);
|
await page.keyboard.type(`==${conditionalRightConstant}`, { delay: 50 });
|
||||||
await expect(conditionNode.conditionExpressionEditBox).toHaveText(
|
await expect(conditionNode.conditionExpressionEditBox).toHaveText(
|
||||||
`Trigger variables / Trigger data / ${triggerNodeFieldDisplayName}==${conditionalRightConstant}`,
|
`Trigger variables / Trigger data / ${triggerNodeFieldDisplayName}==${conditionalRightConstant}`,
|
||||||
);
|
);
|
||||||
@ -302,7 +302,7 @@ test('Collection event Add Data Trigger, determines that the trigger node intege
|
|||||||
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
||||||
const conditionalRightConstant = faker.number.int();
|
const conditionalRightConstant = faker.number.int();
|
||||||
await page.keyboard.type(`!=${conditionalRightConstant}`);
|
await page.keyboard.type(`!=${conditionalRightConstant}`, { delay: 50 });
|
||||||
await expect(conditionNode.conditionExpressionEditBox).toHaveText(
|
await expect(conditionNode.conditionExpressionEditBox).toHaveText(
|
||||||
`Trigger variables / Trigger data / ${triggerNodeFieldDisplayName}!=${conditionalRightConstant}`,
|
`Trigger variables / Trigger data / ${triggerNodeFieldDisplayName}!=${conditionalRightConstant}`,
|
||||||
);
|
);
|
||||||
@ -415,7 +415,7 @@ test('Collection event add data trigger, determines that the trigger node intege
|
|||||||
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
||||||
const conditionalRightConstant = faker.number.int();
|
const conditionalRightConstant = faker.number.int();
|
||||||
await page.keyboard.type(`!=${conditionalRightConstant}`);
|
await page.keyboard.type(`!=${conditionalRightConstant}`, { delay: 50 });
|
||||||
await expect(conditionNode.conditionExpressionEditBox).toHaveText(
|
await expect(conditionNode.conditionExpressionEditBox).toHaveText(
|
||||||
`Trigger variables / Trigger data / ${triggerNodeFieldDisplayName}!=${conditionalRightConstant}`,
|
`Trigger variables / Trigger data / ${triggerNodeFieldDisplayName}!=${conditionalRightConstant}`,
|
||||||
);
|
);
|
||||||
|
@ -72,7 +72,7 @@ test('Collection event Add Data Trigger, Formula engine, determines that the tri
|
|||||||
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
||||||
const conditionalRightConstant = faker.string.alphanumeric(10);
|
const conditionalRightConstant = faker.string.alphanumeric(10);
|
||||||
await page.keyboard.type(`=='${conditionalRightConstant}'`);
|
await page.keyboard.type(`=='${conditionalRightConstant}'`, { delay: 50 });
|
||||||
await expect(conditionNode.conditionExpressionEditBox).toHaveText(
|
await expect(conditionNode.conditionExpressionEditBox).toHaveText(
|
||||||
`Trigger variables / Trigger data / ${triggerNodeFieldDisplayName}=='${conditionalRightConstant}'`,
|
`Trigger variables / Trigger data / ${triggerNodeFieldDisplayName}=='${conditionalRightConstant}'`,
|
||||||
);
|
);
|
||||||
@ -154,7 +154,7 @@ test('Collection event Add Data Trigger, Formula engine, determines that the tri
|
|||||||
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
||||||
const conditionalRightConstant = faker.string.alphanumeric(10);
|
const conditionalRightConstant = faker.string.alphanumeric(10);
|
||||||
await page.keyboard.type(`=='${conditionalRightConstant}'`);
|
await page.keyboard.type(`=='${conditionalRightConstant}'`, { delay: 50 });
|
||||||
await expect(conditionNode.conditionExpressionEditBox).toHaveText(
|
await expect(conditionNode.conditionExpressionEditBox).toHaveText(
|
||||||
`Trigger variables / Trigger data / ${triggerNodeFieldDisplayName}=='${conditionalRightConstant}'`,
|
`Trigger variables / Trigger data / ${triggerNodeFieldDisplayName}=='${conditionalRightConstant}'`,
|
||||||
);
|
);
|
||||||
@ -234,7 +234,7 @@ test('Collection event Add Data Trigger, Formula engine, determines that the tri
|
|||||||
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
||||||
const conditionalRightConstant = faker.string.alphanumeric(10);
|
const conditionalRightConstant = faker.string.alphanumeric(10);
|
||||||
await page.keyboard.type(`!='${conditionalRightConstant}'`);
|
await page.keyboard.type(`!='${conditionalRightConstant}'`, { delay: 50 });
|
||||||
await expect(conditionNode.conditionExpressionEditBox).toHaveText(
|
await expect(conditionNode.conditionExpressionEditBox).toHaveText(
|
||||||
`Trigger variables / Trigger data / ${triggerNodeFieldDisplayName}!='${conditionalRightConstant}'`,
|
`Trigger variables / Trigger data / ${triggerNodeFieldDisplayName}!='${conditionalRightConstant}'`,
|
||||||
);
|
);
|
||||||
@ -315,7 +315,7 @@ test('Collection event Add Data Trigger, Formula engine, determines that the tri
|
|||||||
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
||||||
const conditionalRightConstant = faker.string.alphanumeric(10);
|
const conditionalRightConstant = faker.string.alphanumeric(10);
|
||||||
await page.keyboard.type(`!='${conditionalRightConstant}'`);
|
await page.keyboard.type(`!='${conditionalRightConstant}'`, { delay: 50 });
|
||||||
await expect(conditionNode.conditionExpressionEditBox).toHaveText(
|
await expect(conditionNode.conditionExpressionEditBox).toHaveText(
|
||||||
`Trigger variables / Trigger data / ${triggerNodeFieldDisplayName}!='${conditionalRightConstant}'`,
|
`Trigger variables / Trigger data / ${triggerNodeFieldDisplayName}!='${conditionalRightConstant}'`,
|
||||||
);
|
);
|
||||||
@ -422,7 +422,7 @@ test('Collection event add data trigger, Formula engine, determine the trigger n
|
|||||||
await page.getByRole('menuitemcheckbox', { name: 'Trigger variables' }).click();
|
await page.getByRole('menuitemcheckbox', { name: 'Trigger variables' }).click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
||||||
await page.keyboard.type('==');
|
await page.keyboard.type('==', { delay: 50 });
|
||||||
await page.getByLabel('variable-button').click();
|
await page.getByLabel('variable-button').click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: 'Node result' }).click();
|
await page.getByRole('menuitemcheckbox', { name: 'Node result' }).click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: preQueryRecordNodeTitle }).click();
|
await page.getByRole('menuitemcheckbox', { name: preQueryRecordNodeTitle }).click();
|
||||||
@ -532,7 +532,7 @@ test('Collection event add data trigger, Formula engine, determine trigger node
|
|||||||
await page.getByRole('menuitemcheckbox', { name: 'Trigger variables' }).click();
|
await page.getByRole('menuitemcheckbox', { name: 'Trigger variables' }).click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
||||||
await page.keyboard.type('==');
|
await page.keyboard.type('==', { delay: 50 });
|
||||||
await page.getByLabel('variable-button').click();
|
await page.getByLabel('variable-button').click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: 'Node result' }).click();
|
await page.getByRole('menuitemcheckbox', { name: 'Node result' }).click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: preQueryRecordNodeTitle }).click();
|
await page.getByRole('menuitemcheckbox', { name: preQueryRecordNodeTitle }).click();
|
||||||
@ -640,7 +640,7 @@ test('Collection event add data trigger, Formula engine, determine trigger node
|
|||||||
await page.getByRole('menuitemcheckbox', { name: 'Trigger variables' }).click();
|
await page.getByRole('menuitemcheckbox', { name: 'Trigger variables' }).click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
||||||
await page.keyboard.type('!=');
|
await page.keyboard.type('!=', { delay: 50 });
|
||||||
await page.getByLabel('variable-button').click();
|
await page.getByLabel('variable-button').click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: 'Node result' }).click();
|
await page.getByRole('menuitemcheckbox', { name: 'Node result' }).click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: preQueryRecordNodeTitle }).click();
|
await page.getByRole('menuitemcheckbox', { name: preQueryRecordNodeTitle }).click();
|
||||||
@ -750,7 +750,7 @@ test('Collection event add data trigger, Formula engine, determine the trigger n
|
|||||||
await page.getByRole('menuitemcheckbox', { name: 'Trigger variables' }).click();
|
await page.getByRole('menuitemcheckbox', { name: 'Trigger variables' }).click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
||||||
await page.keyboard.type('!=');
|
await page.keyboard.type('!=', { delay: 50 });
|
||||||
await page.getByLabel('variable-button').click();
|
await page.getByLabel('variable-button').click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: 'Node result' }).click();
|
await page.getByRole('menuitemcheckbox', { name: 'Node result' }).click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: preQueryRecordNodeTitle }).click();
|
await page.getByRole('menuitemcheckbox', { name: preQueryRecordNodeTitle }).click();
|
||||||
|
@ -73,7 +73,7 @@ test('Collection event add data trigger, Math engine, determine trigger node int
|
|||||||
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
||||||
const conditionalRightConstant = faker.number.int();
|
const conditionalRightConstant = faker.number.int();
|
||||||
await page.keyboard.type(`==${conditionalRightConstant}`);
|
await page.keyboard.type(`==${conditionalRightConstant}`, { delay: 50 });
|
||||||
await expect(conditionNode.conditionExpressionEditBox).toHaveText(
|
await expect(conditionNode.conditionExpressionEditBox).toHaveText(
|
||||||
`Trigger variables / Trigger data / ${triggerNodeFieldDisplayName}==${conditionalRightConstant}`,
|
`Trigger variables / Trigger data / ${triggerNodeFieldDisplayName}==${conditionalRightConstant}`,
|
||||||
);
|
);
|
||||||
@ -156,7 +156,7 @@ test('Collection event Add Data Trigger, Math engine, determines that the trigge
|
|||||||
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
||||||
const conditionalRightConstant = faker.number.int();
|
const conditionalRightConstant = faker.number.int();
|
||||||
await page.keyboard.type(`==${conditionalRightConstant}`);
|
await page.keyboard.type(`==${conditionalRightConstant}`, { delay: 50 });
|
||||||
await expect(conditionNode.conditionExpressionEditBox).toHaveText(
|
await expect(conditionNode.conditionExpressionEditBox).toHaveText(
|
||||||
`Trigger variables / Trigger data / ${triggerNodeFieldDisplayName}==${conditionalRightConstant}`,
|
`Trigger variables / Trigger data / ${triggerNodeFieldDisplayName}==${conditionalRightConstant}`,
|
||||||
);
|
);
|
||||||
@ -238,7 +238,7 @@ test('Collection event Add Data Trigger, Math engine, determines that the trigge
|
|||||||
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
||||||
const conditionalRightConstant = faker.number.int();
|
const conditionalRightConstant = faker.number.int();
|
||||||
await page.keyboard.type(`!=${conditionalRightConstant}`);
|
await page.keyboard.type(`!=${conditionalRightConstant}`, { delay: 50 });
|
||||||
await expect(conditionNode.conditionExpressionEditBox).toHaveText(
|
await expect(conditionNode.conditionExpressionEditBox).toHaveText(
|
||||||
`Trigger variables / Trigger data / ${triggerNodeFieldDisplayName}!=${conditionalRightConstant}`,
|
`Trigger variables / Trigger data / ${triggerNodeFieldDisplayName}!=${conditionalRightConstant}`,
|
||||||
);
|
);
|
||||||
@ -320,7 +320,7 @@ test('Collection event add data trigger, Math engine, determines that the trigge
|
|||||||
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
await page.getByRole('menuitemcheckbox', { name: 'Trigger data' }).click();
|
||||||
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
await page.getByRole('menuitemcheckbox', { name: triggerNodeFieldDisplayName }).click();
|
||||||
const conditionalRightConstant = faker.number.int();
|
const conditionalRightConstant = faker.number.int();
|
||||||
await page.keyboard.type(`!=${conditionalRightConstant}`);
|
await page.keyboard.type(`!=${conditionalRightConstant}`, { delay: 50 });
|
||||||
await expect(conditionNode.conditionExpressionEditBox).toHaveText(
|
await expect(conditionNode.conditionExpressionEditBox).toHaveText(
|
||||||
`Trigger variables / Trigger data / ${triggerNodeFieldDisplayName}!=${conditionalRightConstant}`,
|
`Trigger variables / Trigger data / ${triggerNodeFieldDisplayName}!=${conditionalRightConstant}`,
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user