<commit_before>/* eslint new-cap: [2, {capIsNewExceptions: ["Given", "When", "Then"]}]*/

/**
 * Holds steps related to the events feature.
 * @module website/events
 */

import {Given, When, Then} from 'cypress-cucumber-preprocessor/steps';


/**
 * A step to navigate to the events page.
 * @example
 * Given I navigate to the events page
 */
const navigateToEventsPage = () => {
  cy.visit({url: 'website/event/2016', method: 'GET'});
};
Given(`I navigate to the events page`, navigateToEventsPage);

/**
 * A step to view a given event.
 * @param {string} event - the name of event to view
 * @example
 * When viewing the event "Mystery Bus"
 */
const viewGivenEvent = (event) => {<commit_msg>Use a constant for URL<commit_after>/* eslint new-cap: [2, {capIsNewExceptions: ["Given", "When", "Then"]}]*/

/**
 * Holds steps related to the events feature.
 * @module website/events
 */

import {Given, When, Then} from 'cypress-cucumber-preprocessor/steps';

/**
 * The URL for the events page.
 * @private
 */
const EVENTS_PAGE = 'website/event/';

/**
 * A step to navigate to the events page.
 * @example
 * Given I navigate to the events page
 */
const navigateToEventsPage = () => {
  // using 2016 since guaranteed about its events
  cy.visit({url: EVENTS_PAGE + 2016, method: 'GET'});
};
Given(`I navigate to the events page`, navigateToEventsPage);

/**
 * A step to view a given event.
 * @param {string} event - the name of event to view
 * @example
 * When viewing the event "Mystery Bus"
 */
const viewGivenEvent = (event) => {
{'fraction_non_alphanumeric': 0.14795587280986372, 'fraction_numerical': 0.009085009733939001, 'mean_word_length': 3.81875, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4551813', 'n_tokens_mistral': 502, 'n_tokens_neox': 477, 'n_words': 178}