Skip to content

End to end testing of display of events using Selenium  #6017

@roslynwythe

Description

@roslynwythe

Overview

We need to explore the use of automated browser testing tools for ensuring end to end functionality of the website in order to verify the display of meetings on Project pages.

Details

In this issue, a test will be developed in JavaScript using Selenium browser automation and the Mocha testing frameworks.

Action Items

  • Read Getting "Started with Selenium"1 and "Mocha (Getting Started)"2
  • If not already installed, install node.js and npm https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
  • In the test folder, create a folder e2e, then from test/e2e, run npm init -y to create a new package
  • Install Selenium and configure dependencies as described in Install a Selenium Library1
  • Install Mocha as described in Mocha Installation2
  • Run docker-compose up to start the jekyll server.
  • In test/e2e, create a JavaScript file meetings-on-project-pages.js, using Selenium WebDriver and Mocha to load each project page and verify display of meeting information. See Selenium example3
    • The list of project page URLs to test should be generated dynamically from the jekyll _projects collection using liquid. For sample code see the function retrieveProjectDataFromCollection() in assets\js\current-projects.js
    • During test, the website will be served from http://localhost:4000 so create urls appropriately
  • Run the script using Mocha. Optionally, define an npm script alias
    • Verify that the script reports a passing test on pages in which meetings are displayed, and a failing test on pages in which meetings are not displayed
  • Add/Commit all 3 files in test/e2e: meetings-on-project-pages.js, package.json and package-lock.json
  • Proceed with creating a pull request. In the pull request, provide instructions for reviewers to install and run the tests

Footnotes

  1. https://www.selenium.dev/documentation/webdriver/getting_started/install_library/ 2

  2. https://mochajs.org/#installation 2

  3. Organizing and Executing Selenium Code - Test Runner Examples: JavaScript

Metadata

Metadata

Assignees

No one assigned

    Labels

    Complexity: LargeDraftIssue is still in the process of being createdFeature: InfrastructureFor changes on site technical architectureP-Feature: Project Info and PageA project's detail page (e.g. https://www.hackforla.org/projects/100-automations)role: back end/devOpsTasks for back-end developerssize: 2ptCan be done in 7-12 hours

    Type

    No type

    Projects

    Status

    New Issue Approval

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions