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: skip running tests locally when user chooses to do so"
}
1 change: 1 addition & 0 deletions packages/amazonq/test/e2e/amazonq/transformByQ.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ describe('Amazon Q Code Transformation', function () {
const tmpDir = (await TestFolder.create()).path

transformByQState.setSummaryFilePath(path.join(tmpDir, 'summary.md'))
transformByQState.setToPartiallySucceeded()

transformByQState
.getChatMessenger()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,14 @@ export class Messenger {
title: CodeWhispererConstants.skipUnitTestsFormTitle,
mandatory: true,
options: [
{
value: CodeWhispererConstants.runUnitTestsMessage,
label: CodeWhispererConstants.runUnitTestsMessage,
},
{
value: CodeWhispererConstants.skipUnitTestsMessage,
label: CodeWhispererConstants.skipUnitTestsMessage,
},
{
value: CodeWhispererConstants.runUnitTestsMessage,
label: CodeWhispererConstants.runUnitTestsMessage,
},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just switch the order so that "skip tests" is default option in the form item dropdown.

],
})

Expand Down Expand Up @@ -533,7 +533,7 @@ export class Messenger {
})
}

if (transformByQState.getSummaryFilePath()) {
if (transformByQState.isPartiallySucceeded() || transformByQState.isSucceeded()) {
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 should be checking if job is completed (or partially completed) to show the summary button since the summary file path could be left over from the last job; updated relevant E2E test above too.

buttons.push({
keepCardAfterClick: true,
text: CodeWhispererConstants.viewSummaryButtonText,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ function installProjectDependencies(dependenciesFolder: FolderInfo, modulePath:

// Note: IntelliJ runs 'clean' separately from 'install'. Evaluate benefits (if any) of this.
const args = [`-Dmaven.repo.local=${dependenciesFolder.path}`, 'clean', 'install', '-q']

if (transformByQState.getCustomBuildCommand() === CodeWhispererConstants.skipUnitTestsBuildCommand) {
args.push('-DskipTests')
}

let environment = process.env

if (transformByQState.getJavaHome() !== undefined) {
Expand Down
Loading