Page MenuHomePhabricator

Unit Test: Add tests that ensures cancel/publish buttons are hidden and shown in proper modes
Closed, ResolvedPublic

Description

In general when we have a bug that can we addressed by unit tests, we should write tests soon after encountering the bug. This prevents similar issues from requiring manual QA to be revealed.

To keep an issue T219426 from occurring again here are tests we should attempt write:

Acceptance Criteria:

  • In captions read mode, cancel/publish buttons are hidden
  • In captions edit mode, cancel button is visible
  • In captions edit mode, publish button is visible
  • In captions edit mode, clicking cancel button with no edits in progress hides cancel/publish buttons
  • In depicts read mode, cancel/publish buttons are hidden
  • In depicts edit mode, cancel button is visible
  • In depicts edit mode, publish button is visible
  • In depicts edit mode, clicking cancel button with no edits in progress hides cancel/publish buttons

Event Timeline

Ha78na created this task.Mar 28 2019, 1:37 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 28 2019, 1:37 PM
Ramsey-WMF triaged this task as Normal priority.Mar 28 2019, 2:31 PM
Ramsey-WMF moved this task from Untriaged to Triaged on the Multimedia board.
Ha78na claimed this task.Apr 11 2019, 1:53 PM
Ha78na moved this task from To Do to Doing on the Structured-Data-Team-Current-Work board.
Ha78na updated the task description. (Show Details)Apr 11 2019, 7:27 PM
Ha78na updated the task description. (Show Details)May 2 2019, 7:49 PM
Ha78na added a comment.May 2 2019, 7:53 PM

The depicts work was covered in https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/WikibaseMediaInfo/+/504225/ the captions work is not complete.

I wasn't able to get the tests passing and failing properly by stubbing out method calls inside makeEditable in the captions panel tests.

Ramsey-WMF reassigned this task from Ha78na to Cparle.May 10 2019, 5:06 PM
Ramsey-WMF moved this task from To Do to Doing on the Structured Data Engineering board.
Cparle removed Cparle as the assignee of this task.May 31 2019, 8:44 AM
Cparle moved this task from Doing to To Do on the Structured-Data-Team-Current-Work board.
Cparle claimed this task.Jun 17 2019, 10:59 AM

Change 517614 had a related patch set uploaded (by Cparle; owner: Cparle):
[mediawiki/extensions/WikibaseMediaInfo@master] Work in progress

https://gerrit.wikimedia.org/r/517614

Change 517614 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Unit tests for CaptionPanel.js

https://gerrit.wikimedia.org/r/517614

Ramsey-WMF closed this task as Resolved.Aug 8 2019, 5:51 PM