Problem/Motivation
We would like to add more tests to the project to allow easier contribution as the project continues to evolve.
Proposed tests
Install and Uninstall tests
- Test that upon installation the proper fields and storage bundles are created
- Verify ableplayer_install() creates the ableplayer_fields() and ableplayer_remote_video_fields()
- Verify storage bundles are created via ableplayer_install()
- Verify every field created is deleted upon uninstall via ableplayer_uninstall()
- Test for swappable audio description videos if hosted on YouTube or Vimeo done in update_9001()
- Test that the audio description field is not at the bottom of the remote media creation screen. Done in update_9002()
- When a user visits /admin/structure/media/manage/video/display they see Able Player Video and if visiting admin/structure/media/manage/remote_video/display they see Able Player Remote Video within the format dropdown.
Local video creation and render tests
- Add a local video, create a new node and attach the video, test the output is using the Able Player video container.
- Upload a caption file at /media/add/able_player_caption. Create a local video at /media/add/video and attach the added caption file to the test video media entity. The output should show a div with the class="able-button-handler-captions buttonOn if the caption file loads properly.
- Extend this test to show results for the use of the Description, Chapters, Sign Language Video, and Poster fields.
Remote video creation and render tests
- Set Able Player Remote Video as the display format, add a remote video, create a new node, attach the remote video, and verify it is rendered with Able Player.
- Add a remote video, add an audio described video, create a new node, attach the remote video, and verify on the rendered page that the audio description button has the following aria-label="Turn off descriptions".
Completed tests
- Test that the theme hook returns the ableplayer key.
Issue fork ableplayer-3279090
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
themusician commentedProgress is being made on these tests. The dev branch now includes install and uninstall tests.