-
Notifications
You must be signed in to change notification settings - Fork 95
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
1.18 ports10 #7285
1.18 ports10 #7285
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,13 +37,13 @@ const StyledHeaderActionRoot = styled("div")(({ theme }) => ({ | |
gap: theme.spacing(0.5), | ||
})); | ||
|
||
const StyledActivityItemHeader = styled("div")<{ isHighlighted: boolean; isRunning: boolean; isActiveFound: boolean }>( | ||
({ theme, isHighlighted, isRunning, isActiveFound }) => ({ | ||
const StyledActivityItemHeader = styled("div")<{ isHighlighted: boolean; isDeploymentActive: boolean; isActiveFound: boolean }>( | ||
({ theme, isHighlighted, isDeploymentActive, isActiveFound }) => ({ | ||
display: "flex", | ||
alignItems: "center", | ||
padding: theme.spacing(0.5, 0.5, 0.5, 0.75), | ||
borderRadius: theme.spacing(0.5), | ||
...getHeaderColors(theme, isHighlighted, isRunning, isActiveFound), | ||
...getHeaderColors(theme, isHighlighted, isDeploymentActive, isActiveFound), | ||
}), | ||
); | ||
|
||
|
@@ -167,7 +167,7 @@ const HeaderActivity = ({ | |
|
||
interface Props { | ||
activity: ItemActivity; | ||
isRunning: boolean; | ||
isDeploymentActive: boolean; | ||
isActiveFound: boolean; | ||
isFound: boolean; | ||
searchQuery: string; | ||
|
@@ -230,7 +230,7 @@ const WithOpenVersion = ({ | |
); | ||
}; | ||
|
||
const ActivityItemHeader = ({ activity, isRunning, isFound, isActiveFound, searchQuery }: Props) => { | ||
const ActivityItemHeader = ({ activity, isDeploymentActive, isFound, isActiveFound, searchQuery }: Props) => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Based on the search results, I can see that there are no existing test files for the ActivityItemHeader component and its deployment status logic. The code shows that Add tests for ActivityItemHeader's deployment status logic Please create a new test file
🔗 Analysis chainAdd tests for the new deployment status logic. Since this change modifies how deployment status is determined, please ensure there are tests covering:
This aligns with the PR objective requiring automated test coverage for changes. Let's check for existing test coverage: Also applies to: 282-282 Let me search for existing test files specifically related to ActivityItemHeader and deployment status. Let me search for any existing test files in the activities directory to see if there's test coverage for related components. 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Search for test files related to ActivityItemHeader
fd -e test.tsx -e spec.tsx ActivityItemHeader
# Search for existing test cases related to deployment status
rg -i "test|describe|it.*deployment.*active|running" --type ts
Length of output: 67564 Script: #!/bin/bash
# Search for test files related to ActivityItemHeader and deployment status
fd -e test.tsx -e spec.tsx ActivityItemHeader
# Search for test cases related to deployment status in ActivityItemHeader
rg -A 5 "isDeploymentActive|deployment.*status" --type ts designer/client/src/components/toolbars/activities
Length of output: 9826 Script: #!/bin/bash
# Search for test files in the activities directory
fd -e test.tsx -e spec.tsx . designer/client/src/components/toolbars/activities/
# Check for any test coverage of deployment status in existing test files
rg -A 5 "test.*deployment|describe.*deployment" designer/client/test
Length of output: 153 |
||
const scenario = useSelector(getScenario); | ||
const { processVersionId } = scenario || {}; | ||
|
||
|
@@ -279,7 +279,7 @@ const ActivityItemHeader = ({ activity, isRunning, isFound, isActiveFound, searc | |
]); | ||
|
||
return ( | ||
<StyledActivityItemHeader isHighlighted={isHighlighted} isRunning={isRunning} isActiveFound={isActiveFound}> | ||
<StyledActivityItemHeader isHighlighted={isHighlighted} isDeploymentActive={isDeploymentActive} isActiveFound={isActiveFound}> | ||
<StyledHeaderIcon src={activity.activities.icon} id={activity.uiGeneratedId} /> | ||
{getHeaderTitle} | ||
<StyledHeaderActionRoot> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Extract status constants to a shared location
Consider moving the status array to a constants file to avoid magic strings and enable reuse: