As an editor, I want to remove a form
**Acceptance criteria:**
* A form can be removed via the UI
**Wireframes**
Wireframes for individuals features referencing the style guide components
UX - to prepare a style guide components for Wikidata
[[https://drive.google.com/file/d/11CYtkbS5YGlt4_edXY5yp9vTeuFDcmNz/view|Click Here]] for Wireframe
**Happy Path:**
Given I am on the Lexeme page
And I have permissions to edit Lexeme
And a Form for the Lexeme exists
When I click on the Form’s edit button
And I see a delete button in the edit form block
Then I click delete
And I see //Removing...// message
And the form is deleted
And the removal shows up in the edit history with the summary
And the summary says // Removed form: Leitern (Dativ, Plural) //
**Error Flows:**
Given I am on a Lexeme page
And I have permissions to edit Lexeme
And a Form for the Lexeme exists
When I click on the Form’s edit button
And I see a delete button in the edit form block
And I click delete
And I see //Removing...// message
And an error from error list 1 occurred
Then The Removing... message is hidden
And I see the Form is still there
And I see the Error Message bubble next to the save button
And the Error Message says ERROR MESSAGE FOR EACH ERROR
And the Delete button is still shown and can be clicked
Error List 1:
| Error Type | Error message |
| Error Message | !!TODO!! |
| Edit Conflict | !!TODO!! |
| Rate Limit | !!TODO!! |
| Read Only | !!TODO!! |
| Token failure/Session Failure | !!TODO!! |
| Abuse filter failure | !!TODO!! |
| Unexpected exceptions | !!TODO!! |
| Permissions | !!TODO!! |
| Protected | !!TODO!! |
|
Given I am on a Lexeme page
When I don’t have permissions to edit Lexeme
And a Form for the Lexeme exists
Then I don't see Form's edit button
Given I am on a Lexeme page
When The Lexeme is protected
And a Form for the Lexeme exists
Then I don't see Form's edit button
Tasks (remove after tasks created)
- Create "remove form" API action
action: wblremoveform
formId: L1-F2
- Ensure wbeditentity allows removing a form and uses the same business logic.
- Add remove button to UI which performs removal (makes API call and updates the UI after the change)
- Rename wblexemeaddform and wblexemeeditformelements to wbl-prefixed
- Set up the "Hello World" JS browser test (possibly not a subtask of story ticket)