Add javascript test coverage

Created on 30 October 2021, almost 3 years ago
Updated 3 February 2024, 8 months ago

Problem/Motivation

Right now, we only have test coverage for the PHP side of things. Current tests ensure only that the module can get installed and configured. But there's no test coverage for the main functionality of the module yet: making sure a block can float.

Proposed resolution

I think this requires functional javascript tests, though the question is if we can manage to test this properly with the tools that are provided (Mink, Selenium). We would need to figure out how to instruct the application that is controlling the test browser the following things: scrolling; make the window smaller/wider; and check for the position of the floating element.

Remaining tasks

  • Figure out if with Mink we can do the following things:
    • Scrolling
    • Resize the browser window
    • Check for the position of an element relative to the browser window
    • Check for the position of an element relative to the document
  • Write tests:
    • Floating block basic test coverage
      Scroll down in the browser window and check if the floating block element appears at the top of the window and that the position relative to the document has changed.
    • Padding top
      Configure "padding_top" for a floating block, scroll down and ensure that the block appears at the expected position relative to the browser window.
    • Within container
      Put the floating block in a container, scroll down to a position below the container and ensure that the block then stops floating.
    • Using min width setting
      Configure a minimum width, resize the browser window, scroll down. Ensure that the block only floats at particular browser widths.

User interface changes

None.

API changes

None.

Data model changes

None.

πŸ“Œ Task
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡³πŸ‡±Netherlands megachriz

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024