Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. import {
  2. startRecording,
  3. useRecordedFixtures
  4. } from './utils';
  5.  
  6. /**
  7. * Based on environment variable, record or set up recorded fixtures for use
  8. */
  9. const recorder = () => {
  10. const shouldRecord = Boolean(Cypress.env(record_env_var));
  11.  
  12. if (shouldRecord) {
  13. // TODO: this is a leftover, remove need for required authenticate func not seen in this gist
  14. startRecording(authenticate);
  15. } else {
  16. useRecordedFixtures(setupLocalStorageAuthValues);
  17. }
  18. };
  19.  
  20. Cypress.Commands.add('recorder', recorder);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement