github.com/covergates/covergates@v0.2.2-0.20201009050117-42ef8a19fb95/web/tests/e2e/globals.js (about)

     1  /// ////////////////////////////////////////////////////////////////////////////////
     2  // Refer to the entire list of global config settings here:
     3  // https://github.com/nightwatchjs/nightwatch/blob/master/lib/settings/defaults.js#L16
     4  //
     5  // More info on test globals:
     6  //   https://nightwatchjs.org/gettingstarted/configuration/#test-globals
     7  //
     8  /// ////////////////////////////////////////////////////////////////////////////////
     9  
    10  module.exports = {
    11    // this controls whether to abort the test execution when an assertion failed and skip the rest
    12    // it's being used in waitFor commands and expect assertions
    13    abortOnAssertionFailure: true,
    14  
    15    // this will overwrite the default polling interval (currently 500ms) for waitFor commands
    16    // and expect assertions that use retry
    17    waitForConditionPollInterval: 500,
    18  
    19    // default timeout value in milliseconds for waitFor commands and implicit waitFor value for
    20    // expect assertions
    21    waitForConditionTimeout: 5000,
    22  
    23    default: {
    24      /*
    25      The globals defined here are available everywhere in any test env
    26      */
    27  
    28      /*
    29      myGlobal: function() {
    30        return 'I\'m a method';
    31      }
    32      */
    33    },
    34  
    35    firefox: {
    36      /*
    37      The globals defined here are available only when the chrome testing env is being used
    38         i.e. when running with --env firefox
    39      */
    40      /*
    41       * myGlobal: function() {
    42       *   return 'Firefox specific global';
    43       * }
    44       */
    45    }
    46  
    47    /// //////////////////////////////////////////////////////////////
    48    // Global hooks
    49    // - simple functions which are executed as part of the test run
    50    // - take a callback argument which can be called when an async
    51    //    async operation is finished
    52    /// //////////////////////////////////////////////////////////////
    53    /**
    54     * executed before the test run has started, so before a session is created
    55     */
    56    /*
    57    before(cb) {
    58      //console.log('global before')
    59      cb();
    60    },
    61    */
    62  
    63    /**
    64     * executed before every test suite has started
    65     */
    66    /*
    67    beforeEach(browser, cb) {
    68      //console.log('global beforeEach')
    69      cb();
    70    },
    71    */
    72  
    73    /**
    74     * executed after every test suite has ended
    75     */
    76    /*
    77    afterEach(browser, cb) {
    78      browser.perform(function() {
    79        //console.log('global afterEach')
    80        cb();
    81      });
    82    },
    83    */
    84  
    85    /**
    86     * executed after the test run has finished
    87     */
    88    /*
    89    after(cb) {
    90      //console.log('global after')
    91      cb();
    92    },
    93    */
    94  
    95    /// //////////////////////////////////////////////////////////////
    96    // Global reporter
    97    //  - define your own custom reporter
    98    /// //////////////////////////////////////////////////////////////
    99    /*
   100    reporter(results, cb) {
   101      cb();
   102    }
   103     */
   104  };