Skip to content
Merged
Show file tree
Hide file tree
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
@@ -0,0 +1,4 @@
{
"type": "Bug Fix",
"description": "/transform: allow View Summary button to work even after accepting diff"
}
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,10 @@ export class ProposedTransformationExplorer {
}

diffModel.clearChanges()
transformByQState.setSummaryFilePath('')
// update summary path to where it is locally after user accepts changes, so that View Summary button works
transformByQState.setSummaryFilePath(
Copy link
Contributor

Choose a reason for hiding this comment

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

can we write a test to verify this functionality works? Or update an e2e test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We already have this covered here:

transformByQState.setSummaryFilePath(path.join(tmpDir, 'summary.md'))
transformByQState
.getChatMessenger()
?.sendJobFinishedMessage(tab.tabID, CodeWhispererConstants.viewProposedChangesChatMessage)
tab.clickCustomFormButton({
id: 'gumbyViewSummary',
text: 'View summary',
})
await tab.waitForEvent(() => tab.getChatItems().length > 14, {
waitTimeoutInMs: 5000,
waitIntervalInMs: 1000,
})
const viewSummaryChatItem = tab.getChatItems().pop()
assert.strictEqual(viewSummaryChatItem?.body?.includes('view a summary'), true)

path.join(transformByQState.getProjectPath(), ExportResultArchiveStructure.PathToSummary)
)
transformByQState.setProjectCopyFilePath('')
transformByQState.setResultArchiveFilePath('')
transformDataProvider.refresh()
Expand Down
Loading