Skip to content

Commit

Permalink
Test that removing tag results in an api request (responsible-ai-coll…
Browse files Browse the repository at this point in the history
  • Loading branch information
lmcnulty authored Dec 19, 2023
1 parent f9850a2 commit 80ec03d
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions site/gatsby-site/cypress/e2e/integration/apps/checklistsForm.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,27 @@ describe('Checklists App Form', () => {
cy.wait(['@upsertChecklist']);
});
});

maybeIt('Should trigger GraphQL update on removing tag', () => {
withLogin(({ user }) => {
interceptFindChecklist({
...defaultChecklist,
owner_id: user.userId,
tags_goals: ['GMF:Known AI Goal:Code Generation'],
});
interceptUpsertChecklist({});

cy.visit(url);

cy.get('[option="GMF:Known AI Goal:Code Generation"] .close').click();

cy.wait(['@upsertChecklist']).then((xhr) => {
expect(xhr.request.body.variables.checklist).to.deep.nested.include({
tags_goals: [],
});
});

cy.visit(url);
});
});
});

0 comments on commit 80ec03d

Please sign in to comment.