Consolidate views_ui DisplayTest and DisplayCRUDTest display creation tests

Created on 19 January 2024, 11 months ago

Problem/Motivation

Both of these tests have a method testing views display creation, we should make sure we don't lose any coverage, and combine them.

Could also potentially merge these into the edit and/or deletion methods since you have to create a display in order to be able to edit or delete it.

Steps to reproduce

Proposed resolution

Merge request link

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Active

Version

11.0 πŸ”₯

Component
Views UIΒ  β†’

Last updated 21 days ago

Created by

πŸ‡¬πŸ‡§United Kingdom catch

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @catch
  • πŸ‡¬πŸ‡§United Kingdom catch
  • πŸ‡ΊπŸ‡¦Ukraine taraskorpach Lutsk πŸ‡ΊπŸ‡¦

    1. The testAddDisplay method in the DisplayTest class tests the creation of a block display, whereas the method in the DisplayCrudTest class tests the page block. It doesn't seem logical to test different displays simultaneously; hence, we could retain only DisplayCrudTest since its class name more aptly suits the test in my opinion.

    2. The DisplayCrudTest verifies whether the default block remains unchanged after adding a page block. Is it worthwhile to keep this test?

    Regarding the merging with another method: all the methods utilize the straightforward randomView() function, which creates a view with a predefined display. In contrast, we need to add a display using the "Add {display}" button. I haven't found an effective way to merge these functions, so I hope you can.

Production build 0.71.5 2024