How to use the @wdio/allure-reporter.allureMocks.addArgument 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 / frameworks / cucumber.spec.js View on Github external
it('should add deviceType as argument to allure', () => {
        global.browser.capabilities.deviceType = 'myDevice';

        configModule.default.usingAllure = false;
        allureMocks.addArgument = jest.fn();
        let video = new Video(options);
        video.testname = undefined;
        video.onSuiteEnd(passedScenario);
        expect(allureMocks.addArgument).not.toHaveBeenCalled();

        configModule.default.usingAllure = true;
        allureMocks.addArgument = jest.fn();
        video = new Video(options);
        video.testname = undefined;
        video.onSuiteEnd(passedScenario);
        expect(allureMocks.addArgument).toHaveBeenCalledWith('deviceType', 'myDevice');
      });
github presidenten / wdio-video-reporter / src / index.spec.js View on Github external
it('should add browserVersion as argument to allure', () => {
      global.browser.capabilities.browserVersion = '1.2.3';

      configModule.default.usingAllure = false;
      allureMocks.addArgument = jest.fn();
      let video = new Video(options);
      video.testname = undefined;
      video.onTestEnd({ title: 'TEST', state: 'passed' });
      expect(allureMocks.addArgument).not.toHaveBeenCalled();

      configModule.default.usingAllure = true;
      allureMocks.addArgument = jest.fn();
      video = new Video(options);
      video.testname = undefined;
      video.onTestEnd({ title: 'TEST', state: 'passed' });
      expect(allureMocks.addArgument).toHaveBeenCalledWith('browserVersion', '1.2.3');
    });

@wdio/allure-reporter

A WebdriverIO reporter plugin to create Allure Test Reports

MIT
Latest version published 7 days ago

Package Health Score

98 / 100
Full package analysis