How to use the @wdio/allure-reporter.allureMocks.addAttachment function in @wdio/allure-reporter

To help you get started, we’ve selected a few @wdio/allure-reporter examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github presidenten / wdio-video-reporter / src / index.spec.js View on Github external
it('should add video attachment placeholder to Allure, if using Allure', () => {
      let video = new Video(options);
      video.onTestEnd({ title: 'TEST', state: 'failed' });
      expect(allureMocks.addAttachment).not.toHaveBeenCalled();

      allureMocks.addAttachment = jest.fn();
      options.saveAllVideos = true;
      video = new Video(options);
      video.onTestEnd({ title: 'TEST', state: 'passed' });
      expect(allureMocks.addAttachment).not.toHaveBeenCalled();

      allureMocks.addAttachment = jest.fn();
      video = new Video(options);
      video.config.usingAllure = true;
      video.onTestEnd({ title: 'TEST', state: 'failed' });
      expect(allureMocks.addAttachment).toHaveBeenCalled();

      allureMocks.addAttachment = jest.fn();
      video = new Video(options);
      video.config.usingAllure = true;
      video.onTestEnd({ title: 'TEST', state: 'failed' });
      expect(allureMocks.addAttachment).toHaveBeenCalled();
    });
github presidenten / wdio-video-reporter / src / frameworks / cucumber.spec.js View on Github external
beforeEach(() => {
      allureMocks.addAttachment = jest.fn();
      allureMocks.addArgument = jest.fn();
      helpers.default.generateVideo = jest.fn();

      options.saveAllVideos = false;
      configModule.default.saveAllVideos = false;
      configModule.default.usingAllure = false;
    });

@wdio/allure-reporter

A WebdriverIO reporter plugin to create Allure Test Reports

MIT
Latest version published 9 days ago

Package Health Score

98 / 100
Full package analysis