diff --git a/site/gatsby-site/cypress/e2e/integration/apps/checklistsForm.cy.js b/site/gatsby-site/cypress/e2e/integration/apps/checklistsForm.cy.js index 1798f5d6d3..137704ae17 100644 --- a/site/gatsby-site/cypress/e2e/integration/apps/checklistsForm.cy.js +++ b/site/gatsby-site/cypress/e2e/integration/apps/checklistsForm.cy.js @@ -132,4 +132,37 @@ describe('Checklists App Form', () => { cy.visit(url); }); }); + + it('Should remove a manually-created risk', () => { + withLogin(({ user }) => { + interceptFindChecklist({ + ...defaultChecklist, + owner_id: user.userId, + risks: [ + { + __typename: 'ChecklistRisk', + generated: false, + id: '5bb31fa6-2d32-4a01-b0a0-fa3fb4ec4b7d', + likelihood: '', + precedents: [], + risk_notes: '', + risk_status: 'Mitigated', + severity: '', + tags: ['GMF:Known AI Goal:Content Search'], + title: 'Manual Test Risk', + touched: false, + }, + ], + }); + interceptUpsertChecklist({ ...defaultChecklist, owner_id: user.userId }); + + cy.visit(url); + + cy.contains('Manual Test Risk').get('svg > title').contains('Delete Risk').parent().click(); + + cy.wait('@upsertChecklist'); + + cy.contains('Manual Test Risk').should('not.exist'); + }); + }); });