Laura10101 / contractor-tax-calculator

0 stars 2 forks source link

Deletion success view fails to correctly resequence ordinals after deletion #207

Closed Laura10101 closed 10 months ago

Laura10101 commented 10 months ago

● Question views › Deleting questions › Successful deletion › should show a success message, resequence ordinals, clear the app state, and refresh the questions display Expected: 3 Received: 2 770 | function checkOrdinalUpdate(question, success, failure) { 771 | console.log("Expected ordinal=" + nextOrdinal + ", actual=" + question.ordinal);

772 | expect(question.ordinal).toBe(nextOrdinal); | ^

Laura10101 commented 10 months ago

The deleted question was being updated after deletion, causing an additional question to be included in the resequence. Added a check to exclude the deleted question.