Skip to content

Commit cf61057

Browse files
avi-alpertkaranA-aws
authored andcommitted
test(amazonq): "edit README" E2E test case for /doc aws#6317
Add E2E test case for /doc: Making a specific change to the README
1 parent 507b089 commit cf61057

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

packages/amazonq/test/e2e/amazonq/doc.test.ts

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,43 @@ describe('Amazon Q Doc', async function () {
108108
FollowUpTypes.MakeChanges,
109109
FollowUpTypes.RejectChanges,
110110
])
111+
112+
tab.clickButton(FollowUpTypes.AcceptChanges)
113+
114+
await tab.waitForButtons([FollowUpTypes.NewTask, FollowUpTypes.CloseSession])
115+
})
116+
})
117+
118+
describe('Edits a README', () => {
119+
beforeEach(async function () {
120+
tab.addChatMessage({ command: '/doc' })
121+
await tab.waitForChatFinishesLoading()
122+
})
123+
124+
it('Make specific change in README', async () => {
125+
await tab.waitForButtons([FollowUpTypes.UpdateDocumentation])
126+
127+
tab.clickButton(FollowUpTypes.UpdateDocumentation)
128+
129+
await tab.waitForButtons([FollowUpTypes.SynchronizeDocumentation, FollowUpTypes.EditDocumentation])
130+
131+
tab.clickButton(FollowUpTypes.EditDocumentation)
132+
133+
await tab.waitForButtons([FollowUpTypes.ProceedFolderSelection])
134+
135+
tab.clickButton(FollowUpTypes.ProceedFolderSelection)
136+
137+
tab.addChatMessage({ prompt: 'remove the repository structure section' })
138+
139+
await tab.waitForText(
140+
`${i18n('AWS.amazonq.doc.answer.readmeUpdated')} ${i18n('AWS.amazonq.doc.answer.codeResult')}`
141+
)
142+
143+
await tab.waitForButtons([
144+
FollowUpTypes.AcceptChanges,
145+
FollowUpTypes.MakeChanges,
146+
FollowUpTypes.RejectChanges,
147+
])
111148
})
112149
})
113150
})

0 commit comments

Comments
 (0)