Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

Commit

Permalink
fix(visual-grid-client): updated ds to new script names
Browse files Browse the repository at this point in the history
  • Loading branch information
danielschwartz85 committed Sep 10, 2019
1 parent aa12ef1 commit dadd163
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion packages/visual-grid-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Example [Mocha](https://www.npmjs.com/package/mocha) test that uses the visual g
const path = require('path')
const fs = require('fs')
const {makeVisualGridClient} = require('@applitools/visual-grid-client')
const {getProcessPageAndSerializeScript} = require('@applitools/dom-snapshot')
const {getProcessPageAndSerialize} = require('@applitools/dom-snapshot')
const puppeteer = require('puppeteer')

describe('visual-grid-client test', function() {
Expand Down
6 changes: 3 additions & 3 deletions packages/visual-grid-client/example/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const puppeteer = require('puppeteer');
const {makeVisualGridClient} = require('../src/visual-grid-client');
const {getProcessPageAndSerializeScript} = require('@applitools/dom-snapshot');
const {getProcessPageAndSerialize} = require('@applitools/dom-snapshot');
const {delay: _delay} = require('@applitools/functional-commons');
const debug = require('debug')('eyes:render');

Expand Down Expand Up @@ -31,9 +31,9 @@ const debug = require('debug')('eyes:render');

debug('open done');

const browser = await puppeteer.launch({headless: true});
const browser = await puppeteer.launch({headless: false});
const page = await browser.newPage();
const processPageAndSerialize = `(${await getProcessPageAndSerializeScript()})()`;
const processPageAndSerialize = `(${await getProcessPageAndSerialize()})()`;

await page.setViewport({width: 1024, height: 768});
await page.goto(website);
Expand Down
6 changes: 3 additions & 3 deletions packages/visual-grid-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
"browser.js"
],
"dependencies": {
"@applitools/dom-snapshot": "2.2.1",
"@applitools/eyes-common": "^3.9.3",
"@applitools/eyes-sdk-core": "^5.16.1",
"@applitools/dom-snapshot": "^3.0.2",
"@applitools/eyes-common": "^3.9.1",
"@applitools/eyes-sdk-core": "^5.15.1",
"@applitools/functional-commons": "^1.5.2",
"@applitools/http-commons": "^1.3.9",
"@applitools/isomorphic-fetch": "^3.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/visual-grid-client/src/utils/takeDomSnapshot.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const {getProcessPageAndPollScript} = require('@applitools/dom-snapshot');
const {getProcessPageAndSerializePoll} = require('@applitools/dom-snapshot');
const {GeneralUtils} = require('@applitools/eyes-common');

const PULL_TIMEOUT = 200; // ms
Expand All @@ -9,7 +9,7 @@ const CAPTURE_DOM_TIMEOUT_MS = 5 * 60 * 1000; // 5 min
let captureScript;
async function getScript() {
if (!captureScript) {
const processPageAndPollScript = await getProcessPageAndPollScript();
const processPageAndPollScript = await getProcessPageAndSerializePoll();
captureScript = `${processPageAndPollScript} return __processPageAndPoll();`;
}

Expand Down
4 changes: 2 additions & 2 deletions packages/visual-grid-client/test/browser/browser.e2e.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const puppeteer = require('puppeteer');
const testServer = require('../util/testServer');
const fs = require('fs');
const path = require('path');
const {getProcessPageAndSerializeScript} = require('@applitools/dom-snapshot');
const {getProcessPageAndSerialize} = require('@applitools/dom-snapshot');

describe('browser visual grid', () => {
let baseUrl, closeServer;
Expand Down Expand Up @@ -41,7 +41,7 @@ describe('browser visual grid', () => {

it('passes with correct screenshot', async () => {
await page.goto(`${baseUrl}/test.html`);
const processPageAndSerializeScript = await getProcessPageAndSerializeScript();
const processPageAndSerializeScript = await getProcessPageAndSerialize();
await page.evaluate(browserVisualGrid);
const results = await page.evaluate(`const { openEyes } = makeRenderingGridClient({ apiKey: '${apiKey}' });
openEyes({
Expand Down
4 changes: 2 additions & 2 deletions packages/visual-grid-client/test/e2e/openEyes.e2e.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const makeRenderingGridClient = require('../../src/sdk/renderingGridClient');
const testServer = require('../util/testServer');
const {presult} = require('@applitools/functional-commons');
const {DiffsFoundError} = require('@applitools/eyes-sdk-core');
const {getProcessPageAndSerializeScript} = require('@applitools/dom-snapshot');
const {getProcessPageAndSerialize} = require('@applitools/dom-snapshot');
const fs = require('fs');
const {resolve} = require('path');

Expand Down Expand Up @@ -40,7 +40,7 @@ describe('openEyes', () => {

await page.setCookie({name: 'auth', value: 'secret', url: baseUrl});

const processPageAndSerializeScript = await getProcessPageAndSerializeScript();
const processPageAndSerializeScript = await getProcessPageAndSerialize();
processPageAndSerialize = () => page.evaluate(`(${processPageAndSerializeScript})()`);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const {describe, it, before, after} = require('mocha');
const {expect} = require('chai');
const puppeteer = require('puppeteer');
const takeScreenshot = require('../../src/sdk/takeScreenshot');
const {getProcessPageAndSerializeScript} = require('@applitools/dom-snapshot');
const {getProcessPageAndSerialize} = require('@applitools/dom-snapshot');
const fetch = require('node-fetch');
const {presult} = require('@applitools/functional-commons');
const testServer = require('../util/testServer');
Expand All @@ -31,7 +31,7 @@ describe('takeScreenshot e2e', () => {
r => r.json(),
);

const processPageAndSerialize = `(${await getProcessPageAndSerializeScript()})()`;
const processPageAndSerialize = `(${await getProcessPageAndSerialize()})()`;
await page.goto(website);
const {cdt, url, resourceUrls, blobs, frames} = await page.evaluate(processPageAndSerialize);
const [err, [{imageLocation, renderId}]] = await presult(
Expand Down

0 comments on commit dadd163

Please sign in to comment.