superdesk/superdesk-client-core

View on GitHub
e2e/client/specs/helpers/fixtures.ts

Summary

Maintainability
A
0 mins
Test Coverage
import {browser} from 'protractor';
import {backendRequest, backendRequestAuth} from './backend';

export function resetApp(profile, callback) {
    backendRequest({
        uri: '/restore_record',
        method: 'POST',
        timeout: 30000,
        json: {name: 'legacy'},
    }, (e, r, j) => {
        browser.params.token = null;
        callback(e, r, j);
    }, 1);
}

export function post(params, callback) {
    params.method = 'POST';
    backendRequestAuth(params, callback);
}