Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add Edit Test link to dropdown #826

Closed
wants to merge 1 commit into from
Closed
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 @@ -124,6 +124,10 @@ const EntityDetailsContent: React.FC<EntityDetailsContentProps> = ({
});
};

const onEditTest = () => {
onSettingsTabChange('test');
};
Comment on lines +127 to +129
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const onEditTest = () => {
onSettingsTabChange('test');
};
const onEditTest = useLastCallback(() => {
onSettingsTabChange('test');
});

or

Suggested change
const onEditTest = () => {
onSettingsTabChange('test');
};
const onEditTest = useCallback(() => {
onSettingsTabChange('test');
}, [onSettingsTabChange]);


const avatar = type
? {
avatar: {
Expand Down Expand Up @@ -154,7 +158,10 @@ const EntityDetailsContent: React.FC<EntityDetailsContentProps> = ({
/>,
<DotsDropdown
key="entity-options"
items={[{key: 1, label: <span onClick={onAbortAllExecutionsClick}>Abort all executions</span>}]}
items={[
{key: 1, label: <span onClick={onEditTest}>Edit Test</span>},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it meant to be displayed for both Tests and Test Suites?

{key: 2, label: <span onClick={onAbortAllExecutionsClick}>Abort all executions</span>},
]}
wrapperStyle={{backgroundColor: Colors.slate800}}
/>,
<Button key="run-now-button" type="primary" onClick={onRunButtonClick} hidden={!mayRun} loading={isLoading}>
Expand Down
Loading