We're planning changes to the internals of how flagging and unflagging happens: #2154251: Flag status incorrect when flagging another flag as a reaction to unflagging (Javascript). There's also clean-up to do.

Hence I think we need tests to make sure we're not breaking anything.

CommentFileSizeAuthor
#1 2193421.flag_.hook-invoke-test.patch7.59 KBjoachim

Comments

joachim’s picture

Status: Active » Needs review
StatusFileSize
new7.59 KB

Test will fail here, because it adds a test dependency in the patch and the testbot doesn't like that :(

But I can assure everyone that they pass locally! :)

joachim’s picture

The next step after this will be to have each hook and rule call the API functions and flag count functions and report on what it sees.

That can be a follow-up. Also, at the moment, it looks like those will have inaccurate data.

Status: Needs review » Needs work

The last submitted patch, 1: 2193421.flag_.hook-invoke-test.patch, failed testing.

joachim’s picture

Status: Needs work » Fixed

Committed, with a small tweak to the patch, explicitly adding rules as a dependency to the test module.

Follow-up: expand these tests to call Flag API functions and get flag counts within the hook implementations.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.