How to use the superdesk-core/spec/helpers/utils.screenshot function in superdesk-core

To help you get started, we’ve selected a few superdesk-core 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 superdesk / superdesk-planning / protractor.conf.js View on Github external
onPrepare: function() {
        require('./client/spec/helpers/setup')({fixture_profile: 'planning_prepopulate_data'});

        // so it can be used without import in tests
        // useful when debugging on CI server
        browser.screenshot = require('superdesk-core/spec/helpers/utils').screenshot;

        var reporters = require('jasmine-reporters');

        jasmine.getEnv().addReporter(
            new reporters.JUnitXmlReporter({
                savePath: 'e2e-test-results',
                consolidateAll: true,
            })
        );
        function CustomReporter() {
            this.specDone = function(result) {
                if (result.failedExpectations.length > 0) {
                    browser.screenshot(result.fullName.replace(/[^\w]+/g, '-'));
                }
            };
        }

superdesk-core

![CI](https://github.com/superdesk/superdesk-client-core/workflows/CI/badge.svg) [![Code Climate](https://codeclimate.com/github/superdesk/superdesk-client-core/badges/gpa.svg)](https://codeclimate.com/github/superdesk/superdesk-client-core)

AGPL-3.0
Latest version published 3 years ago

Package Health Score

55 / 100
Full package analysis

Similar packages