diff --git a/.publishrc b/.publishrc index fe0e22548c..be33ddaf32 100644 --- a/.publishrc +++ b/.publishrc @@ -8,7 +8,7 @@ "gitTag": true }, "confirm": false, - "publishTag": "latest", + "publishTag": "alpha", "prePublishScript": "gulp test-server", "postPublishScript": "gulp docker-publish" } diff --git a/package.json b/package.json index da46207e9f..58522c8123 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "testcafe", "description": "Automated browser testing for the modern web development stack.", "license": "MIT", - "version": "1.18.4", + "version": "1.18.5-alpha.1", "author": { "name": "Developer Express Inc.", "url": "https://www.devexpress.com/" diff --git a/src/screenshots/utils.js b/src/screenshots/utils.js index 5d3fd9f944..abe8d27c5e 100644 --- a/src/screenshots/utils.js +++ b/src/screenshots/utils.js @@ -17,7 +17,7 @@ const ALPHABET = '01'; export function generateScreenshotMark () { // NOTE: 32-bit id - const id = customAlphabet(ALPHABET, MARK_LENGTH); + const id = customAlphabet(ALPHABET, MARK_LENGTH)(); // NOTE: array of RGB values const markSeed = flatten(map(id, bit => bit === '0' ? [0, 0, 0, 255] : [255, 255, 255, 255])); diff --git a/test/server/util-test.js b/test/server/util-test.js index d5897ad246..9d75651be1 100644 --- a/test/server/util-test.js +++ b/test/server/util-test.js @@ -22,6 +22,7 @@ const { replaceLeadingSpacesWithNbsp } = require('../../lib/errors/test-run/util const createTempProfile = require('../../lib/browser/provider/built-in/dedicated/chrome/create-temp-profile'); const parseUserAgent = require('../../lib/utils/parse-user-agent'); const diff = require('../../lib/utils/diff'); +const { generateScreenshotMark } = require('../../lib/screenshots/utils'); const { buildChromeArgs, @@ -605,4 +606,13 @@ describe('Utils', () => { expect(preferences.profile.content_settings.exceptions.popups).to.be.undefined; }); }); + + it('generateScreenshotMark', () => { + const { markSeed } = generateScreenshotMark(); + + expect(markSeed.length).eql(128); + + for (const markPixel of markSeed) + expect(markPixel === 0 || markPixel === 255).is.true; + }); });