var renderPng = require('../../app/render_png');
describe('renderPng', function () {
  describe('getScreenshotPath', function () {

    it('creates the URL for the screenshot service call', function () {
      renderPng.screenshotServiceUrl = 'http://screenshotservice';
      renderPng.screenshotTargetUrl = 'http://spotlight';
      var url = '/test/path.png';
      var screenshotPath = renderPng.getScreenshotPath(url);
      expect(screenshotPath).toEqual('http://screenshotservice?readyExpression=!!document.querySelector(".loaded")&forwardCacheHeaders=true&clipSelector=.visualisation&url=http://spotlight/test/path?raw');
    });
  });
});

var renderPng = require('../../app/render_png');
describe('renderPng', function () {
  describe('getScreenshotPath', function () {

    it('creates the URL for the screenshot service call', function () {
      renderPng.screenshotServiceUrl = 'http://screenshotservice';
      renderPng.screenshotTargetUrl = 'http://spotlight';
      var url = '/test/path.png';
      var screenshotPath = renderPng.getScreenshotPath({
        url: url,
        query: {}
      });
      expect(screenshotPath).toEqual('http://screenshotservice?readyExpression=!!document.querySelector(".loaded")&forwardCacheHeaders=true&clipSelector=.visualisation-inner figure&url=http://spotlight/test/path');
    });
  });
});

Fix qs params in screenshot url tests