From 67588d7cc6a5897c8f3f22def28a0268c889150d Mon Sep 17 00:00:00 2001 From: Andrey Belym Date: Thu, 18 Aug 2016 19:53:11 +0300 Subject: [PATCH] Rename package to testcafe-browser-tools (closes #95) (#96) * Rename package to testcafe-browser-tools (closes #95) * Use major version number * Refactor native modules * Fix stash error --- README.md | 10 +++--- bin/win/close.exe | Bin 5632 -> 5632 bytes bin/win/find-window.exe | Bin 6656 -> 6656 bytes bin/win/generate-thumbnail.exe | Bin 231936 -> 231936 bytes bin/win/get-window-size.exe | Bin 5632 -> 5632 bytes bin/win/maximize.exe | Bin 5632 -> 5632 bytes bin/win/resize.exe | Bin 6144 -> 6144 bytes bin/win/screenshot.exe | Bin 11264 -> 11264 bytes bin/win/utils.dll | Bin 9216 -> 9216 bytes package.json | 12 +++---- src/natives/close/win/Close.cs | 6 ++-- src/natives/close/win/close.csproj | 6 ++-- src/natives/find-window/win/FindWindow.cs | 4 +-- .../find-window/win/find-window.csproj | 6 ++-- .../any/generate-thumbnail.vcxproj | 4 +-- .../get-window-size/win/GetWindowSize.cs | 2 +- .../win/get-window-size.csproj | 4 +-- src/natives/maximize/win/Maximize.cs | 2 +- src/natives/maximize/win/maximize.csproj | 4 +-- src/natives/resize/win/Resize.cs | 4 +-- src/natives/resize/win/resize.csproj | 4 +-- src/natives/screenshot/win/Screenshot.cs | 2 +- src/natives/screenshot/win/screenshot.csproj | 4 +-- src/natives/utils/win/Utils.cs | 3 +- src/natives/utils/win/utils.csproj | 6 ++-- test/playground/routes.js | 30 +++++++++--------- test/tests/open-test.js | 10 +++--- 27 files changed, 61 insertions(+), 62 deletions(-) diff --git a/README.md b/README.md index 3f958a3..76d1a2a 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -# testcafe-browser-natives +# testcafe-browser-tools -[![Build Status](https://travis-ci.org/DevExpress/testcafe-browser-natives.svg)](https://travis-ci.org/DevExpress/testcafe-browser-natives) +[![Build Status](https://travis-ci.org/DevExpress/testcafe-browser-tools.svg)](https://travis-ci.org/DevExpress/testcafe-browser-tools) -TestСafe Browser Natives is a TestCafe library for performing platform-dependent actions on browser windows. -Working with browsers is specific for each operating system and requires native code to deal with. Since TestCafe supports painless and simple installation, this package encapsulates pre-built binaries for all supported platforms and JS-wrappers around them. This helps end-users avoid running *post-npm-install* build actions. +TestСafe Browser Tools is an utility library for performing platform-dependent actions on browser windows. +Working with browsers is specific for each operating system and requires native code to deal with. In order to provide painless and simple installation, this package encapsulates pre-built binaries for all supported platforms and JS-wrappers around them. This helps end-users avoid running *post-npm-install* build actions.   #Build Process To build native binaries from source files, execute the gulp task corresponding to your operating system: @@ -19,7 +19,7 @@ The *bin* directory contains pre-built native binaries. Consider using them if y #Install ``` -$ npm install testcafe-browser-natives +$ npm install testcafe-browser-tools ``` #API Reference diff --git a/bin/win/close.exe b/bin/win/close.exe index 19cd36cf2462cc87777d4ba4df87850c7d590134..0f4f88ef12980d41c3675e16842c3f7d304f36e9 100644 GIT binary patch delta 682 zcmX|vjM3mDqC|I00G*fO*qTv_ww(NP{m zn92hx@H;cuNUzLx2C)whTVdktdNhU(I`xR7YFhz4pq5bfIif_7s1S6)!1e#SzzsB` z02^DF38u~5!%UXhq?kj@W6V5p7f!Q3&YWUiBksj5Vv%DBt=99HBY9^<=A;TeRo zsiQ6GAl@LZj$jVmDvJ>3hp5C2baw=KqK=zKcfXaEP{`10jLP5tOix%}PpGlRzksYj zufAt)H%5xZ$=Z?`Rr+J&j;6G6b=!xZYlmk_CtC-mat~{pLKlQXGsd$;SD>B7XO?Da rmfC&XOM9 delta 681 zcmX|VppZ)q6{QzFc<>+!20Z9Nq&K05-c$tNzE%hJ_de#$?0aus!)Z7Vnrh|j z{nqWp$V(gWKx+zkYP1qN!m~h_?8X={q!ZH71+g0L^#Ovs3NW<@9nd*>XW}qfNpIm& zr8;++_TZTGkxb@2oFP5x>&Nn$G|72wsdIG~DVTVSChI3PDPb z>P0J_!FH-L7x(QJ@`%B}{FYV32%UPu){Vh3MnNs1=<`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}inh%u);!D9Lu$4-4VEWIIGG)4kT*bW;Ke3*g->UO{kYBqBkri)HF(vgj$c;d2!PW%4l~p zB&&*bH7VYr3aP{_QpA5|61&Y<9}HH5@=n5W%I^rMtn!K`N1FKo`$zDw1qfeg2IKHx2mSM7>E>KIlx=eJdFy5m^4dF8msq0KXzN1^+B)^aS zu<~OCx5!DxjPXYImp+h>C4@wTCRQ#iFlc5fWKQefxI*6$ed_BWP-*zB85_sQ|G!dW z3|LEapT8&2do(^_J*|uqTbFa;OV|0%+5WxHhK{uV&fn#ZKetVYe7co<4>j7wMX!v} z{fpUw`i9De{<|afdS1BdYJJCO_uza*eAu2O(mv4DU5j7Fm}85!R1o!K#^)U_EpFfN N)1o diff --git a/bin/win/generate-thumbnail.exe b/bin/win/generate-thumbnail.exe index 9a730085db302a7f265139e378371174d8668b32..e71bf66669b2c7b1e1ecbffce878c3db717f314a 100644 GIT binary patch delta 88 zcmZpe!q+f`Z^8@a;H_I5U$?$y-1?enm jG8NW~cByjiG371vShB+6O11sPCyYQ@m+h9S%*RszQBWNv delta 88 zcmZpe!q+f`Z^8>^wbc_EU$?$y-1?enm kG8NW~KK#4#xG8^=^RDBHr3YS~v}6Rzrfj!VWj>w)07Onm0gQc-DBTsL1~h|*G#mgX*a*!B5P@v>erG1C5cP!T;u z6kXcJLqbR%`XdD;n}^biN68>pJLFM3*g>j8AVkn_egqB7XMXdW_vZcHdo$%uxexED z&c(&-gOS6#F~9@0CSc#nMvgccz@hou8lX%^q^ovTb#PRZqyDFsw| zw{H$y@4rQBaBb=|R{9>gDGr;s%}=(_cvZ($?_?4eVPgy#@)M=o}ilmiuXyDt#ze8y^2SnBTKLCm#Ko z-F@2sGzwGhzZwRri)#O%Ai`DXoUXZU-1;$?0pbWn(} M-YaOxRXE$hzpK)GF8}}l delta 632 zcmYMyUr19?90&04Imdf#bBx6nxLDD0;cnfDCDBHSjYdmKE2j+m11U(3BGgQXg83wh zNR3005rI$DixD@3NQ3Ape8@0CSVTxKQ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3!l9!M@vhAf-vblr&SATj1aX+(fdu&Lq2T9EqCeR g?b;i^+8<57@Bh(?#Zt!b2{GejtM`=VtB?8q0!=)S6#xJL diff --git a/bin/win/resize.exe b/bin/win/resize.exe index 09471ff17386fa8ae7b36529178776e2103218d6..3f6d61fb5d15a2d055b718226105f44c1d475002 100644 GIT binary patch delta 976 zcmY+DUr1AN6vw~6`@6f-xyeij!&NRHLR_)L{uq%)D-nBe%_T-sMxg88%pxkw%^0Q_ z(!3A~dr(5c&_ISzJrvbTWyAs%Du{YCDHRGTeCYg+lj?B!-0wN}oOAE*{O&L6je2i& z$>799yl1WW79Xk09`pd!AgchHEpd0Q{TN^;zquH2nQqNv){BkWce{CAw2PD}v|PK- z1_(+q=rR`_-eirYi%qpUP#Cz-8amr_o*tql1EA(83sVWSBXvJ<}>NtEn%|lRq^B zJD3ep3L83hOBZaoK{PNZOGuBheoorJw49U%7FY{iMb;2)DAHAaxn5$9>FXmE6!Ax^ zv5I(@8Dd@~DvKgs(1Ri#*Rt1-QqVNg&xTNjOw<%8KaNq9)9jC=y~psufkfJyq-}D- z2y=@Dh)tjrfH47N2Ac@9;%7;4_wFH)dg7r}t8ULpQMqH|by8PKavVPh(A) zO~$oAi-eHqp>;x7(9d@(y;wkxs@4B%hoqX{UlX)yW&dZjncJ-%y*3;^oeWtw>*hdK zv9s%*XcXc7Rl_^4WcE!>gpyNP3E`oWR;TLe7lezN#OP4P9KgYVFYw^#Oy}#~seO0u zUpx_-dt*%|92vs#LLHg3eKg0j^R<*G`98Z;m=(gA%y#~^XbZcNIjiSI+-v;D6vn?hcXn1+cXKl;bgf+sB3x?&!7Tb?DQ2O#E{mE<8pJATp-B{>yH z)QN#;Z-!Wjj#oIwyg&uW4gn38s3$eK4oD`yDGPAv9>uFyiS3GN*RO~UF|P|HHTkFw z5R{_Pqc7QgMwz0D>`E2L479a2o(-L+O|&HdR2-SX0B(^^F?CU}xPaD&dZ#=W-iI8j zu}xTnhFoT|2#_8UUBm~>8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ryFx5zCF)pLQZ}}*1-~uY zL$1Ws+r@sBR=k@T1 zX)Ssoe_S6{y&C_sc-jj7m{w#04UHQb_w}Ayll$91?V%^|!wVG?C&Le9+C+g+Qn+a diff --git a/package.json b/package.json index efc734f..57c25ef 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,14 @@ { - "name": "testcafe-browser-natives", - "version": "0.16.1", - "description": "A library used by TestCafe for performing platform-dependent actions on browsers.", - "homepage": "https://github.com/DevExpress/testcafe-browser-natives", - "bugs": "https://github.com/DevExpress/testcafe-browser-natives/issues", + "name": "testcafe-browser-tools", + "version": "1.0.0", + "description": "An utility library for performing platform-dependent actions on browsers.", + "homepage": "https://github.com/DevExpress/testcafe-browser-tools", + "bugs": "https://github.com/DevExpress/testcafe-browser-tools/issues", "license": "MIT", "author": "Developer Express Inc.", "repository": { "type": "git", - "url": "https://github.com/DevExpress/testcafe-browser-natives.git" + "url": "https://github.com/DevExpress/testcafe-browser-tools.git" }, "engines": { "node": ">= 0.10" diff --git a/src/natives/close/win/Close.cs b/src/natives/close/win/Close.cs index 3922c0f..a7298ab 100644 --- a/src/natives/close/win/Close.cs +++ b/src/natives/close/win/Close.cs @@ -3,7 +3,7 @@ using System.Text; using System.Runtime.InteropServices; -namespace BrowserNatives { +namespace BrowserTools { class Close { //Const const UInt32 WM_CLOSE = 0x10; @@ -25,7 +25,7 @@ static void Main (string[] args) { string hWndStr = args[0]; - CloseWindow((IntPtr)int.Parse(hWndStr)); + CloseWindow((IntPtr)int.Parse(hWndStr)); } } -} \ No newline at end of file +} diff --git a/src/natives/close/win/close.csproj b/src/natives/close/win/close.csproj index b389710..07d13f6 100644 --- a/src/natives/close/win/close.csproj +++ b/src/natives/close/win/close.csproj @@ -7,7 +7,7 @@ {04A6CB59-0DDB-4BE7-B7A2-DCD2B0023DC3} Exe Properties - BrowserNatives + BrowserTools close v4.0 512 @@ -32,7 +32,7 @@ 4 - BrowserNatives.Close + BrowserTools.Close @@ -51,4 +51,4 @@ --> - \ No newline at end of file + diff --git a/src/natives/find-window/win/FindWindow.cs b/src/natives/find-window/win/FindWindow.cs index 159a8b5..7155090 100644 --- a/src/natives/find-window/win/FindWindow.cs +++ b/src/natives/find-window/win/FindWindow.cs @@ -6,7 +6,7 @@ using System.Diagnostics; using System.Threading; -namespace BrowserNatives { +namespace BrowserTools { class FindWindow { //Consts const string IE_MAIN_WINDOW_CLASS_NAME = "IEFrame"; @@ -28,7 +28,7 @@ private static bool IsIEMainWindow (IntPtr hWnd) { private static bool CheckWindowTitle (IntPtr hWnd, ref string windowMark) { string title = Utils.GetWindowTitle(hWnd).ToLower(); - if (!title.Contains(windowMark.ToLower())) + if (!title.Contains(windowMark.ToLower())) return true; uint processID = 0; diff --git a/src/natives/find-window/win/find-window.csproj b/src/natives/find-window/win/find-window.csproj index a954cd4..b85f8eb 100644 --- a/src/natives/find-window/win/find-window.csproj +++ b/src/natives/find-window/win/find-window.csproj @@ -7,7 +7,7 @@ {16615D42-2D28-4B3B-9278-8F02D8EB96B9} Exe Properties - BrowserNatives + BrowserTools find-window v4.0 512 @@ -33,7 +33,7 @@ 4 - BrowserNatives.FindWindow + BrowserTools.FindWindow @@ -69,4 +69,4 @@ --> - \ No newline at end of file + diff --git a/src/natives/generate-thumbnail/any/generate-thumbnail.vcxproj b/src/natives/generate-thumbnail/any/generate-thumbnail.vcxproj index 880bcba..37efbe7 100644 --- a/src/natives/generate-thumbnail/any/generate-thumbnail.vcxproj +++ b/src/natives/generate-thumbnail/any/generate-thumbnail.vcxproj @@ -12,7 +12,7 @@ {A438BDF5-3173-4045-B6D7-C14AA431BCF0} - BrowserNatives + BrowserTools @@ -75,4 +75,4 @@ - \ No newline at end of file + diff --git a/src/natives/get-window-size/win/GetWindowSize.cs b/src/natives/get-window-size/win/GetWindowSize.cs index bbdddcb..c45576b 100644 --- a/src/natives/get-window-size/win/GetWindowSize.cs +++ b/src/natives/get-window-size/win/GetWindowSize.cs @@ -8,7 +8,7 @@ using System.Windows.Forms; using System.Threading; -namespace BrowserNatives { +namespace BrowserTools { class GetWindowSize { static void Main (string[] args) { if (args.Length != 1) { diff --git a/src/natives/get-window-size/win/get-window-size.csproj b/src/natives/get-window-size/win/get-window-size.csproj index 533c7af..d771806 100644 --- a/src/natives/get-window-size/win/get-window-size.csproj +++ b/src/natives/get-window-size/win/get-window-size.csproj @@ -7,7 +7,7 @@ {7C5ABA0D-970C-4E8E-962C-A006AEE1E271} Exe Properties - BrowserNatives + BrowserTools get-window-size v4.0 512 @@ -32,7 +32,7 @@ 4 - BrowserNatives.GetWindowSize + BrowserTools.GetWindowSize diff --git a/src/natives/maximize/win/Maximize.cs b/src/natives/maximize/win/Maximize.cs index 5ce8727..0fa00d9 100644 --- a/src/natives/maximize/win/Maximize.cs +++ b/src/natives/maximize/win/Maximize.cs @@ -8,7 +8,7 @@ using System.Threading; using System.Text; -namespace BrowserNatives { +namespace BrowserTools { class Maximize { //Consts const int SW_SHOWMAXIMIZED = 3; diff --git a/src/natives/maximize/win/maximize.csproj b/src/natives/maximize/win/maximize.csproj index b3b6383..442e3b4 100644 --- a/src/natives/maximize/win/maximize.csproj +++ b/src/natives/maximize/win/maximize.csproj @@ -7,7 +7,7 @@ {A88A5114-CBC7-4730-87FB-D1512043EF7C} Exe Properties - BrowserNatives + BrowserTools maximize v4.0 512 @@ -48,7 +48,7 @@ 4 - BrowserNatives.Maximize + BrowserTools.Maximize diff --git a/src/natives/resize/win/Resize.cs b/src/natives/resize/win/Resize.cs index 63972dd..691db97 100644 --- a/src/natives/resize/win/Resize.cs +++ b/src/natives/resize/win/Resize.cs @@ -8,7 +8,7 @@ using System.Threading; using System.Text; -namespace BrowserNatives { +namespace BrowserTools { class Resize { //Consts const int SW_RESTORE = 9; @@ -38,7 +38,7 @@ static void ResizeWindow (IntPtr hWnd, int width, int height) { WindowInfo wi = Utils.GetWindowInfo(hWnd); SetWindowPos( - hWnd, + hWnd, IntPtr.Zero, wi.rcWindow.left, wi.rcWindow.top, diff --git a/src/natives/resize/win/resize.csproj b/src/natives/resize/win/resize.csproj index a97ccfd..4634b2f 100644 --- a/src/natives/resize/win/resize.csproj +++ b/src/natives/resize/win/resize.csproj @@ -7,7 +7,7 @@ {A88A5114-CBC7-4730-87FB-D1512043EF7C} Exe Properties - BrowserNatives + BrowserTools resize v4.0 512 @@ -48,7 +48,7 @@ 4 - BrowserNatives.Resize + BrowserTools.Resize diff --git a/src/natives/screenshot/win/Screenshot.cs b/src/natives/screenshot/win/Screenshot.cs index f005e64..77db6bd 100644 --- a/src/natives/screenshot/win/Screenshot.cs +++ b/src/natives/screenshot/win/Screenshot.cs @@ -9,7 +9,7 @@ using System.Threading; using System.Linq; -namespace BrowserNatives { +namespace BrowserTools { class Screenshot { //Consts const int GW_CHILD = 5; diff --git a/src/natives/screenshot/win/screenshot.csproj b/src/natives/screenshot/win/screenshot.csproj index 69e5ead..ce70549 100644 --- a/src/natives/screenshot/win/screenshot.csproj +++ b/src/natives/screenshot/win/screenshot.csproj @@ -7,7 +7,7 @@ {7C5ABA0D-970C-4E8E-962C-A006AEE1E271} Exe Properties - BrowserNatives + BrowserTools screenshot v4.0 512 @@ -32,7 +32,7 @@ 4 - BrowserNatives.Screenshot + BrowserTools.Screenshot diff --git a/src/natives/utils/win/Utils.cs b/src/natives/utils/win/Utils.cs index a4fb9f3..1c1792d 100644 --- a/src/natives/utils/win/Utils.cs +++ b/src/natives/utils/win/Utils.cs @@ -4,8 +4,7 @@ using System.Runtime.InteropServices; using System.Threading; -namespace BrowserNatives -{ +namespace BrowserTools { //Win32 Type Definitions [StructLayout(LayoutKind.Sequential)] public struct Rect { diff --git a/src/natives/utils/win/utils.csproj b/src/natives/utils/win/utils.csproj index 34b2aec..79af581 100644 --- a/src/natives/utils/win/utils.csproj +++ b/src/natives/utils/win/utils.csproj @@ -7,7 +7,7 @@ {E75454E4-2FCE-4032-8C26-AACE8E8048B0} Library Properties - BrowserNatives + BrowserTools utils v4.0 512 @@ -44,11 +44,11 @@ - - \ No newline at end of file + diff --git a/test/playground/routes.js b/test/playground/routes.js index 3484bc0..b8ff1d1 100644 --- a/test/playground/routes.js +++ b/test/playground/routes.js @@ -1,8 +1,8 @@ -var path = require('path'); -var viewports = require('viewportsizes'); -var Promise = require('pinkie'); -var browserNatives = require('../../lib/index'); -var toAbsPath = require('read-file-relative').toAbsPath; +var path = require('path'); +var viewports = require('viewportsizes'); +var Promise = require('pinkie'); +var browserTools = require('../../lib/index'); +var toAbsPath = require('read-file-relative').toAbsPath; const WINDOW_NORMALIZING_DELAY = 1000; @@ -62,7 +62,7 @@ function getRequestedSize (params) { if (params.paramsType === 'width-height') return { width: Number(params.width), height: Number(params.height) }; - var deviceSize = browserNatives.getViewportSize(params.deviceName); + var deviceSize = browserTools.getViewportSize(params.deviceName); return params.orientation === 'portrait' ? { width: deviceSize.portraitWidth, height: deviceSize.landscapeWidth } : @@ -80,7 +80,7 @@ exports.init = function (appPort) { port = appPort; deviceNames = getDeviceNames(); - return browserNatives + return browserTools .getInstallations() .then(function (res) { installations = res; @@ -113,7 +113,7 @@ exports.open = function (req, res) { // sometimes the browser sends client size information before the 'open' function resolves. browsers.push(browser); - return browserNatives + return browserTools .open(browser.browserInfo, browser.pageUrl) .then(function () { res.locals = { id: browser.id, name: browser.name, deviceNames: deviceNames }; @@ -127,7 +127,7 @@ exports.open = function (req, res) { exports.close = function (req, res) { function close (browser) { - return browserNatives + return browserTools .close(browser.pageUrl) .then(function () { browsers = browsers.filter(function (item) { @@ -146,7 +146,7 @@ exports.resize = function (req, res) { var requestedSize = getRequestedSize(req.body); function resizeWindow () { - return browserNatives.resize( + return browserTools.resize( browser.pageUrl, browser.clientAreaSize.width, browser.clientAreaSize.height, @@ -156,8 +156,8 @@ exports.resize = function (req, res) { } // NOTE: We must resize the window twice if it is maximized. - // https://github.com/DevExpress/testcafe-browser-natives/issues/71 - return browserNatives + // https://github.com/DevExpress/testcafe-browser-tools/issues/71 + return browserTools .isMaximized(browser.pageUrl) .then(function (maximized) { if (!maximized) @@ -187,7 +187,7 @@ exports.resize = function (req, res) { exports.maximize = function (req, res) { function maximize (browser) { - return browserNatives + return browserTools .maximize(browser.pageUrl) .then(function () { res.set('content-type', 'text/plain').end(); @@ -223,10 +223,10 @@ exports.takeScreenshot = function (req, res) { thumbnailPath = path.join(screenshotDirPath, 'thumbnails', screenshotFilename); } - return browserNatives + return browserTools .screenshot(browser.pageUrl, screenshotPath) .then(function () { - return browserNatives.generateThumbnail(screenshotPath, thumbnailPath); + return browserTools.generateThumbnail(screenshotPath, thumbnailPath); }) .then(function () { if (!cachedScreenshots.length) { diff --git a/test/tests/open-test.js b/test/tests/open-test.js index d8e5347..c9b11d0 100644 --- a/test/tests/open-test.js +++ b/test/tests/open-test.js @@ -1,5 +1,5 @@ -var expect = require('chai').expect; -var browserNatives = require('../../lib/index'); +var expect = require('chai').expect; +var browserTools = require('../../lib/index'); describe('open', function () { it('Should raise an error if browser path is not specified', function (done) { @@ -7,7 +7,7 @@ describe('open', function () { path: '' }; - var open = browserNatives + var open = browserTools .open(browserInfo) .then(function () { throw new Error('Promise rejection expected'); @@ -28,7 +28,7 @@ describe('open', function () { path: './non-existent-browser.exe' }; - var open = browserNatives + var open = browserTools .open(browserInfo) .then(function () { throw new Error('Promise rejection expected'); @@ -51,7 +51,7 @@ describe('open', function () { winOpenCmdTemplate: 'echo test' }; - var open = browserNatives + var open = browserTools .open(browserInfo) .catch(function () { throw new Error('Promise resolution expected');