From 719b1dd2fc35c2de851de901f3c18a67ed83a9c0 Mon Sep 17 00:00:00 2001 From: 7PH Date: Thu, 23 Nov 2023 15:26:56 +0100 Subject: [PATCH] SONAR-20467 Fix non-expanding execution flow on issue selection --- .../src/main/js/apps/issues/__tests__/IssueApp-it.tsx | 6 +++++- .../src/main/js/apps/issues/components/IssuesApp.tsx | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) 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, }); }; -- 2.39.5