From: 7PH Date: Thu, 23 Nov 2023 14:26:56 +0000 (+0100) Subject: SONAR-20467 Fix non-expanding execution flow on issue selection X-Git-Tag: 10.4.0.87286~428 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=719b1dd2fc35c2de851de901f3c18a67ed83a9c0;p=sonarqube.git SONAR-20467 Fix non-expanding execution flow on issue selection --- diff --git a/server/sonar-web/src/main/js/apps/issues/__tests__/IssueApp-it.tsx b/server/sonar-web/src/main/js/apps/issues/__tests__/IssueApp-it.tsx index c610490fa88..97499c1a444 100644 --- a/server/sonar-web/src/main/js/apps/issues/__tests__/IssueApp-it.tsx +++ b/server/sonar-web/src/main/js/apps/issues/__tests__/IssueApp-it.tsx @@ -84,7 +84,11 @@ describe('issue app', () => { it('should interact with flows and locations', async () => { const user = userEvent.setup(); - renderProjectIssuesApp('project/issues?issues=issue11&open=issue11&id=myproject'); + renderProjectIssuesApp('project/issues?id=myproject'); + + await act(async () => { + await user.click(await ui.issueItemAction2.find()); + }); expect(await screen.findByLabelText('list_of_issues')).toBeInTheDocument(); diff --git a/server/sonar-web/src/main/js/apps/issues/components/IssuesApp.tsx b/server/sonar-web/src/main/js/apps/issues/components/IssuesApp.tsx index 2a3f7907d4a..ca7c2ba0f48 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/IssuesApp.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/IssuesApp.tsx @@ -439,7 +439,7 @@ export class App extends React.PureComponent { selectIssue = (issueKey: string) => { this.setState({ selected: issueKey, - selectedFlowIndex: undefined, + selectedFlowIndex: 0, selectedLocationIndex: undefined, }); };