testcafe 1.13.0 → 1.14.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (336) hide show
  1. package/CHANGELOG.md +88 -10
  2. package/LICENSE +21 -21
  3. package/README.md +52 -48
  4. package/bin/testcafe-with-v8-flag-filter.js +0 -0
  5. package/lib/api/exportable-lib/index.js +50 -50
  6. package/lib/api/request-hooks/assert-type.js +7 -7
  7. package/lib/api/request-hooks/hook-method-names.js +11 -0
  8. package/lib/api/request-hooks/hook.js +33 -39
  9. package/lib/api/request-hooks/interfaces.js +3 -3
  10. package/lib/api/request-hooks/request-logger.js +113 -111
  11. package/lib/api/request-hooks/request-mock/create-request-mock.js +12 -0
  12. package/lib/api/request-hooks/request-mock/index.js +46 -0
  13. package/lib/api/request-hooks/request-mock.js +47 -48
  14. package/lib/api/structure/base-unit.js +11 -11
  15. package/lib/api/structure/fixture.js +75 -75
  16. package/lib/api/structure/interfaces.js +2 -2
  17. package/lib/api/structure/test-file.js +31 -31
  18. package/lib/api/structure/test-timeout.js +9 -9
  19. package/lib/api/structure/test.js +85 -85
  20. package/lib/api/structure/testing-unit.js +89 -89
  21. package/lib/api/structure/unit-type.js +9 -9
  22. package/lib/api/test-controller/assertion.js +88 -88
  23. package/lib/api/test-controller/execution-context.js +82 -82
  24. package/lib/api/test-controller/index.js +359 -319
  25. package/lib/api/test-controller/proxy.js +28 -28
  26. package/lib/api/test-page-url.js +60 -60
  27. package/lib/api/test-run-tracker.js +68 -68
  28. package/lib/api/wrap-test-function.js +49 -49
  29. package/lib/assertions/executor.js +74 -74
  30. package/lib/assertions/get-fn.js +46 -46
  31. package/lib/assertions/type.js +20 -20
  32. package/lib/assets/content-types.js +9 -9
  33. package/lib/assets/injectables.js +18 -18
  34. package/lib/browser/connection/command.js +10 -10
  35. package/lib/browser/connection/error-hints.js +9 -9
  36. package/lib/browser/connection/gateway.js +159 -159
  37. package/lib/browser/connection/get-hints.js +33 -33
  38. package/lib/browser/connection/heartbeat-status.js +8 -8
  39. package/lib/browser/connection/index.js +328 -328
  40. package/lib/browser/connection/remotes-queue.js +46 -46
  41. package/lib/browser/connection/service-routes.js +12 -12
  42. package/lib/browser/connection/status.js +12 -12
  43. package/lib/browser/interfaces.js +2 -2
  44. package/lib/browser/provider/built-in/dedicated/base.js +80 -80
  45. package/lib/browser/provider/built-in/dedicated/chrome/browser-client.js +204 -204
  46. package/lib/browser/provider/built-in/dedicated/chrome/build-chrome-args.js +17 -17
  47. package/lib/browser/provider/built-in/dedicated/chrome/config.js +110 -110
  48. package/lib/browser/provider/built-in/dedicated/chrome/create-temp-profile.js +45 -45
  49. package/lib/browser/provider/built-in/dedicated/chrome/elapsed-upperbounds.js +15 -15
  50. package/lib/browser/provider/built-in/dedicated/chrome/index.js +102 -102
  51. package/lib/browser/provider/built-in/dedicated/chrome/interfaces.js +2 -2
  52. package/lib/browser/provider/built-in/dedicated/chrome/local-chrome.js +24 -24
  53. package/lib/browser/provider/built-in/dedicated/chrome/runtime-info.js +29 -29
  54. package/lib/browser/provider/built-in/dedicated/edge/index.js +10 -10
  55. package/lib/browser/provider/built-in/dedicated/edge/runtime-info.js +29 -29
  56. package/lib/browser/provider/built-in/dedicated/firefox/config.js +33 -33
  57. package/lib/browser/provider/built-in/dedicated/firefox/create-temp-profile.js +78 -78
  58. package/lib/browser/provider/built-in/dedicated/firefox/index.js +73 -73
  59. package/lib/browser/provider/built-in/dedicated/firefox/local-firefox.js +36 -36
  60. package/lib/browser/provider/built-in/dedicated/firefox/marionette-client/commands.js +13 -13
  61. package/lib/browser/provider/built-in/dedicated/firefox/marionette-client/index.js +200 -200
  62. package/lib/browser/provider/built-in/dedicated/firefox/runtime-info.js +17 -17
  63. package/lib/browser/provider/built-in/index.js +21 -21
  64. package/lib/browser/provider/built-in/locally-installed.js +30 -30
  65. package/lib/browser/provider/built-in/path.js +47 -47
  66. package/lib/browser/provider/built-in/remote.js +58 -58
  67. package/lib/browser/provider/index.js +303 -303
  68. package/lib/browser/provider/parse-provider-name.js +16 -16
  69. package/lib/browser/provider/plugin-host.js +121 -121
  70. package/lib/browser/provider/pool.js +115 -115
  71. package/lib/browser/provider/utils/argument-parsing.js +74 -74
  72. package/lib/browser/provider/utils/browser-starter.js +34 -34
  73. package/lib/browser/provider/utils/client-functions.js +24 -24
  74. package/lib/browser/provider/utils/get-maximized-headless-window-size.js +9 -9
  75. package/lib/cli/argument-parser.js +284 -279
  76. package/lib/cli/authentication-helper.js +35 -35
  77. package/lib/cli/cli.js +134 -134
  78. package/lib/cli/correct-browsers-and-sources.js +40 -40
  79. package/lib/cli/index.js +19 -19
  80. package/lib/cli/log.js +43 -43
  81. package/lib/cli/remotes-wizard.js +36 -36
  82. package/lib/cli/termination-handler.js +38 -38
  83. package/lib/client/automation/index.js +144 -46
  84. package/lib/client/automation/index.min.js +1 -1
  85. package/lib/client/browser/idle-page/index.html.mustache +35 -35
  86. package/lib/client/browser/idle-page/logo.svg +86 -86
  87. package/lib/client/browser/service-worker.js +4 -6
  88. package/lib/client/core/index.js +19 -13
  89. package/lib/client/core/index.min.js +1 -1
  90. package/lib/client/driver/index.js +1807 -451
  91. package/lib/client/driver/index.min.js +1 -1
  92. package/lib/client/driver/internal-properties.js +9 -9
  93. package/lib/client/test-run/iframe.js.mustache +17 -17
  94. package/lib/client/test-run/index.js.mustache +51 -51
  95. package/lib/client/ui/index.js +14 -12
  96. package/lib/client/ui/index.min.js +1 -1
  97. package/lib/client/ui/sprite.svg +42 -42
  98. package/lib/client-functions/builder-symbol.js +4 -4
  99. package/lib/client-functions/client-function-builder.js +156 -135
  100. package/lib/client-functions/replicator.js +61 -61
  101. package/lib/client-functions/return-single-prop-mode.js +8 -8
  102. package/lib/client-functions/selector-api-execution-mode.js +22 -0
  103. package/lib/client-functions/selectors/add-api.js +646 -588
  104. package/lib/client-functions/selectors/create-snapshot-methods.js +13 -13
  105. package/lib/client-functions/selectors/prepare-api-args.js +20 -20
  106. package/lib/client-functions/selectors/selector-attribute-filter.js +22 -22
  107. package/lib/client-functions/selectors/selector-builder.js +154 -150
  108. package/lib/client-functions/selectors/selector-text-filter.js +43 -43
  109. package/lib/client-functions/selectors/snapshot-properties.js +48 -48
  110. package/lib/client-functions/types.js +18 -18
  111. package/lib/compiler/babel/format-babel-produced-code.js +10 -10
  112. package/lib/compiler/babel/get-base-babel-options.js +11 -11
  113. package/lib/compiler/babel/load-libs.js +64 -62
  114. package/lib/compiler/babel/preset-stage-2.js +19 -19
  115. package/lib/compiler/compile-client-function.js +73 -73
  116. package/lib/compiler/compilers.js +33 -33
  117. package/lib/compiler/index.js +92 -92
  118. package/lib/compiler/interfaces.js +2 -2
  119. package/lib/compiler/test-file/api-based.js +146 -146
  120. package/lib/compiler/test-file/base.js +36 -36
  121. package/lib/compiler/test-file/exportble-lib-path.js +5 -5
  122. package/lib/compiler/test-file/formats/coffeescript/compiler.js +38 -38
  123. package/lib/compiler/test-file/formats/coffeescript/get-test-list.js +29 -29
  124. package/lib/compiler/test-file/formats/es-next/compiler.js +43 -43
  125. package/lib/compiler/test-file/formats/es-next/get-test-list.js +166 -166
  126. package/lib/compiler/test-file/formats/es-next/is-flow-code.js +7 -7
  127. package/lib/compiler/test-file/formats/raw.js +85 -85
  128. package/lib/compiler/test-file/formats/typescript/compiler.js +135 -135
  129. package/lib/compiler/test-file/formats/typescript/get-test-list.js +185 -185
  130. package/lib/compiler/test-file/test-file-parser-base.js +214 -214
  131. package/lib/configuration/configuration-base.js +165 -165
  132. package/lib/configuration/constants.js +9 -9
  133. package/lib/configuration/customizable-compilers.js +7 -7
  134. package/lib/configuration/default-values.js +51 -51
  135. package/lib/configuration/interfaces.js +3 -3
  136. package/lib/configuration/option-names.js +53 -53
  137. package/lib/configuration/option-source.js +9 -9
  138. package/lib/configuration/option.js +14 -14
  139. package/lib/configuration/quarantine-option-names.js +10 -0
  140. package/lib/configuration/run-option-names.js +26 -26
  141. package/lib/configuration/screenshot-option-names.js +10 -10
  142. package/lib/configuration/testcafe-configuration.js +164 -165
  143. package/lib/configuration/types.js +2 -2
  144. package/lib/configuration/typescript-configuration.js +62 -62
  145. package/lib/custom-client-scripts/assert-type.js +7 -7
  146. package/lib/custom-client-scripts/client-script-init.js +3 -3
  147. package/lib/custom-client-scripts/client-script.js +107 -108
  148. package/lib/custom-client-scripts/get-code.js +11 -11
  149. package/lib/custom-client-scripts/get-url.js +6 -6
  150. package/lib/custom-client-scripts/load.js +15 -15
  151. package/lib/custom-client-scripts/problematic-scripts.js +2 -2
  152. package/lib/custom-client-scripts/routing.js +36 -36
  153. package/lib/custom-client-scripts/utils.js +60 -60
  154. package/lib/embedding-utils.js +83 -83
  155. package/lib/errors/create-stack-filter.js +18 -18
  156. package/lib/errors/error-list.js +26 -26
  157. package/lib/errors/get-callsite.js +31 -31
  158. package/lib/errors/internal-modules-prefix.js +8 -8
  159. package/lib/errors/is-internal-stack-frame.js +46 -46
  160. package/lib/errors/process-test-fn-error.js +37 -37
  161. package/lib/errors/runtime/index.js +123 -123
  162. package/lib/errors/runtime/templates.js +116 -114
  163. package/lib/errors/runtime/type-assertions.js +112 -112
  164. package/lib/errors/stack-cleaning-hook.js +64 -64
  165. package/lib/errors/test-run/formattable-adapter.js +59 -59
  166. package/lib/errors/test-run/index.js +302 -302
  167. package/lib/errors/test-run/render-error-template.js +31 -31
  168. package/lib/errors/test-run/templates.js +93 -95
  169. package/lib/errors/test-run/utils.js +90 -85
  170. package/lib/errors/types.js +157 -155
  171. package/lib/index.js +81 -81
  172. package/lib/live/bootstrapper.js +44 -44
  173. package/lib/live/controller.js +107 -107
  174. package/lib/live/file-watcher/index.js +67 -67
  175. package/lib/live/file-watcher/modules-graph.js +58 -58
  176. package/lib/live/keyboard-observer.js +76 -76
  177. package/lib/live/logger/index.js +64 -64
  178. package/lib/live/test-run-controller.js +96 -96
  179. package/lib/live/test-run-state.js +6 -6
  180. package/lib/live/test-run.js +56 -56
  181. package/lib/live/test-runner.js +168 -168
  182. package/lib/load-assets.js +29 -29
  183. package/lib/notifications/add-rendered-warning.js +16 -16
  184. package/lib/notifications/debug-logger.js +78 -78
  185. package/lib/notifications/deprecated.js +24 -24
  186. package/lib/notifications/information-message.js +12 -12
  187. package/lib/notifications/warning-log.js +32 -31
  188. package/lib/notifications/warning-message.js +48 -48
  189. package/lib/reporter/command/command-formatter.js +120 -109
  190. package/lib/reporter/command/format-command.js +8 -8
  191. package/lib/reporter/command/interfaces.js +2 -2
  192. package/lib/reporter/index.js +319 -314
  193. package/lib/reporter/interfaces.js +2 -2
  194. package/lib/reporter/plugin-host.js +136 -137
  195. package/lib/reporter/plugin-methods.js +12 -12
  196. package/lib/role/index.js +74 -74
  197. package/lib/role/marker-symbol.js +7 -7
  198. package/lib/role/phase.js +9 -9
  199. package/lib/runner/bootstrapper.js +272 -272
  200. package/lib/runner/browser-job-result.js +9 -9
  201. package/lib/runner/browser-job.js +153 -123
  202. package/lib/runner/browser-set.js +114 -114
  203. package/lib/runner/fixture-hook-controller.js +85 -85
  204. package/lib/runner/index.js +450 -442
  205. package/lib/runner/interfaces.js +3 -3
  206. package/lib/runner/reporter-stream-controller.js +28 -28
  207. package/lib/runner/task/index.js +152 -133
  208. package/lib/runner/task/phase.js +9 -9
  209. package/lib/runner/test-run-controller.js +166 -185
  210. package/lib/runner/tested-app.js +73 -72
  211. package/lib/screenshots/capturer.js +141 -141
  212. package/lib/screenshots/constants.js +11 -11
  213. package/lib/screenshots/crop.js +111 -111
  214. package/lib/screenshots/default-extension.js +4 -4
  215. package/lib/screenshots/index.js +67 -67
  216. package/lib/screenshots/utils.js +39 -39
  217. package/lib/services/compiler/host.js +190 -106
  218. package/lib/services/compiler/io.js +9 -9
  219. package/lib/services/compiler/protocol.js +17 -16
  220. package/lib/services/compiler/service.js +225 -106
  221. package/lib/services/compiler/test-run-proxy.js +111 -73
  222. package/lib/services/interfaces.js +3 -0
  223. package/lib/services/process-title.js +8 -8
  224. package/lib/services/serialization/prepare-options.js +17 -17
  225. package/lib/services/serialization/replicator/create-replicator.js +27 -0
  226. package/lib/services/serialization/replicator/custom-error-transform.js +28 -0
  227. package/lib/services/serialization/test-structure.js +93 -77
  228. package/lib/services/utils/ipc/interfaces.js +30 -30
  229. package/lib/services/utils/ipc/io.js +108 -108
  230. package/lib/services/utils/ipc/message.js +76 -73
  231. package/lib/services/utils/ipc/packet.js +55 -55
  232. package/lib/services/utils/ipc/proxy.js +110 -118
  233. package/lib/services/utils/ipc/transport.js +64 -64
  234. package/lib/shared/errors/index.js +382 -382
  235. package/lib/shared/node-modules-folder-name.js +4 -4
  236. package/lib/test-run/bookmark.js +90 -90
  237. package/lib/test-run/browser-console-messages.js +73 -73
  238. package/lib/test-run/browser-manipulation-queue.js +92 -92
  239. package/lib/test-run/client-messages.js +9 -9
  240. package/lib/test-run/commands/actions.js +486 -425
  241. package/lib/test-run/commands/assertion.js +45 -45
  242. package/lib/test-run/commands/base.js +14 -14
  243. package/lib/test-run/commands/browser-manipulation.js +95 -95
  244. package/lib/test-run/commands/from-object.js +82 -82
  245. package/lib/test-run/commands/observation.js +61 -61
  246. package/lib/test-run/commands/options.js +231 -215
  247. package/lib/test-run/commands/service.js +54 -48
  248. package/lib/test-run/commands/type.js +65 -60
  249. package/lib/test-run/commands/utils.js +87 -87
  250. package/lib/test-run/commands/validations/argument.js +90 -90
  251. package/lib/test-run/commands/validations/factories.js +47 -47
  252. package/lib/test-run/commands/validations/initializers.js +44 -44
  253. package/lib/test-run/debug-log.js +32 -32
  254. package/lib/test-run/execute-js-expression.js +74 -74
  255. package/lib/test-run/index.js +823 -752
  256. package/lib/test-run/marker-symbol.js +7 -7
  257. package/lib/test-run/observed-callsites-storage.js +17 -17
  258. package/lib/test-run/phase.js +16 -16
  259. package/lib/test-run/session-controller.js +104 -104
  260. package/lib/testcafe.js +119 -114
  261. package/lib/utils/assignable.js +39 -39
  262. package/lib/utils/async-event-emitter.js +28 -28
  263. package/lib/utils/async-queue.js +14 -14
  264. package/lib/utils/browser-connection-timeouts.js +19 -19
  265. package/lib/utils/callsite.js +17 -17
  266. package/lib/utils/check-file-path.js +31 -31
  267. package/lib/utils/check-url.js +51 -51
  268. package/lib/utils/convert-to-best-fit-type.js +16 -16
  269. package/lib/utils/correct-file-path.js +21 -21
  270. package/lib/utils/define-lazy-property.js +13 -13
  271. package/lib/utils/delay.js +6 -6
  272. package/lib/utils/delegated-api.js +44 -44
  273. package/lib/utils/detect-display.js +6 -6
  274. package/lib/utils/detect-ffmpeg.js +44 -44
  275. package/lib/utils/diff/colors.js +29 -29
  276. package/lib/utils/diff/index.js +53 -53
  277. package/lib/utils/diff/util.js +24 -22
  278. package/lib/utils/diff.js +29 -29
  279. package/lib/utils/escape-user-agent.js +10 -10
  280. package/lib/utils/flag-list.js +17 -17
  281. package/lib/utils/get-any-key.js +8 -8
  282. package/lib/utils/get-browser.js +8 -8
  283. package/lib/utils/get-common-path.js +34 -34
  284. package/lib/utils/get-filter-fn.js +40 -40
  285. package/lib/utils/get-options/base.js +36 -36
  286. package/lib/utils/get-options/compiler.js +33 -33
  287. package/lib/utils/get-options/grep.js +15 -15
  288. package/lib/utils/get-options/index.js +21 -19
  289. package/lib/utils/get-options/meta.js +22 -22
  290. package/lib/utils/get-options/quarantine.js +92 -0
  291. package/lib/utils/get-options/screenshot.js +17 -17
  292. package/lib/utils/get-options/ssl.js +45 -45
  293. package/lib/utils/get-options/video.js +10 -10
  294. package/lib/utils/get-viewport-width.js +18 -18
  295. package/lib/utils/guard-time-execution.js +10 -10
  296. package/lib/utils/handle-errors.js +74 -74
  297. package/lib/utils/handle-tag-args.js +8 -8
  298. package/lib/utils/http.js +30 -30
  299. package/lib/utils/is-localhost.js +11 -11
  300. package/lib/utils/is-password-input.js +11 -0
  301. package/lib/utils/is-repl.js +12 -0
  302. package/lib/utils/is-window-in-iframe.js +6 -6
  303. package/lib/utils/limit-number.js +10 -10
  304. package/lib/utils/make-reg-exp.js +7 -7
  305. package/lib/utils/moment-loader.js +20 -20
  306. package/lib/utils/parse-file-list.js +71 -71
  307. package/lib/utils/parse-user-agent.js +55 -55
  308. package/lib/utils/path-pattern.js +114 -114
  309. package/lib/utils/prepare-reporters.js +30 -30
  310. package/lib/utils/prerender-callsite.js +18 -18
  311. package/lib/utils/process.js +119 -119
  312. package/lib/utils/promisified-functions.js +46 -46
  313. package/lib/utils/re-executable-promise.js +39 -39
  314. package/lib/utils/render-callsite-sync.js +29 -29
  315. package/lib/utils/render-template.js +10 -10
  316. package/lib/utils/reporter.js +30 -30
  317. package/lib/utils/resolve-path-relatively-cwd.js +7 -7
  318. package/lib/utils/string.js +105 -105
  319. package/lib/utils/temp-directory/cleanup-process/commands.js +7 -7
  320. package/lib/utils/temp-directory/cleanup-process/index.js +143 -143
  321. package/lib/utils/temp-directory/cleanup-process/worker.js +58 -58
  322. package/lib/utils/temp-directory/index.js +87 -87
  323. package/lib/utils/temp-directory/lockfile.js +56 -56
  324. package/lib/utils/thennable.js +7 -7
  325. package/lib/utils/timer.js +15 -15
  326. package/lib/utils/to-posix-path.js +8 -8
  327. package/lib/utils/types.js +2 -2
  328. package/lib/video-recorder/interfaces.js +2 -2
  329. package/lib/video-recorder/process.js +126 -126
  330. package/lib/video-recorder/recorder.js +136 -136
  331. package/lib/video-recorder/test-run-video-recorder.js +69 -69
  332. package/lib/video-recorder/videos.js +37 -37
  333. package/package.json +7 -7
  334. package/ts-defs/index.d.ts +109 -17
  335. package/ts-defs/selectors.d.ts +95 -7
  336. package/ts-defs/testcafe-scripts.d.ts +96 -8
@@ -1,51 +1,51 @@
1
- (function () {
2
- if (window !== window.top)
3
- return;
4
-
5
- var origin = location.origin;
6
-
7
- // NOTE: location.origin doesn't exist in IE11 on Windows 10.10240 LTSB
8
- if (!origin)
9
- origin = location.protocol + '//' + location.hostname + (location.port ? ':' + location.port : '');
10
-
11
- var testRunId = {{{testRunId}}};
12
- var browserId = {{{browserId}}};
13
- var selectorTimeout = {{{selectorTimeout}}};
14
- var pageLoadTimeout = {{{pageLoadTimeout}}};
15
- var childWindowReadyTimeout = {{{childWindowReadyTimeout}}};
16
- var retryTestPages = {{{retryTestPages}}};
17
- var speed = {{{speed}}};
18
- var browserHeartbeatUrl = origin + {{{browserHeartbeatRelativeUrl}}};
19
- var browserStatusUrl = origin + {{{browserStatusRelativeUrl}}};
20
- var browserStatusDoneUrl = origin + {{{browserStatusDoneRelativeUrl}}};
21
- var browserActiveWindowIdUrl = origin + {{{browserActiveWindowIdUrl}}};
22
- var skipJsErrors = {{{skipJsErrors}}};
23
- var dialogHandler = {{{dialogHandler}}};
24
- var userAgent = {{{userAgent}}};
25
- var fixtureName = {{{fixtureName}}};
26
- var testName = {{{testName}}};
27
- var canUseDefaultWindowActions = {{{canUseDefaultWindowActions}}};
28
-
29
- var ClientDriver = window['%testCafeDriver%'];
30
- var driver = new ClientDriver(testRunId,
31
- { heartbeat: browserHeartbeatUrl, status: browserStatusUrl, statusDone: browserStatusDoneUrl, activeWindowId: browserActiveWindowIdUrl },
32
- { userAgent: userAgent, fixtureName: fixtureName, testName: testName },
33
- {
34
- selectorTimeout: selectorTimeout,
35
- pageLoadTimeout: pageLoadTimeout,
36
- childWindowReadyTimeout: childWindowReadyTimeout,
37
- skipJsErrors: skipJsErrors,
38
- dialogHandler: dialogHandler,
39
- retryTestPages: retryTestPages,
40
- speed: speed,
41
- canUseDefaultWindowActions: canUseDefaultWindowActions
42
- }
43
- );
44
-
45
- Object.defineProperty(window, '%testCafeDriverInstance%', {
46
- configurable: true,
47
- value: driver
48
- });
49
-
50
- driver.start();
51
- })();
1
+ (function () {
2
+ if (window !== window.top)
3
+ return;
4
+
5
+ var origin = location.origin;
6
+
7
+ // NOTE: location.origin doesn't exist in IE11 on Windows 10.10240 LTSB
8
+ if (!origin)
9
+ origin = location.protocol + '//' + location.hostname + (location.port ? ':' + location.port : '');
10
+
11
+ var testRunId = {{{testRunId}}};
12
+ var browserId = {{{browserId}}};
13
+ var selectorTimeout = {{{selectorTimeout}}};
14
+ var pageLoadTimeout = {{{pageLoadTimeout}}};
15
+ var childWindowReadyTimeout = {{{childWindowReadyTimeout}}};
16
+ var retryTestPages = {{{retryTestPages}}};
17
+ var speed = {{{speed}}};
18
+ var browserHeartbeatUrl = origin + {{{browserHeartbeatRelativeUrl}}};
19
+ var browserStatusUrl = origin + {{{browserStatusRelativeUrl}}};
20
+ var browserStatusDoneUrl = origin + {{{browserStatusDoneRelativeUrl}}};
21
+ var browserActiveWindowIdUrl = origin + {{{browserActiveWindowIdUrl}}};
22
+ var skipJsErrors = {{{skipJsErrors}}};
23
+ var dialogHandler = {{{dialogHandler}}};
24
+ var userAgent = {{{userAgent}}};
25
+ var fixtureName = {{{fixtureName}}};
26
+ var testName = {{{testName}}};
27
+ var canUseDefaultWindowActions = {{{canUseDefaultWindowActions}}};
28
+
29
+ var ClientDriver = window['%testCafeDriver%'];
30
+ var driver = new ClientDriver(testRunId,
31
+ { heartbeat: browserHeartbeatUrl, status: browserStatusUrl, statusDone: browserStatusDoneUrl, activeWindowId: browserActiveWindowIdUrl },
32
+ { userAgent: userAgent, fixtureName: fixtureName, testName: testName },
33
+ {
34
+ selectorTimeout: selectorTimeout,
35
+ pageLoadTimeout: pageLoadTimeout,
36
+ childWindowReadyTimeout: childWindowReadyTimeout,
37
+ skipJsErrors: skipJsErrors,
38
+ dialogHandler: dialogHandler,
39
+ retryTestPages: retryTestPages,
40
+ speed: speed,
41
+ canUseDefaultWindowActions: canUseDefaultWindowActions
42
+ }
43
+ );
44
+
45
+ Object.defineProperty(window, '%testCafeDriverInstance%', {
46
+ configurable: true,
47
+ value: driver
48
+ });
49
+
50
+ driver.start();
51
+ })();
@@ -1,10 +1,12 @@
1
- // NOTE: We should have the capability to initialize scripts with different contexts.
2
- // This is required for iframes without the src attribute because Hammerhead does not
3
- // inject scripts into such iframes. So, we wrap all scripts in initialization functions.
4
- (function () {
5
- function initTestCafeUI(window) {
6
- var document = window.document;
7
-
1
+ window['%hammerhead%'].utils.removeInjectedScript();
2
+
3
+ // NOTE: We should have the capability to initialize scripts with different contexts.
4
+ // This is required for iframes without the src attribute because Hammerhead does not
5
+ // inject scripts into such iframes. So, we wrap all scripts in initialization functions.
6
+ (function () {
7
+ function initTestCafeUI(window) {
8
+ var document = window.document;
9
+
8
10
  (function (hammerhead, testCafeCore, Promise$3) {
9
11
  var hammerhead__default = 'default' in hammerhead ? hammerhead['default'] : hammerhead;
10
12
  var testCafeCore__default = 'default' in testCafeCore ? testCafeCore['default'] : testCafeCore;
@@ -1450,8 +1452,8 @@
1450
1452
  hammerhead__default.on(evalIframeScript, function (e) { return initTestCafeUI(nativeMethods$5.contentWindowGetter.call(e.iframe), true); });
1451
1453
 
1452
1454
  }(window['%hammerhead%'], window['%testCafeCore%'], window['%hammerhead%'].Promise));
1453
-
1454
- }
1455
-
1456
- initTestCafeUI(window);
1457
- })();
1455
+
1456
+ }
1457
+
1458
+ initTestCafeUI(window);
1459
+ })();
@@ -1 +1 @@
1
- !function Pe(ke){var Re=ke.document;!function(s,o,t){var e="default"in s?s.default:s,i="default"in o?o.default:o;t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;var r={uiRoot:null,element:function(){return this.uiRoot||(this.uiRoot=Re.createElement("div"),s.shadowUI.getRoot().appendChild(this.uiRoot)),this.uiRoot},hide:function(){this.uiRoot&&(this.uiRoot.style.visibility="hidden")},show:function(){this.uiRoot&&(this.uiRoot.style.visibility="")},remove:function(){var t=s.shadowUI.getRoot();s.nativeMethods.nodeParentNodeGetter.call(t).removeChild(t)}},c=e.shadowUI,u=e.utils.browser,a=e.utils.featureDetection,d=e.nativeMethods,h=e.eventSandbox.eventSimulator,l=e.eventSandbox.listeners,p=i.positionUtils,m=i.domUtils,g=i.styleUtils,f=i.eventUtils,v=i.arrayUtils,y="tcOptionList",C="tcOptionGroup",E="tcOption",_="disabled",w=u.isIE?30:20,S=null,I=null,b=[],x=[];function B(t){(t.target||t.srcElement)===S||m.containsElement(S,t.target)||m.containsElement(I,t.target)||M()}function T(t,e,i){var n,s=v.indexOf(x,t.target);s<0||(i(),(n=-1<t.target.className.indexOf(_))&&u.isWebKit||function(t,e){var i=S.selectedIndex,n=S.getElementsByTagName("option")[t],s=!e&&t!==i;s&&!u.isIE&&(S.selectedIndex=t),u.isFirefox||u.isIE||!s||(h.input(S),h.change(S)),(u.isFirefox||u.isIE)&&h.mousedown(u.isFirefox?n:S),a.isTouchDevice||h.mouseup(u.isFirefox?n:S),(u.isFirefox||u.isIE)&&s&&(u.isIE&&(S.selectedIndex=t),u.isIE||h.input(S),h.change(S)),a.isTouchDevice||h.click(u.isFirefox||u.isIE?n:S),e||M()}(s,n))}function U(t,e){for(var i,n,s,o,a,r,l,u=m.getChildrenLength(t),h=0;h<u;h++)m.isOptionElement(t[h])?(o=t[h],a=e,l=r=void 0,r=Re.createElement("div"),l=o.disabled||"optgroup"===m.getTagName(o.parentElement)&&o.parentElement.disabled,d.nodeTextContentSetter.call(r,o.text),a.appendChild(r),c.addClass(r,E),l&&(c.addClass(r,_),g.set(r,"color",g.get(o,"color"))),x.push(r)):"optgroup"===m.getTagName(t[h])&&(i=t[h],n=e,s=void 0,s=Re.createElement("div"),d.nodeTextContentSetter.call(s,i.label||" "),n.appendChild(s),c.addClass(s,C),s.disabled&&(c.addClass(s,_),g.set(s,"color",g.get(i,"color"))),U(i.children,s),b.push(s))}function M(){m.remove(I),f.unbind(Re,"mousedown",B),S=I=null,x=[],b=[]}function A(t){return t?t===S:!!S}var n=Object.freeze({__proto__:null,expandOptionList:function(t){var e=t.children;if(e.length){if(S){var i=t===S;if(M(),i)return}S=t,I=Re.createElement("div"),r.element().appendChild(I),c.addClass(I,y),U(e,I),l.addInternalEventBeforeListener(ke,["click"],T),d.setTimeout.call(ke,function(){f.bind(Re,"mousedown",B)},0),g.set(I,{position:"absolute",fontSize:g.get(S,"fontSize"),fontFamily:g.get(S,"fontFamily"),minWidth:g.getWidth(S)+"px",left:p.getOffsetPosition(S).left+"px",height:m.getSelectVisibleChildren(t).length>w?g.getOptionHeight(t)*w:""});var n,s=p.getOffsetPosition(S).top,o=g.getHeight(I),a=s+g.getHeight(S)+2;a+o>g.getScrollTop(ke)+g.getHeight(ke)&&(n=s-3-o)>=g.getScrollTop(ke)&&(a=n),g.set(I,"top",a+"px")}},collapseOptionList:M,isOptionListExpanded:A,getEmulatedChildElement:function(t){var e="optgroup"===m.getTagName(t),i=m.getElementIndexInParent(S,t);return e?b[i]:x[i]},scrollOptionListByChild:function(t){var e,i,n,s,o,a,r=m.getSelectParent(t);r&&(e=g.getSelectElementSize(r),i=g.getOptionHeight(r),n=0,o=(s=Math.max(g.getScrollTop(r)/i,0))+e-1,(a=m.getChildVisibleIndex(r,t))<s?(n=i*(s-a),g.setScrollTop(r,Math.max(g.getScrollTop(r)-n,0))):o<a&&(n=i*(a-o),g.setScrollTop(r,g.getScrollTop(r)+n)))},getSelectChildCenter:function(t){var e=m.getSelectParent(t);if(!e)return{x:0,y:0};var i=g.getOptionHeight(e),n=p.getElementRectangle(t);return{x:Math.round(n.left+n.width/2),y:Math.round(n.top+i/2)}},switchOptionsByKeys:function(t,e){var i=g.getSelectElementSize(t),n=!g.hasDimensions(c.select("."+y)[0]);if(/down|up/.test(e)||!u.isIE&&(i<=1||u.isFirefox)&&(n||u.isFirefox)&&/left|right/.test(e)){for(var s=t.querySelectorAll("option"),o=[],a=0;a<s.length;a++){var r=s[a].parentElement;s[a].disabled||"optgroup"===m.getTagName(r)&&r.disabled||o.push(s[a])}var l=v.indexOf(o,s[t.selectedIndex])+(/down|right/.test(e)?1:-1);0<=l&&l<o.length&&(t.selectedIndex=v.indexOf(s,o[l]),u.isIE||h.input(t),h.change(t))}},isOptionElementVisible:function(t){var e=m.getSelectParent(t);if(!e)return!0;var i=A(e),n=g.getSelectElementSize(e);return i||1<n}}),V="Loading page...",D="modal-background",P="loading-text",k="loading-icon",R=null,W=null,O=null,N=!1;function F(){function t(){var t=o.styleUtils.getHeight(ke),e=o.styleUtils.getWidth(ke);o.styleUtils.set(R,"width",e+"px"),o.styleUtils.set(R,"height",t+"px"),o.styleUtils.set(O,{left:Math.round((e-o.styleUtils.getWidth(O))/2)+"px",top:Math.round((t-o.styleUtils.getHeight(O))/2)+"px"})}t(),o.eventUtils.bind(ke,"resize",t)}function L(){var t,e,i,n;t=r.element(),R=Re.createElement("div"),t.appendChild(R),s.shadowUI.addClass(R,D),W=Re.createElement("div"),s.nativeMethods.nodeTextContentSetter.call(W,V),t.appendChild(W),s.shadowUI.addClass(W,P),O=Re.createElement("div"),o.styleUtils.set(O,"visibility","hidden"),t.appendChild(O),s.shadowUI.addClass(O,k),F(),e=o.styleUtils.getHeight(ke),i=o.styleUtils.getWidth(ke),(n=!o.styleUtils.hasDimensions(W))&&(o.styleUtils.set(W,"visibility","hidden"),o.styleUtils.set(W,"display","block")),o.styleUtils.set(W,{left:Math.max((i-o.styleUtils.getWidth(W))/2,0)+"px",top:Math.max((e-o.styleUtils.getHeight(W))/2,0)+"px"}),n&&(o.styleUtils.set(W,"display","none"),o.styleUtils.set(W,"visibility","")),N=!0}var H=Object.freeze({__proto__:null,initAndShowLoadingText:function(){function t(){L(),o.styleUtils.set(R,"opacity",.8),o.styleUtils.set(R,"display","block"),o.styleUtils.set(W,"display","block"),e=!0}var e=!1,i=function(){e||(Re.body?t():s.nativeMethods.setTimeout.call(ke,i,0))};i(),o.eventUtils.documentReady().then(function(){e||t()})},show:function(t){N||L(),o.styleUtils.set(R,"opacity",t?0:.7),o.styleUtils.set(R,"display","block")},hide:function(){N&&(o.styleUtils.set(W,"display","none"),o.styleUtils.set(R,"display","none"))},showLoadingIcon:function(){o.styleUtils.set(O,"visibility","visible")},hideLoadingIcon:function(){o.styleUtils.set(O,"visibility","hidden")}}),q=e.shadowUI,z=i.styleUtils,G="success",j=(K.prototype.setValue=function(t){t="number"!=typeof t?0:Math.min(Math.max(t,0),100),z.set(this.valueElement,"width",t+"%")},K.prototype.setSuccess=function(t){t?q.addClass(this.containerElement,G):q.removeClass(this.containerElement,G)},K);function K(t){this.containerElement=Re.createElement("div"),this.valueElement=Re.createElement("div"),t.appendChild(this.containerElement),this.containerElement.appendChild(this.valueElement),q.addClass(this.containerElement,"progress-bar"),q.addClass(this.valueElement,"value")}var Y=e.shadowUI,X=e.nativeMethods,J=i.eventUtils,Q=i.styleUtils,Z="progress-panel",$="title",tt="content",et=(it._getInvisibleElementProperty=function(t,e){var i="none"===Q.get(t,"display");i&&Q.set(t,"display","block");var n=t[e];return i&&Q.set(t,"display","none"),n},it._showAtWindowCenter=function(t){var e=it._getInvisibleElementProperty(t,"offsetHeight"),i=it._getInvisibleElementProperty(t,"offsetWidth"),n=Math.round(Q.getHeight(ke)/2-e/2),s=Math.round(Q.getWidth(ke)/2-i/2);Q.set(t,{left:s+"px",top:n+"px"})},it.prototype._setCurrentProgress=function(){var t=Math.round((X.dateNow()-this.startTime)/this.maxTimeout*100);this.progressBar.setValue(t)},it.prototype._setSuccess=function(t){this.progressBar.setSuccess(t)},it.prototype._stopAnimation=function(){X.clearInterval.call(ke,this.animationInterval)},it.prototype._animate=function(t,e,i,n){var s,o,a,r=this,l=X.dateNow(),u=i?0:1;i&&(Q.set(t,"opacity",u),Q.set(t,"display","block")),this._stopAnimation(),this.animationInterval=X.setInterval.call(ke,function(){s=X.dateNow()-l,o=Math.min(s/e,1),a=.5-Math.cos(o*Math.PI)/2,Q.set(t,"opacity",u+(i?a:-a)),1===o&&(r._stopAnimation(),n&&n())},10)},it.prototype._showPanel=function(){J.bind(ke,"resize",this.disposePanel),this._animate(this.panelDiv,200,!0)},it.prototype._hidePanel=function(t){var e=this;this.startTime=null,J.unbind(ke,"resize",this.disposePanel),this._animate(this.panelDiv,t?0:600,!1,function(){return Q.set(e.panelDiv,"display","none")})},it.prototype.show=function(t,e){var i=this;this.startTime=X.dateNow(),this.maxTimeout=e,X.nodeTextContentSetter.call(this.titleDiv,t),this._setSuccess(!1),this.openingTimeout=X.setTimeout.call(ke,function(){i.openingTimeout=null,i._setCurrentProgress(),i._showPanel(),i.updateInterval=X.setInterval.call(ke,function(){return i._setCurrentProgress()},100)},300)},it.prototype.close=function(t){var e=this;t&&this._setSuccess(!0),this.openingTimeout&&(X.clearTimeout.call(ke,this.openingTimeout),this.openingTimeout=null),this.updateInterval&&(X.clearInterval.call(ke,this.updateInterval),this.updateInterval=null),t?this.startTime&&X.dateNow()-this.startTime<1e3?X.setTimeout.call(ke,function(){X.setTimeout.call(ke,function(){return e._hidePanel(!1)},200)},100):X.setTimeout.call(ke,function(){return e._hidePanel(!1)},200):this._hidePanel(!0)},it);function it(){var t=this;this.startTime=null,this.openingTimeout=null,this.updateInterval=null,this.animationInterval=null,this.panelDiv=Re.createElement("div"),r.element().appendChild(this.panelDiv),this.titleDiv=Re.createElement("div"),this.panelDiv.appendChild(this.titleDiv),this.contentDiv=Re.createElement("div"),this.panelDiv.appendChild(this.contentDiv),Y.addClass(this.panelDiv,Z),Y.addClass(this.titleDiv,$),Y.addClass(this.contentDiv,tt),it._showAtWindowCenter(this.panelDiv),this.progressBar=new j(this.contentDiv),this.disposePanel=function(){return it._showAtWindowCenter(t.panelDiv)}}var nt=function(t,e){return(nt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)};function st(t,e){function i(){this.constructor=t}nt(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var ot=e.shadowUI,at=e.nativeMethods,rt=i.styleUtils,lt="determinate",ut=(ht.prototype._setCurrentProgress=function(){var t=(at.dateNow()-this.startTime)/this.maxTimeout,e=Math.min(Math.max(t,0),1),i=rt.getWidth(this.progressBar),n=Math.round(i*e);rt.set(this.firstValueElement,"width",n+"px")},ht.prototype.start=function(t,e){var i=this;ot.addClass(this.progressBar,lt),this.maxTimeout=t,this.startTime=e||at.dateNow(),this._setCurrentProgress(),this.animationInterval=at.setInterval.call(ke,function(){return i._setCurrentProgress()},10)},ht.prototype.stop=function(){this.animationInterval&&(at.clearInterval.call(ke,this.animationInterval),this.animationInterval=null)},ht.prototype.reset=function(){rt.set(this.firstValueElement,"width",0),ot.removeClass(this.progressBar,lt)},ht);function ht(t,e){this.progressBar=t,this.firstValueElement=e,this.maxTimeout=null,this.startTime=null,this.animationInterval=null}var ct=e.shadowUI,dt=e.nativeMethods,pt=i.styleUtils,mt=i.positionUtils,gt={time:2800,points:[.815,.395],positionByCompletePercent:{0:{left:-35,right:100},.6:{left:100,right:-90},1:{left:100,right:-90}}},ft={time:3e3,points:[.84,1],positionByCompletePercent:{0:{left:-200,right:100},.6:{left:107,right:-8},1:{left:107,right:-8}}},vt=0,yt=.6,Ct=1,Et="indeterminate",_t=(wt._updateValueAnimation=function(t,e,i){var n,s,o,a,r,l,u,h,c,d,p,m,g,f=i.time,v=i.points,y=i.positionByCompletePercent,C=dt.dateNow()-t,E=(n=C/f,s=v[0],o=v[1],3*Math.pow(1-n,2)*n*s+3*(1-n)*n*n*o+n*n*n),_=(h=(l=(a=E)<yt)?yt:Ct,c=(r=y)[u=l?vt:yt],d=r[h],p={x:u,y:c.left},m={x:h,y:d.left},g=mt.getLineYByXCoord(p,m,a),p={x:u,y:c.right},m={x:h,y:d.right},{left:g,right:mt.getLineYByXCoord(p,m,a)}),w=_.left,S=_.right;pt.set(e,"left",Math.round(w)+"%"),pt.set(e,"right",Math.round(S)+"%")},wt.prototype._clearFirstValueAnimation=function(){this.animationInterval&&(dt.clearInterval.call(ke,this.animationInterval),this.animationInterval=null),pt.set(this.firstValue,"left","-35%"),pt.set(this.firstValue,"right","100%")},wt.prototype._clearSecondValueAnimation=function(){this.secondValueAnimationInterval&&(dt.clearInterval.call(ke,this.secondValueAnimationInterval),this.secondValueAnimationInterval=null),pt.set(this.secondValue,"left","-200%"),pt.set(this.secondValue,"right","100%")},wt.prototype._startFirstValueAnimation=function(){var t=this;this._clearFirstValueAnimation();var e=dt.dateNow();this.animationInterval=dt.setInterval.call(ke,function(){wt._updateValueAnimation(e,t.firstValue,gt)},10)},wt.prototype._startSecondValueAnimation=function(){var t=this;this._clearSecondValueAnimation();var e=dt.dateNow();this.secondValueAnimationInterval=dt.setInterval.call(ke,function(){wt._updateValueAnimation(e,t.secondValue,ft)},10)},wt.prototype._startAnimation=function(){var t=this;this._startFirstValueAnimation(),this.secondValueAnimationTimeout=dt.setTimeout.call(ke,function(){return t._startSecondValueAnimation()},1e3),this.restartAnimationTimeout=dt.setTimeout.call(ke,function(){return t._startAnimation()},1950)},wt.prototype._stopAnimation=function(){this._clearFirstValueAnimation(),this._clearSecondValueAnimation(),this.secondValueAnimationTimeout&&(dt.clearInterval.call(ke,this.secondValueAnimationTimeout),this.secondValueAnimationTimeout=null),this.restartAnimationTimeout&&(dt.clearInterval.call(ke,this.restartAnimationTimeout),this.restartAnimationTimeout=null)},wt.prototype.start=function(){ct.addClass(this.progressBar,Et),this._startAnimation()},wt.prototype.stop=function(){ct.removeClass(this.progressBar,Et),this._stopAnimation()},wt);function wt(t,e,i){this.progressBar=t,this.firstValue=e,this.secondValue=i,this.animationInterval=null,this.secondValueAnimationInterval=null,this.secondValueAnimationTimeout=null,this.restartAnimationTimeout=null}var St=e.shadowUI,It=i.styleUtils,bt=(xt.prototype._create=function(t){this.progressBar=Re.createElement("div"),St.addClass(this.progressBar,"progress-bar"),t.appendChild(this.progressBar);var e=Re.createElement("div");St.addClass(e,"value-container"),this.progressBar.appendChild(e),this.firstValueElement=Re.createElement("div"),St.addClass(this.firstValueElement,"value"),e.appendChild(this.firstValueElement),this.secondValueElement=Re.createElement("div"),St.addClass(this.secondValueElement,"value"),e.appendChild(this.secondValueElement)},xt.prototype.show=function(){It.set(this.progressBar,"visibility","visible")},xt.prototype.hide=function(){It.set(this.progressBar,"visibility","hidden")},xt);function xt(t){this.progressBar=null,this.firstValueElement=null,this.secondValueElement=null,this._create(t),this.determinateIndicator=new ut(this.progressBar,this.firstValueElement),this.indeterminateIndicator=new _t(this.progressBar,this.firstValueElement,this.secondValueElement)}var Bt,Tt="start-waiting-element",Ut="end-waiting-element-request",Mt="end-waiting-element-response",At="start-waiting-assertion-retries",Vt="end-waiting-assertion-retries-request",Dt="end-waiting-assertion-retries-response",Pt=e.Promise,kt=e.shadowUI,Rt=e.nativeMethods,Wt=e.eventSandbox.message,Ot=e.utils.browser,Nt=e.utils.featureDetection,Ft=e.eventSandbox.listeners,Lt=i.styleUtils,Ht=i.eventUtils,qt=i.domUtils,zt=i.serviceUtils,Gt=i.arrayUtils,jt="waiting-element-failed",Kt="waiting-element-success",Yt="%testCafeStatusPrefix%",Xt=(st(Jt,Bt=zt.EventEmitter),Jt.prototype._createButton=function(t,e){var i=Re.createElement("div"),n=Re.createElement("div"),s=Re.createElement("span");return Rt.nodeTextContentSetter.call(s,t),kt.addClass(i,"button"),kt.addClass(i,e),kt.addClass(n,"button-icon"),Ot.isSafari&&(s.style.position="relative",s.style.top="1px"),i.appendChild(n),i.appendChild(s),i},Jt.prototype._createIconArea=function(){this.icon=Re.createElement("div"),kt.addClass(this.icon,"icon"),this.statusBar.appendChild(this.icon)},Jt.prototype._createInformationArea=function(){this.infoContainer=Re.createElement("div"),kt.addClass(this.infoContainer,"info-container"),this.statusBar.appendChild(this.infoContainer);var t=Re.createElement("div");kt.addClass(t,"info-text-container"),this.infoContainer.appendChild(t);var e=Re.createElement("div");kt.addClass(e,"status-container"),t.appendChild(e),this.statusDiv=Re.createElement("div"),this.statusDiv=Re.createElement("div"),Rt.nodeTextContentSetter.call(this.statusDiv,this._getFullStatusText("Loading Web Page...")),kt.addClass(this.statusDiv,"status"),kt.addClass(this.statusDiv,"info"),e.appendChild(this.statusDiv);var i=Re.createElement("div");Rt.nodeTextContentSetter.call(i,this.fixtureName+" - "+this.testName),kt.addClass(i,"fixture"),kt.addClass(i,"info"),e.appendChild(i);var n=Re.createElement("div");Rt.nodeTextContentSetter.call(n,this.userAgent),kt.addClass(n,"user-agent"),t.appendChild(n)},Jt.prototype._createActionsArea=function(){var t=this;this.actionsContainer=Re.createElement("div"),kt.addClass(this.actionsContainer,"actions-container"),this.statusBar.appendChild(this.actionsContainer),this.buttons=Re.createElement("div"),kt.addClass(this.buttons,"buttons"),this.actionsContainer.appendChild(this.buttons),this.unlockButton=this._createButton("Unlock Page","locked"),this.resumeButton=this._createButton("Resume","resume"),this.nextButton=this._createButton("Next Action","step"),this.finishButton=this._createButton("Finish","finish"),this.buttons.appendChild(this.unlockButton),this.buttons.appendChild(this.resumeButton),this.buttons.appendChild(this.nextButton),this.actionsContainer.style.display="none",this._bindClickOnce([this.unlockButton],function(){kt.removeClass(t.unlockButton,"locked"),kt.addClass(t.unlockButton,"unlocked"),Rt.nodeTextContentSetter.call(t.unlockButton.querySelector("span"),"Page unlocked"),t.state.locked=!1,t.emit(t.UNLOCK_PAGE_BTN_CLICK,{})}),this.unlockButton.style.display="none"},Jt.prototype._create=function(){this.statusBar=Re.createElement("div"),kt.addClass(this.statusBar,"status-bar"),this._createIconArea(),this._createInformationArea(),this._createActionsArea(),this.progressBar=new bt(this.infoContainer),this.progressBar.indeterminateIndicator.start(),this.progressBar.show(),r.element().appendChild(this.statusBar),this._bindHandlers(),this.state.created=!0},Jt.prototype._createBeforeReady=function(){var t,e=this;this.state.created||(t=ke).top!==t||(Re.body?this._create():Rt.setTimeout.call(ke,function(){return e._createBeforeReady()},0))},Jt.prototype._animate=function(t){var e,i,n,s=this,o=Rt.dateNow(),a=parseInt(Lt.get(this.statusBar,"opacity"),10)||0;this._stopAnimation(),t&&(Lt.set(this.statusBar,"visibility",""),this.state.hidden=!1),this.animationInterval=Rt.setInterval.call(ke,function(){e=Rt.dateNow()-o,i=Math.min(e/500,1),n=.5-Math.cos(i*Math.PI)/2,Lt.set(s.statusBar,"opacity",a+(t?n:-n)),1===i&&(s._stopAnimation(),t||(Lt.set(s.statusBar,"visibility","hidden"),s.state.hidden=!0),s.state.showing=!1,s.state.hiding=!1)},10)},Jt.prototype._stopAnimation=function(){this.animationInterval&&(Rt.clearInterval.call(ke,this.animationInterval),this.animationInterval=null)},Jt.prototype._fadeOut=function(){this.state.hiding||this.state.debugging||(this.state.showing=!1,this.state.hiding=!0,this._animate())},Jt.prototype._fadeIn=function(){this.state.showing||this.state.debugging||(this.state.hiding=!1,this.state.showing=!0,this._animate(!0))},Jt.prototype._bindHandlers=function(){var e=this;Ft.initElementListening(ke,["resize"]),Ft.addInternalEventBeforeListener(ke,["resize"],function(){e.windowHeight=ke.innerHeight});var i=Lt.getHeight(this.statusBar);Ft.addFirstInternalEventBeforeListener(ke,["mousemove","mouseout","touchmove"],function(t){"mouseout"!==t.type||t.relatedTarget?"mousemove"!==t.type&&"touchmove"!==t.type||(t.clientY>e.windowHeight-i?e._fadeOut(t):e.state.hidden&&e._fadeIn(t)):e._fadeIn(t)})},Jt.prototype._bindClickOnce=function(t,i){var n=this,s=Nt.isTouchDevice?"touchstart":"mousedown",o=function(e){Gt.find(t,function(t){return qt.containsElement(t,e.target)})?(Ht.preventDefault(e),Ft.removeInternalEventBeforeListener(ke,[s],o),i(e)):qt.containsElement(n.statusBar,e.target)&&Ht.preventDefault(e)};Ft.addInternalEventBeforeListener(ke,[s],o)},Jt.prototype._initChildListening=function(){var i=this;Wt.on(Wt.SERVICE_MSG_RECEIVED_EVENT,function(t){var e=t.message;e.cmd===Tt?i.showWaitingElementStatus(e.timeout):e.cmd===Ut?i.hideWaitingElementStatus(e.waitingSuccess).then(function(){return Wt.sendServiceMsg({cmd:Mt},t.source)}):e.cmd===At?i.showWaitingAssertionRetriesStatus(e.timeout):e.cmd===Vt&&i.hideWaitingAssertionRetriesStatus(e.waitingSuccess).then(function(){return Wt.sendServiceMsg({cmd:Dt},t.source)})})},Jt.prototype._resetState=function(){this.state.debugging=!1,this.actionsContainer.style.display="none",this.unlockButton.style.display="none",Rt.nodeTextContentSetter.call(this.statusDiv,this._getFullStatusText("")),this.progressBar.hide()},Jt.prototype._getFullStatusText=function(t){var e=this.contextStorage.getItem(Yt)||"";return e+(e&&t?". ":"")+t},Jt.prototype._showWaitingStatus=function(){var t=this.state.assertionRetries?"Waiting for assertion execution...":"Waiting for element to appear...";Rt.nodeTextContentSetter.call(this.statusDiv,this._getFullStatusText(t)),this.progressBar.show()},Jt.prototype._hideWaitingStatus=function(e){var i=this;return new Pt(function(t){Rt.setTimeout.call(ke,function(){i.state.waiting||i.state.debugging||(kt.removeClass(i.statusBar,Kt),kt.removeClass(i.statusBar,jt),i.progressBar.determinateIndicator.reset(),i._resetState()),t()},e?0:500)})},Jt.prototype._showDebuggingStatus=function(t){var n=this;return new Pt(function(i){n.state.debugging=!0,n.state.locked=!0,t?(n.buttons.removeChild(n.nextButton),n.buttons.removeChild(n.resumeButton),n.buttons.appendChild(n.finishButton),Rt.nodeTextContentSetter.call(n.statusDiv,n._getFullStatusText("Test failed")),kt.removeClass(n.statusBar,Kt),kt.addClass(n.statusBar,jt)):Rt.nodeTextContentSetter.call(n.statusDiv,n._getFullStatusText("Debugging test...")),n.actionsContainer.style.display="",n.unlockButton.style.display="",n._bindClickOnce([n.resumeButton,n.nextButton,n.finishButton],function(t){var e=qt.containsElement(n.nextButton,t.target);n._resetState(),i(e)})})},Jt.prototype._setWaitingStatus=function(t,e){var i=this;this.state.waiting=!0,this.progressBar.determinateIndicator.start(t,e),this.showingTimeout=Rt.setTimeout.call(ke,function(){i.showingTimeout=null,i._showWaitingStatus()},300)},Jt.prototype._resetWaitingStatus=function(t){this.state.waiting=!1,this.progressBar.determinateIndicator.stop(),t?kt.addClass(this.statusBar,Kt):kt.addClass(this.statusBar,jt);var e=this.showingTimeout&&t;return this.showingTimeout&&(Rt.clearTimeout.call(ke,this.showingTimeout),this.showingTimeout=null,t||this._showWaitingStatus()),this._hideWaitingStatus(e)},Jt.prototype.hidePageLoadingStatus=function(){this.state.created||this._create(),this.progressBar.indeterminateIndicator.stop(),this._resetState()},Jt.prototype.showDebuggingStatus=function(t){return this._stopAnimation(),Lt.set(this.statusBar,"opacity",1),Lt.set(this.statusBar,"visibility",""),this.state.hiden=!1,this._showDebuggingStatus(t)},Jt.prototype.showWaitingElementStatus=function(t){this.state.assertionRetries||this._setWaitingStatus(t)},Jt.prototype.hideWaitingElementStatus=function(t){return this.state.assertionRetries?Pt.resolve():this._resetWaitingStatus(t)},Jt.prototype.showWaitingAssertionRetriesStatus=function(t,e){this.state.assertionRetries=!0,this._setWaitingStatus(t,e)},Jt.prototype.hideWaitingAssertionRetriesStatus=function(t){var e=this;return this._resetWaitingStatus(t).then(function(){e.state.assertionRetries=!1})},Jt.prototype.setStatusPrefix=function(t){this.contextStorage.setItem(Yt,t),Rt.nodeTextContentSetter.call(this.statusDiv,this._getFullStatusText(""))},Jt);function Jt(t,e,i,n){var s=Bt.call(this)||this;return s.UNLOCK_PAGE_BTN_CLICK="testcafe|ui|status-bar|unlock-page-btn-click",s.userAgent=t,s.fixtureName=e,s.testName=i,s.contextStorage=n,s.statusBar=null,s.infoContainer=null,s.actionsContainer=null,s.icon=null,s.resumeButton=null,s.finishButton=null,s.nextButton=null,s.statusDiv=null,s.buttons=null,s.progressBar=null,s.animationInterval=null,s.showingTimeout=null,s.windowHeight=Re.documentElement?Lt.getHeight(ke):ke.innerHeight,s.state={created:!1,showing:!1,hiding:!1,debugging:!1,waiting:!1,assertionRetries:!1,hidden:!1},s.currentView=null,s._createBeforeReady(),s._initChildListening(),s}var Qt,Zt=i.sendRequestToFrame,$t=e.eventSandbox.message,te=(st(ee,Qt=Xt),ee.prototype.showWaitingElementStatus=function(t){$t.sendServiceMsg({cmd:Tt,timeout:t},ke.top)},ee.prototype.hideWaitingElementStatus=function(t){return Zt({cmd:Ut,waitingSuccess:t},Mt,ke.top)},ee.prototype.showWaitingAssertionRetriesStatus=function(t){$t.sendServiceMsg({cmd:At,timeout:t},ke.top)},ee.prototype.hideWaitingAssertionRetriesStatus=function(t){return Zt({cmd:Vt,waitingSuccess:t},Dt,ke.top)},ee);function ee(){return Qt.call(this)||this}var ie="ui|cursor|move|request",ne="ui|cursor|leftbuttondown|request",se="ui|cursor|rightbuttondown|request",oe="ui|cursor|buttonup|request",ae="ui|cursor|move|response",re="ui|cursor|leftbuttondown|response",le="ui|cursor|rightbuttondown|response",ue="ui|cursor|buttonup|response",he=e.Promise,ce=e.shadowUI,de=e.utils.browser,pe=e.utils.featureDetection,me=e.eventSandbox.message,ge=i.styleUtils,fe=i.positionUtils,ve="l-mouse-down",ye="r-mouse-down",Ce=[ve,ye].join(" ");me.on(me.SERVICE_MSG_RECEIVED_EVENT,function(t){var e,i=t.message;switch(i.cmd){case ie:e=fe.getIframePointRelativeToParentFrame({x:i.x,y:i.y},t.source),Ee.move(e.x,e.y).then(function(){return me.sendServiceMsg({cmd:ae},t.source)});break;case ne:Ee.leftButtonDown().then(function(){return me.sendServiceMsg({cmd:re},t.source)});break;case se:Ee.rightButtonDown().then(function(){return me.sendServiceMsg({cmd:le},t.source)});break;case oe:Ee.buttonUp().then(function(){return me.sendServiceMsg({cmd:ue},t.source)})}});var Ee={cursorElement:null,x:50,y:50,pointerOffsetX:0,pointerOffsetY:0,_createElement:function(){this.cursorElement=Re.createElement("div"),ce.addClass(this.cursorElement,"cursor"),pe.isTouchDevice&&!de.isIE&&(ce.addClass(this.cursorElement,"touch"),this.pointerOffsetX=Math.ceil(ge.getWidth(this.cursorElement)/2),this.pointerOffsetY=Math.ceil(ge.getHeight(this.cursorElement)/2)),r.element().appendChild(this.cursorElement)},isVisible:function(){return this.cursorElement&&"hidden"!==ge.get(this.cursorElement,"visibility")},hide:function(){this.cursorElement||this._createElement(),ge.set(this.cursorElement,"visibility","hidden")},show:function(){this.cursorElement||this._createElement(),ge.set(this.cursorElement,"visibility","")},move:function(t,e){return this.x=t,this.y=e,this.cursorElement||this._createElement(),ge.set(this.cursorElement,{left:this.x-this.pointerOffsetX+"px",top:this.y-this.pointerOffsetY+"px"}),he.resolve()},leftButtonDown:function(){return this.cursorElement||this._createElement(),ce.removeClass(this.cursorElement,Ce),ce.addClass(this.cursorElement,ve),he.resolve()},rightButtonDown:function(){return this.cursorElement||this._createElement(),ce.removeClass(this.cursorElement,Ce),ce.addClass(this.cursorElement,ye),he.resolve()},buttonUp:function(){return this.cursorElement||this._createElement(),ce.removeClass(this.cursorElement,Ce),he.resolve()}},_e=e.utils.browser.isIE?1:0,we={move:function(t,e){var i={cmd:ie,x:t+_e,y:e+_e};return o.sendRequestToFrame(i,ae,ke.parent)},leftButtonDown:function(){return o.sendRequestToFrame({cmd:ne},re,ke.parent)},rightButtonDown:function(){return o.sendRequestToFrame({cmd:se},le,ke.parent)},buttonUp:function(){return o.sendRequestToFrame({cmd:oe},ue,ke.parent)}},Se={screenshotMark:null,_createMark:function(){this.screenshotMark=Re.createElement("img"),s.shadowUI.addClass(this.screenshotMark,"screenshot-mark"),this.screenshotMark.style.right=10/ke.devicePixelRatio+"px",this.screenshotMark.style.width=32/ke.devicePixelRatio+"px",this.screenshotMark.style.height=10/ke.devicePixelRatio+"px",this.hide(),s.shadowUI.getRoot().appendChild(this.screenshotMark)},hide:function(){this.screenshotMark&&(this.screenshotMark.style.visibility="hidden")},show:function(t){this.screenshotMark||this._createMark(),s.nativeMethods.imageSrcSetter.call(this.screenshotMark,t),this.screenshotMark.style.visibility=""}},Ie=e.Promise,be=e.eventSandbox.message,xe=i.sendRequestToFrame,Be="ui|hide|request",Te="ui|hide|response",Ue="ui|show|request",Me="ui|show|response";be.on(be.SERVICE_MSG_RECEIVED_EVENT,function(t){t.message.cmd===Be?(r.hide(),be.sendServiceMsg({cmd:Te},t.source)):t.message.cmd===Ue&&(r.show(),be.sendServiceMsg({cmd:Me},t.source))});var Ae={};Ae.uiRoot=r,Ae.cursorUI=Ee,Ae.iframeCursorUI=we,Ae.selectElement=n,Ae.modalBackground=H,Ae.ProgressPanel=et,Ae.StatusBar=Xt,Ae.IframeStatusBar=te,Ae.hide=function(t){return t?xe({cmd:Be},Te,ke.top):(r.hide(),Ie.resolve())},Ae.show=function(t){return t?xe({cmd:Ue},Me,ke.top):(r.show(),Ie.resolve())},Ae.showScreenshotMark=function(t){return Se.show(t)},Ae.hideScreenshotMark=function(){return Se.hide()};var Ve=e.nativeMethods,De=e.EVENTS.evalIframeScript;Ve.objectDefineProperty(ke,"%testCafeUI%",{configurable:!0,value:Ae}),e.on(De,function(t){return Pe(Ve.contentWindowGetter.call(t.iframe))})}(ke["%hammerhead%"],ke["%testCafeCore%"],ke["%hammerhead%"].Promise)}(window);
1
+ window["%hammerhead%"].utils.removeInjectedScript(),function Pe(ke){var Re=ke.document;!function(s,o,t){var e="default"in s?s.default:s,i="default"in o?o.default:o;t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;var r={uiRoot:null,element:function(){return this.uiRoot||(this.uiRoot=Re.createElement("div"),s.shadowUI.getRoot().appendChild(this.uiRoot)),this.uiRoot},hide:function(){this.uiRoot&&(this.uiRoot.style.visibility="hidden")},show:function(){this.uiRoot&&(this.uiRoot.style.visibility="")},remove:function(){var t=s.shadowUI.getRoot();s.nativeMethods.nodeParentNodeGetter.call(t).removeChild(t)}},c=e.shadowUI,u=e.utils.browser,a=e.utils.featureDetection,d=e.nativeMethods,h=e.eventSandbox.eventSimulator,l=e.eventSandbox.listeners,p=i.positionUtils,m=i.domUtils,g=i.styleUtils,f=i.eventUtils,v=i.arrayUtils,y="tcOptionList",C="tcOptionGroup",E="tcOption",_="disabled",w=u.isIE?30:20,S=null,I=null,b=[],x=[];function B(t){(t.target||t.srcElement)===S||m.containsElement(S,t.target)||m.containsElement(I,t.target)||M()}function T(t,e,i){var n,s=v.indexOf(x,t.target);s<0||(i(),(n=-1<t.target.className.indexOf(_))&&u.isWebKit||function(t,e){var i=S.selectedIndex,n=S.getElementsByTagName("option")[t],s=!e&&t!==i;s&&!u.isIE&&(S.selectedIndex=t),u.isFirefox||u.isIE||!s||(h.input(S),h.change(S)),(u.isFirefox||u.isIE)&&h.mousedown(u.isFirefox?n:S),a.isTouchDevice||h.mouseup(u.isFirefox?n:S),(u.isFirefox||u.isIE)&&s&&(u.isIE&&(S.selectedIndex=t),u.isIE||h.input(S),h.change(S)),a.isTouchDevice||h.click(u.isFirefox||u.isIE?n:S),e||M()}(s,n))}function U(t,e){for(var i,n,s,o,a,r,l,u=m.getChildrenLength(t),h=0;h<u;h++)m.isOptionElement(t[h])?(o=t[h],a=e,l=r=void 0,r=Re.createElement("div"),l=o.disabled||"optgroup"===m.getTagName(o.parentElement)&&o.parentElement.disabled,d.nodeTextContentSetter.call(r,o.text),a.appendChild(r),c.addClass(r,E),l&&(c.addClass(r,_),g.set(r,"color",g.get(o,"color"))),x.push(r)):"optgroup"===m.getTagName(t[h])&&(i=t[h],n=e,s=void 0,s=Re.createElement("div"),d.nodeTextContentSetter.call(s,i.label||" "),n.appendChild(s),c.addClass(s,C),s.disabled&&(c.addClass(s,_),g.set(s,"color",g.get(i,"color"))),U(i.children,s),b.push(s))}function M(){m.remove(I),f.unbind(Re,"mousedown",B),S=I=null,x=[],b=[]}function A(t){return t?t===S:!!S}var n=Object.freeze({__proto__:null,expandOptionList:function(t){var e=t.children;if(e.length){if(S){var i=t===S;if(M(),i)return}S=t,I=Re.createElement("div"),r.element().appendChild(I),c.addClass(I,y),U(e,I),l.addInternalEventBeforeListener(ke,["click"],T),d.setTimeout.call(ke,function(){f.bind(Re,"mousedown",B)},0),g.set(I,{position:"absolute",fontSize:g.get(S,"fontSize"),fontFamily:g.get(S,"fontFamily"),minWidth:g.getWidth(S)+"px",left:p.getOffsetPosition(S).left+"px",height:m.getSelectVisibleChildren(t).length>w?g.getOptionHeight(t)*w:""});var n,s=p.getOffsetPosition(S).top,o=g.getHeight(I),a=s+g.getHeight(S)+2;a+o>g.getScrollTop(ke)+g.getHeight(ke)&&(n=s-3-o)>=g.getScrollTop(ke)&&(a=n),g.set(I,"top",a+"px")}},collapseOptionList:M,isOptionListExpanded:A,getEmulatedChildElement:function(t){var e="optgroup"===m.getTagName(t),i=m.getElementIndexInParent(S,t);return e?b[i]:x[i]},scrollOptionListByChild:function(t){var e,i,n,s,o,a,r=m.getSelectParent(t);r&&(e=g.getSelectElementSize(r),i=g.getOptionHeight(r),n=0,o=(s=Math.max(g.getScrollTop(r)/i,0))+e-1,(a=m.getChildVisibleIndex(r,t))<s?(n=i*(s-a),g.setScrollTop(r,Math.max(g.getScrollTop(r)-n,0))):o<a&&(n=i*(a-o),g.setScrollTop(r,g.getScrollTop(r)+n)))},getSelectChildCenter:function(t){var e=m.getSelectParent(t);if(!e)return{x:0,y:0};var i=g.getOptionHeight(e),n=p.getElementRectangle(t);return{x:Math.round(n.left+n.width/2),y:Math.round(n.top+i/2)}},switchOptionsByKeys:function(t,e){var i=g.getSelectElementSize(t),n=!g.hasDimensions(c.select("."+y)[0]);if(/down|up/.test(e)||!u.isIE&&(i<=1||u.isFirefox)&&(n||u.isFirefox)&&/left|right/.test(e)){for(var s=t.querySelectorAll("option"),o=[],a=0;a<s.length;a++){var r=s[a].parentElement;s[a].disabled||"optgroup"===m.getTagName(r)&&r.disabled||o.push(s[a])}var l=v.indexOf(o,s[t.selectedIndex])+(/down|right/.test(e)?1:-1);0<=l&&l<o.length&&(t.selectedIndex=v.indexOf(s,o[l]),u.isIE||h.input(t),h.change(t))}},isOptionElementVisible:function(t){var e=m.getSelectParent(t);if(!e)return!0;var i=A(e),n=g.getSelectElementSize(e);return i||1<n}}),V="Loading page...",D="modal-background",P="loading-text",k="loading-icon",R=null,W=null,O=null,N=!1;function F(){function t(){var t=o.styleUtils.getHeight(ke),e=o.styleUtils.getWidth(ke);o.styleUtils.set(R,"width",e+"px"),o.styleUtils.set(R,"height",t+"px"),o.styleUtils.set(O,{left:Math.round((e-o.styleUtils.getWidth(O))/2)+"px",top:Math.round((t-o.styleUtils.getHeight(O))/2)+"px"})}t(),o.eventUtils.bind(ke,"resize",t)}function L(){var t,e,i,n;t=r.element(),R=Re.createElement("div"),t.appendChild(R),s.shadowUI.addClass(R,D),W=Re.createElement("div"),s.nativeMethods.nodeTextContentSetter.call(W,V),t.appendChild(W),s.shadowUI.addClass(W,P),O=Re.createElement("div"),o.styleUtils.set(O,"visibility","hidden"),t.appendChild(O),s.shadowUI.addClass(O,k),F(),e=o.styleUtils.getHeight(ke),i=o.styleUtils.getWidth(ke),(n=!o.styleUtils.hasDimensions(W))&&(o.styleUtils.set(W,"visibility","hidden"),o.styleUtils.set(W,"display","block")),o.styleUtils.set(W,{left:Math.max((i-o.styleUtils.getWidth(W))/2,0)+"px",top:Math.max((e-o.styleUtils.getHeight(W))/2,0)+"px"}),n&&(o.styleUtils.set(W,"display","none"),o.styleUtils.set(W,"visibility","")),N=!0}var H=Object.freeze({__proto__:null,initAndShowLoadingText:function(){function t(){L(),o.styleUtils.set(R,"opacity",.8),o.styleUtils.set(R,"display","block"),o.styleUtils.set(W,"display","block"),e=!0}var e=!1,i=function(){e||(Re.body?t():s.nativeMethods.setTimeout.call(ke,i,0))};i(),o.eventUtils.documentReady().then(function(){e||t()})},show:function(t){N||L(),o.styleUtils.set(R,"opacity",t?0:.7),o.styleUtils.set(R,"display","block")},hide:function(){N&&(o.styleUtils.set(W,"display","none"),o.styleUtils.set(R,"display","none"))},showLoadingIcon:function(){o.styleUtils.set(O,"visibility","visible")},hideLoadingIcon:function(){o.styleUtils.set(O,"visibility","hidden")}}),q=e.shadowUI,z=i.styleUtils,j="success",G=(K.prototype.setValue=function(t){t="number"!=typeof t?0:Math.min(Math.max(t,0),100),z.set(this.valueElement,"width",t+"%")},K.prototype.setSuccess=function(t){t?q.addClass(this.containerElement,j):q.removeClass(this.containerElement,j)},K);function K(t){this.containerElement=Re.createElement("div"),this.valueElement=Re.createElement("div"),t.appendChild(this.containerElement),this.containerElement.appendChild(this.valueElement),q.addClass(this.containerElement,"progress-bar"),q.addClass(this.valueElement,"value")}var Y=e.shadowUI,X=e.nativeMethods,J=i.eventUtils,Q=i.styleUtils,Z="progress-panel",$="title",tt="content",et=(it._getInvisibleElementProperty=function(t,e){var i="none"===Q.get(t,"display");i&&Q.set(t,"display","block");var n=t[e];return i&&Q.set(t,"display","none"),n},it._showAtWindowCenter=function(t){var e=it._getInvisibleElementProperty(t,"offsetHeight"),i=it._getInvisibleElementProperty(t,"offsetWidth"),n=Math.round(Q.getHeight(ke)/2-e/2),s=Math.round(Q.getWidth(ke)/2-i/2);Q.set(t,{left:s+"px",top:n+"px"})},it.prototype._setCurrentProgress=function(){var t=Math.round((X.dateNow()-this.startTime)/this.maxTimeout*100);this.progressBar.setValue(t)},it.prototype._setSuccess=function(t){this.progressBar.setSuccess(t)},it.prototype._stopAnimation=function(){X.clearInterval.call(ke,this.animationInterval)},it.prototype._animate=function(t,e,i,n){var s,o,a,r=this,l=X.dateNow(),u=i?0:1;i&&(Q.set(t,"opacity",u),Q.set(t,"display","block")),this._stopAnimation(),this.animationInterval=X.setInterval.call(ke,function(){s=X.dateNow()-l,o=Math.min(s/e,1),a=.5-Math.cos(o*Math.PI)/2,Q.set(t,"opacity",u+(i?a:-a)),1===o&&(r._stopAnimation(),n&&n())},10)},it.prototype._showPanel=function(){J.bind(ke,"resize",this.disposePanel),this._animate(this.panelDiv,200,!0)},it.prototype._hidePanel=function(t){var e=this;this.startTime=null,J.unbind(ke,"resize",this.disposePanel),this._animate(this.panelDiv,t?0:600,!1,function(){return Q.set(e.panelDiv,"display","none")})},it.prototype.show=function(t,e){var i=this;this.startTime=X.dateNow(),this.maxTimeout=e,X.nodeTextContentSetter.call(this.titleDiv,t),this._setSuccess(!1),this.openingTimeout=X.setTimeout.call(ke,function(){i.openingTimeout=null,i._setCurrentProgress(),i._showPanel(),i.updateInterval=X.setInterval.call(ke,function(){return i._setCurrentProgress()},100)},300)},it.prototype.close=function(t){var e=this;t&&this._setSuccess(!0),this.openingTimeout&&(X.clearTimeout.call(ke,this.openingTimeout),this.openingTimeout=null),this.updateInterval&&(X.clearInterval.call(ke,this.updateInterval),this.updateInterval=null),t?this.startTime&&X.dateNow()-this.startTime<1e3?X.setTimeout.call(ke,function(){X.setTimeout.call(ke,function(){return e._hidePanel(!1)},200)},100):X.setTimeout.call(ke,function(){return e._hidePanel(!1)},200):this._hidePanel(!0)},it);function it(){var t=this;this.startTime=null,this.openingTimeout=null,this.updateInterval=null,this.animationInterval=null,this.panelDiv=Re.createElement("div"),r.element().appendChild(this.panelDiv),this.titleDiv=Re.createElement("div"),this.panelDiv.appendChild(this.titleDiv),this.contentDiv=Re.createElement("div"),this.panelDiv.appendChild(this.contentDiv),Y.addClass(this.panelDiv,Z),Y.addClass(this.titleDiv,$),Y.addClass(this.contentDiv,tt),it._showAtWindowCenter(this.panelDiv),this.progressBar=new G(this.contentDiv),this.disposePanel=function(){return it._showAtWindowCenter(t.panelDiv)}}var nt=function(t,e){return(nt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)};function st(t,e){function i(){this.constructor=t}nt(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var ot=e.shadowUI,at=e.nativeMethods,rt=i.styleUtils,lt="determinate",ut=(ht.prototype._setCurrentProgress=function(){var t=(at.dateNow()-this.startTime)/this.maxTimeout,e=Math.min(Math.max(t,0),1),i=rt.getWidth(this.progressBar),n=Math.round(i*e);rt.set(this.firstValueElement,"width",n+"px")},ht.prototype.start=function(t,e){var i=this;ot.addClass(this.progressBar,lt),this.maxTimeout=t,this.startTime=e||at.dateNow(),this._setCurrentProgress(),this.animationInterval=at.setInterval.call(ke,function(){return i._setCurrentProgress()},10)},ht.prototype.stop=function(){this.animationInterval&&(at.clearInterval.call(ke,this.animationInterval),this.animationInterval=null)},ht.prototype.reset=function(){rt.set(this.firstValueElement,"width",0),ot.removeClass(this.progressBar,lt)},ht);function ht(t,e){this.progressBar=t,this.firstValueElement=e,this.maxTimeout=null,this.startTime=null,this.animationInterval=null}var ct=e.shadowUI,dt=e.nativeMethods,pt=i.styleUtils,mt=i.positionUtils,gt={time:2800,points:[.815,.395],positionByCompletePercent:{0:{left:-35,right:100},.6:{left:100,right:-90},1:{left:100,right:-90}}},ft={time:3e3,points:[.84,1],positionByCompletePercent:{0:{left:-200,right:100},.6:{left:107,right:-8},1:{left:107,right:-8}}},vt=0,yt=.6,Ct=1,Et="indeterminate",_t=(wt._updateValueAnimation=function(t,e,i){var n,s,o,a,r,l,u,h,c,d,p,m,g,f=i.time,v=i.points,y=i.positionByCompletePercent,C=dt.dateNow()-t,E=(n=C/f,s=v[0],o=v[1],3*Math.pow(1-n,2)*n*s+3*(1-n)*n*n*o+n*n*n),_=(h=(l=(a=E)<yt)?yt:Ct,c=(r=y)[u=l?vt:yt],d=r[h],p={x:u,y:c.left},m={x:h,y:d.left},g=mt.getLineYByXCoord(p,m,a),p={x:u,y:c.right},m={x:h,y:d.right},{left:g,right:mt.getLineYByXCoord(p,m,a)}),w=_.left,S=_.right;pt.set(e,"left",Math.round(w)+"%"),pt.set(e,"right",Math.round(S)+"%")},wt.prototype._clearFirstValueAnimation=function(){this.animationInterval&&(dt.clearInterval.call(ke,this.animationInterval),this.animationInterval=null),pt.set(this.firstValue,"left","-35%"),pt.set(this.firstValue,"right","100%")},wt.prototype._clearSecondValueAnimation=function(){this.secondValueAnimationInterval&&(dt.clearInterval.call(ke,this.secondValueAnimationInterval),this.secondValueAnimationInterval=null),pt.set(this.secondValue,"left","-200%"),pt.set(this.secondValue,"right","100%")},wt.prototype._startFirstValueAnimation=function(){var t=this;this._clearFirstValueAnimation();var e=dt.dateNow();this.animationInterval=dt.setInterval.call(ke,function(){wt._updateValueAnimation(e,t.firstValue,gt)},10)},wt.prototype._startSecondValueAnimation=function(){var t=this;this._clearSecondValueAnimation();var e=dt.dateNow();this.secondValueAnimationInterval=dt.setInterval.call(ke,function(){wt._updateValueAnimation(e,t.secondValue,ft)},10)},wt.prototype._startAnimation=function(){var t=this;this._startFirstValueAnimation(),this.secondValueAnimationTimeout=dt.setTimeout.call(ke,function(){return t._startSecondValueAnimation()},1e3),this.restartAnimationTimeout=dt.setTimeout.call(ke,function(){return t._startAnimation()},1950)},wt.prototype._stopAnimation=function(){this._clearFirstValueAnimation(),this._clearSecondValueAnimation(),this.secondValueAnimationTimeout&&(dt.clearInterval.call(ke,this.secondValueAnimationTimeout),this.secondValueAnimationTimeout=null),this.restartAnimationTimeout&&(dt.clearInterval.call(ke,this.restartAnimationTimeout),this.restartAnimationTimeout=null)},wt.prototype.start=function(){ct.addClass(this.progressBar,Et),this._startAnimation()},wt.prototype.stop=function(){ct.removeClass(this.progressBar,Et),this._stopAnimation()},wt);function wt(t,e,i){this.progressBar=t,this.firstValue=e,this.secondValue=i,this.animationInterval=null,this.secondValueAnimationInterval=null,this.secondValueAnimationTimeout=null,this.restartAnimationTimeout=null}var St=e.shadowUI,It=i.styleUtils,bt=(xt.prototype._create=function(t){this.progressBar=Re.createElement("div"),St.addClass(this.progressBar,"progress-bar"),t.appendChild(this.progressBar);var e=Re.createElement("div");St.addClass(e,"value-container"),this.progressBar.appendChild(e),this.firstValueElement=Re.createElement("div"),St.addClass(this.firstValueElement,"value"),e.appendChild(this.firstValueElement),this.secondValueElement=Re.createElement("div"),St.addClass(this.secondValueElement,"value"),e.appendChild(this.secondValueElement)},xt.prototype.show=function(){It.set(this.progressBar,"visibility","visible")},xt.prototype.hide=function(){It.set(this.progressBar,"visibility","hidden")},xt);function xt(t){this.progressBar=null,this.firstValueElement=null,this.secondValueElement=null,this._create(t),this.determinateIndicator=new ut(this.progressBar,this.firstValueElement),this.indeterminateIndicator=new _t(this.progressBar,this.firstValueElement,this.secondValueElement)}var Bt,Tt="start-waiting-element",Ut="end-waiting-element-request",Mt="end-waiting-element-response",At="start-waiting-assertion-retries",Vt="end-waiting-assertion-retries-request",Dt="end-waiting-assertion-retries-response",Pt=e.Promise,kt=e.shadowUI,Rt=e.nativeMethods,Wt=e.eventSandbox.message,Ot=e.utils.browser,Nt=e.utils.featureDetection,Ft=e.eventSandbox.listeners,Lt=i.styleUtils,Ht=i.eventUtils,qt=i.domUtils,zt=i.serviceUtils,jt=i.arrayUtils,Gt="waiting-element-failed",Kt="waiting-element-success",Yt="%testCafeStatusPrefix%",Xt=(st(Jt,Bt=zt.EventEmitter),Jt.prototype._createButton=function(t,e){var i=Re.createElement("div"),n=Re.createElement("div"),s=Re.createElement("span");return Rt.nodeTextContentSetter.call(s,t),kt.addClass(i,"button"),kt.addClass(i,e),kt.addClass(n,"button-icon"),Ot.isSafari&&(s.style.position="relative",s.style.top="1px"),i.appendChild(n),i.appendChild(s),i},Jt.prototype._createIconArea=function(){this.icon=Re.createElement("div"),kt.addClass(this.icon,"icon"),this.statusBar.appendChild(this.icon)},Jt.prototype._createInformationArea=function(){this.infoContainer=Re.createElement("div"),kt.addClass(this.infoContainer,"info-container"),this.statusBar.appendChild(this.infoContainer);var t=Re.createElement("div");kt.addClass(t,"info-text-container"),this.infoContainer.appendChild(t);var e=Re.createElement("div");kt.addClass(e,"status-container"),t.appendChild(e),this.statusDiv=Re.createElement("div"),this.statusDiv=Re.createElement("div"),Rt.nodeTextContentSetter.call(this.statusDiv,this._getFullStatusText("Loading Web Page...")),kt.addClass(this.statusDiv,"status"),kt.addClass(this.statusDiv,"info"),e.appendChild(this.statusDiv);var i=Re.createElement("div");Rt.nodeTextContentSetter.call(i,this.fixtureName+" - "+this.testName),kt.addClass(i,"fixture"),kt.addClass(i,"info"),e.appendChild(i);var n=Re.createElement("div");Rt.nodeTextContentSetter.call(n,this.userAgent),kt.addClass(n,"user-agent"),t.appendChild(n)},Jt.prototype._createActionsArea=function(){var t=this;this.actionsContainer=Re.createElement("div"),kt.addClass(this.actionsContainer,"actions-container"),this.statusBar.appendChild(this.actionsContainer),this.buttons=Re.createElement("div"),kt.addClass(this.buttons,"buttons"),this.actionsContainer.appendChild(this.buttons),this.unlockButton=this._createButton("Unlock Page","locked"),this.resumeButton=this._createButton("Resume","resume"),this.nextButton=this._createButton("Next Action","step"),this.finishButton=this._createButton("Finish","finish"),this.buttons.appendChild(this.unlockButton),this.buttons.appendChild(this.resumeButton),this.buttons.appendChild(this.nextButton),this.actionsContainer.style.display="none",this._bindClickOnce([this.unlockButton],function(){kt.removeClass(t.unlockButton,"locked"),kt.addClass(t.unlockButton,"unlocked"),Rt.nodeTextContentSetter.call(t.unlockButton.querySelector("span"),"Page unlocked"),t.state.locked=!1,t.emit(t.UNLOCK_PAGE_BTN_CLICK,{})}),this.unlockButton.style.display="none"},Jt.prototype._create=function(){this.statusBar=Re.createElement("div"),kt.addClass(this.statusBar,"status-bar"),this._createIconArea(),this._createInformationArea(),this._createActionsArea(),this.progressBar=new bt(this.infoContainer),this.progressBar.indeterminateIndicator.start(),this.progressBar.show(),r.element().appendChild(this.statusBar),this._bindHandlers(),this.state.created=!0},Jt.prototype._createBeforeReady=function(){var t,e=this;this.state.created||(t=ke).top!==t||(Re.body?this._create():Rt.setTimeout.call(ke,function(){return e._createBeforeReady()},0))},Jt.prototype._animate=function(t){var e,i,n,s=this,o=Rt.dateNow(),a=parseInt(Lt.get(this.statusBar,"opacity"),10)||0;this._stopAnimation(),t&&(Lt.set(this.statusBar,"visibility",""),this.state.hidden=!1),this.animationInterval=Rt.setInterval.call(ke,function(){e=Rt.dateNow()-o,i=Math.min(e/500,1),n=.5-Math.cos(i*Math.PI)/2,Lt.set(s.statusBar,"opacity",a+(t?n:-n)),1===i&&(s._stopAnimation(),t||(Lt.set(s.statusBar,"visibility","hidden"),s.state.hidden=!0),s.state.showing=!1,s.state.hiding=!1)},10)},Jt.prototype._stopAnimation=function(){this.animationInterval&&(Rt.clearInterval.call(ke,this.animationInterval),this.animationInterval=null)},Jt.prototype._fadeOut=function(){this.state.hiding||this.state.debugging||(this.state.showing=!1,this.state.hiding=!0,this._animate())},Jt.prototype._fadeIn=function(){this.state.showing||this.state.debugging||(this.state.hiding=!1,this.state.showing=!0,this._animate(!0))},Jt.prototype._bindHandlers=function(){var e=this;Ft.initElementListening(ke,["resize"]),Ft.addInternalEventBeforeListener(ke,["resize"],function(){e.windowHeight=ke.innerHeight});var i=Lt.getHeight(this.statusBar);Ft.addFirstInternalEventBeforeListener(ke,["mousemove","mouseout","touchmove"],function(t){"mouseout"!==t.type||t.relatedTarget?"mousemove"!==t.type&&"touchmove"!==t.type||(t.clientY>e.windowHeight-i?e._fadeOut(t):e.state.hidden&&e._fadeIn(t)):e._fadeIn(t)})},Jt.prototype._bindClickOnce=function(t,i){var n=this,s=Nt.isTouchDevice?"touchstart":"mousedown",o=function(e){jt.find(t,function(t){return qt.containsElement(t,e.target)})?(Ht.preventDefault(e),Ft.removeInternalEventBeforeListener(ke,[s],o),i(e)):qt.containsElement(n.statusBar,e.target)&&Ht.preventDefault(e)};Ft.addInternalEventBeforeListener(ke,[s],o)},Jt.prototype._initChildListening=function(){var i=this;Wt.on(Wt.SERVICE_MSG_RECEIVED_EVENT,function(t){var e=t.message;e.cmd===Tt?i.showWaitingElementStatus(e.timeout):e.cmd===Ut?i.hideWaitingElementStatus(e.waitingSuccess).then(function(){return Wt.sendServiceMsg({cmd:Mt},t.source)}):e.cmd===At?i.showWaitingAssertionRetriesStatus(e.timeout):e.cmd===Vt&&i.hideWaitingAssertionRetriesStatus(e.waitingSuccess).then(function(){return Wt.sendServiceMsg({cmd:Dt},t.source)})})},Jt.prototype._resetState=function(){this.state.debugging=!1,this.actionsContainer.style.display="none",this.unlockButton.style.display="none",Rt.nodeTextContentSetter.call(this.statusDiv,this._getFullStatusText("")),this.progressBar.hide()},Jt.prototype._getFullStatusText=function(t){var e=this.contextStorage.getItem(Yt)||"";return e+(e&&t?". ":"")+t},Jt.prototype._showWaitingStatus=function(){var t=this.state.assertionRetries?"Waiting for assertion execution...":"Waiting for element to appear...";Rt.nodeTextContentSetter.call(this.statusDiv,this._getFullStatusText(t)),this.progressBar.show()},Jt.prototype._hideWaitingStatus=function(e){var i=this;return new Pt(function(t){Rt.setTimeout.call(ke,function(){i.state.waiting||i.state.debugging||(kt.removeClass(i.statusBar,Kt),kt.removeClass(i.statusBar,Gt),i.progressBar.determinateIndicator.reset(),i._resetState()),t()},e?0:500)})},Jt.prototype._showDebuggingStatus=function(t){var n=this;return new Pt(function(i){n.state.debugging=!0,n.state.locked=!0,t?(n.buttons.removeChild(n.nextButton),n.buttons.removeChild(n.resumeButton),n.buttons.appendChild(n.finishButton),Rt.nodeTextContentSetter.call(n.statusDiv,n._getFullStatusText("Test failed")),kt.removeClass(n.statusBar,Kt),kt.addClass(n.statusBar,Gt)):Rt.nodeTextContentSetter.call(n.statusDiv,n._getFullStatusText("Debugging test...")),n.actionsContainer.style.display="",n.unlockButton.style.display="",n._bindClickOnce([n.resumeButton,n.nextButton,n.finishButton],function(t){var e=qt.containsElement(n.nextButton,t.target);n._resetState(),i(e)})})},Jt.prototype._setWaitingStatus=function(t,e){var i=this;this.state.waiting=!0,this.progressBar.determinateIndicator.start(t,e),this.showingTimeout=Rt.setTimeout.call(ke,function(){i.showingTimeout=null,i._showWaitingStatus()},300)},Jt.prototype._resetWaitingStatus=function(t){this.state.waiting=!1,this.progressBar.determinateIndicator.stop(),t?kt.addClass(this.statusBar,Kt):kt.addClass(this.statusBar,Gt);var e=this.showingTimeout&&t;return this.showingTimeout&&(Rt.clearTimeout.call(ke,this.showingTimeout),this.showingTimeout=null,t||this._showWaitingStatus()),this._hideWaitingStatus(e)},Jt.prototype.hidePageLoadingStatus=function(){this.state.created||this._create(),this.progressBar.indeterminateIndicator.stop(),this._resetState()},Jt.prototype.showDebuggingStatus=function(t){return this._stopAnimation(),Lt.set(this.statusBar,"opacity",1),Lt.set(this.statusBar,"visibility",""),this.state.hiden=!1,this._showDebuggingStatus(t)},Jt.prototype.showWaitingElementStatus=function(t){this.state.assertionRetries||this._setWaitingStatus(t)},Jt.prototype.hideWaitingElementStatus=function(t){return this.state.assertionRetries?Pt.resolve():this._resetWaitingStatus(t)},Jt.prototype.showWaitingAssertionRetriesStatus=function(t,e){this.state.assertionRetries=!0,this._setWaitingStatus(t,e)},Jt.prototype.hideWaitingAssertionRetriesStatus=function(t){var e=this;return this._resetWaitingStatus(t).then(function(){e.state.assertionRetries=!1})},Jt.prototype.setStatusPrefix=function(t){this.contextStorage.setItem(Yt,t),Rt.nodeTextContentSetter.call(this.statusDiv,this._getFullStatusText(""))},Jt);function Jt(t,e,i,n){var s=Bt.call(this)||this;return s.UNLOCK_PAGE_BTN_CLICK="testcafe|ui|status-bar|unlock-page-btn-click",s.userAgent=t,s.fixtureName=e,s.testName=i,s.contextStorage=n,s.statusBar=null,s.infoContainer=null,s.actionsContainer=null,s.icon=null,s.resumeButton=null,s.finishButton=null,s.nextButton=null,s.statusDiv=null,s.buttons=null,s.progressBar=null,s.animationInterval=null,s.showingTimeout=null,s.windowHeight=Re.documentElement?Lt.getHeight(ke):ke.innerHeight,s.state={created:!1,showing:!1,hiding:!1,debugging:!1,waiting:!1,assertionRetries:!1,hidden:!1},s.currentView=null,s._createBeforeReady(),s._initChildListening(),s}var Qt,Zt=i.sendRequestToFrame,$t=e.eventSandbox.message,te=(st(ee,Qt=Xt),ee.prototype.showWaitingElementStatus=function(t){$t.sendServiceMsg({cmd:Tt,timeout:t},ke.top)},ee.prototype.hideWaitingElementStatus=function(t){return Zt({cmd:Ut,waitingSuccess:t},Mt,ke.top)},ee.prototype.showWaitingAssertionRetriesStatus=function(t){$t.sendServiceMsg({cmd:At,timeout:t},ke.top)},ee.prototype.hideWaitingAssertionRetriesStatus=function(t){return Zt({cmd:Vt,waitingSuccess:t},Dt,ke.top)},ee);function ee(){return Qt.call(this)||this}var ie="ui|cursor|move|request",ne="ui|cursor|leftbuttondown|request",se="ui|cursor|rightbuttondown|request",oe="ui|cursor|buttonup|request",ae="ui|cursor|move|response",re="ui|cursor|leftbuttondown|response",le="ui|cursor|rightbuttondown|response",ue="ui|cursor|buttonup|response",he=e.Promise,ce=e.shadowUI,de=e.utils.browser,pe=e.utils.featureDetection,me=e.eventSandbox.message,ge=i.styleUtils,fe=i.positionUtils,ve="l-mouse-down",ye="r-mouse-down",Ce=[ve,ye].join(" ");me.on(me.SERVICE_MSG_RECEIVED_EVENT,function(t){var e,i=t.message;switch(i.cmd){case ie:e=fe.getIframePointRelativeToParentFrame({x:i.x,y:i.y},t.source),Ee.move(e.x,e.y).then(function(){return me.sendServiceMsg({cmd:ae},t.source)});break;case ne:Ee.leftButtonDown().then(function(){return me.sendServiceMsg({cmd:re},t.source)});break;case se:Ee.rightButtonDown().then(function(){return me.sendServiceMsg({cmd:le},t.source)});break;case oe:Ee.buttonUp().then(function(){return me.sendServiceMsg({cmd:ue},t.source)})}});var Ee={cursorElement:null,x:50,y:50,pointerOffsetX:0,pointerOffsetY:0,_createElement:function(){this.cursorElement=Re.createElement("div"),ce.addClass(this.cursorElement,"cursor"),pe.isTouchDevice&&!de.isIE&&(ce.addClass(this.cursorElement,"touch"),this.pointerOffsetX=Math.ceil(ge.getWidth(this.cursorElement)/2),this.pointerOffsetY=Math.ceil(ge.getHeight(this.cursorElement)/2)),r.element().appendChild(this.cursorElement)},isVisible:function(){return this.cursorElement&&"hidden"!==ge.get(this.cursorElement,"visibility")},hide:function(){this.cursorElement||this._createElement(),ge.set(this.cursorElement,"visibility","hidden")},show:function(){this.cursorElement||this._createElement(),ge.set(this.cursorElement,"visibility","")},move:function(t,e){return this.x=t,this.y=e,this.cursorElement||this._createElement(),ge.set(this.cursorElement,{left:this.x-this.pointerOffsetX+"px",top:this.y-this.pointerOffsetY+"px"}),he.resolve()},leftButtonDown:function(){return this.cursorElement||this._createElement(),ce.removeClass(this.cursorElement,Ce),ce.addClass(this.cursorElement,ve),he.resolve()},rightButtonDown:function(){return this.cursorElement||this._createElement(),ce.removeClass(this.cursorElement,Ce),ce.addClass(this.cursorElement,ye),he.resolve()},buttonUp:function(){return this.cursorElement||this._createElement(),ce.removeClass(this.cursorElement,Ce),he.resolve()}},_e=e.utils.browser.isIE?1:0,we={move:function(t,e){var i={cmd:ie,x:t+_e,y:e+_e};return o.sendRequestToFrame(i,ae,ke.parent)},leftButtonDown:function(){return o.sendRequestToFrame({cmd:ne},re,ke.parent)},rightButtonDown:function(){return o.sendRequestToFrame({cmd:se},le,ke.parent)},buttonUp:function(){return o.sendRequestToFrame({cmd:oe},ue,ke.parent)}},Se={screenshotMark:null,_createMark:function(){this.screenshotMark=Re.createElement("img"),s.shadowUI.addClass(this.screenshotMark,"screenshot-mark"),this.screenshotMark.style.right=10/ke.devicePixelRatio+"px",this.screenshotMark.style.width=32/ke.devicePixelRatio+"px",this.screenshotMark.style.height=10/ke.devicePixelRatio+"px",this.hide(),s.shadowUI.getRoot().appendChild(this.screenshotMark)},hide:function(){this.screenshotMark&&(this.screenshotMark.style.visibility="hidden")},show:function(t){this.screenshotMark||this._createMark(),s.nativeMethods.imageSrcSetter.call(this.screenshotMark,t),this.screenshotMark.style.visibility=""}},Ie=e.Promise,be=e.eventSandbox.message,xe=i.sendRequestToFrame,Be="ui|hide|request",Te="ui|hide|response",Ue="ui|show|request",Me="ui|show|response";be.on(be.SERVICE_MSG_RECEIVED_EVENT,function(t){t.message.cmd===Be?(r.hide(),be.sendServiceMsg({cmd:Te},t.source)):t.message.cmd===Ue&&(r.show(),be.sendServiceMsg({cmd:Me},t.source))});var Ae={};Ae.uiRoot=r,Ae.cursorUI=Ee,Ae.iframeCursorUI=we,Ae.selectElement=n,Ae.modalBackground=H,Ae.ProgressPanel=et,Ae.StatusBar=Xt,Ae.IframeStatusBar=te,Ae.hide=function(t){return t?xe({cmd:Be},Te,ke.top):(r.hide(),Ie.resolve())},Ae.show=function(t){return t?xe({cmd:Ue},Me,ke.top):(r.show(),Ie.resolve())},Ae.showScreenshotMark=function(t){return Se.show(t)},Ae.hideScreenshotMark=function(){return Se.hide()};var Ve=e.nativeMethods,De=e.EVENTS.evalIframeScript;Ve.objectDefineProperty(ke,"%testCafeUI%",{configurable:!0,value:Ae}),e.on(De,function(t){return Pe(Ve.contentWindowGetter.call(t.iframe))})}(ke["%hammerhead%"],ke["%testCafeCore%"],ke["%hammerhead%"].Promise)}(window);
@@ -1,42 +1,42 @@
1
- <svg xmlns="http://www.w3.org/2000/svg">
2
- <defs>
3
- <style>
4
- .sprite{display:none}.sprite:target{display:inline}
5
- </style>
6
- </defs>
7
- <g class="sprite" id="logo-icon">
8
- <svg width="40" height="26" viewBox="0 0 40 26" fill="none">
9
- <path fill-rule="evenodd" clip-rule="evenodd" d="M30.3446 17.7898H24.1379L22.7585 19.1579H28.9656L34.4826 23.9475H5.51742L11.0344 19.1579H15.8621L14.4826 17.7898H9.65537L0 26H40L30.3446 17.7898Z" fill="white"/>
10
- <path fill-rule="evenodd" clip-rule="evenodd" d="M37.2416 3.42102L33.7933 0L19.3103 14.3684L13.7933 8.89492L10.3447 12.3159L19.3103 21.2109L37.2416 3.42102Z" fill="#36B6E5"/>
11
- </svg>
12
- </g>
13
- <g class="sprite" id="finish">
14
- <svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
15
- <rect width="2.02408" height="8.05393" transform="matrix(0.699638 -0.714497 0.699639 0.714497 7 15.2456)" fill="white"/>
16
- <rect width="12.7588" height="2.02408" transform="matrix(0.70062 -0.713534 0.700621 0.713534 12.6428 18.1038)" fill="white"/>
17
- </svg>
18
- </g>
19
- <g class="sprite" id="step">
20
- <svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
21
- <path d="M10 8L19 15L10 22V8Z" fill="white"/>
22
- <rect x="19" y="8" width="2" height="14" fill="white"/>
23
- </svg>
24
- </g>
25
- <g class="sprite" id="locked">
26
- <svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
27
- <rect x="9" y="15" width="12" height="7" rx="1" fill="white"/>
28
- <path fill-rule="evenodd" clip-rule="evenodd" d="M17 15V11C17 9.89543 16.1046 9 15 9C13.8954 9 13 9.89543 13 11V15H11V11C11 8.79086 12.7909 7 15 7C17.2091 7 19 8.79086 19 11V15H17Z" fill="white"/>
29
- </svg>
30
- </g>
31
- <g class="sprite" id="unlocked">
32
- <svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
33
- <path d="M9 15C9 14.4477 9.44772 14 10 14H20C20.5523 14 21 14.4477 21 15V21C21 21.5523 20.5523 22 20 22H10C9.44772 22 9 21.5523 9 21V15Z" fill="white"/>
34
- <path fill-rule="evenodd" clip-rule="evenodd" d="M17.1519 11V8C17.1519 6.89543 16.2564 6 15.1519 6C14.0473 6 13.1519 6.89543 13.1519 8V14.0429C13.1519 14.7186 13.4869 15.3161 14 15.6781V17.8746C12.3523 17.38 11.1519 15.8517 11.1519 14.0429V8C11.1519 5.79086 12.9427 4 15.1519 4C17.361 4 19.1519 5.79086 19.1519 8V11H17.1519Z" fill="white"/>
35
- </svg>
36
- </g>
37
- <g class="sprite" id="resume">
38
- <svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
39
- <path d="M11 8L20 15L11 22V8Z" fill="white"/>
40
- </svg>
41
- </g>
42
- </svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg">
2
+ <defs>
3
+ <style>
4
+ .sprite{display:none}.sprite:target{display:inline}
5
+ </style>
6
+ </defs>
7
+ <g class="sprite" id="logo-icon">
8
+ <svg width="40" height="26" viewBox="0 0 40 26" fill="none">
9
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M30.3446 17.7898H24.1379L22.7585 19.1579H28.9656L34.4826 23.9475H5.51742L11.0344 19.1579H15.8621L14.4826 17.7898H9.65537L0 26H40L30.3446 17.7898Z" fill="white"/>
10
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M37.2416 3.42102L33.7933 0L19.3103 14.3684L13.7933 8.89492L10.3447 12.3159L19.3103 21.2109L37.2416 3.42102Z" fill="#36B6E5"/>
11
+ </svg>
12
+ </g>
13
+ <g class="sprite" id="finish">
14
+ <svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
15
+ <rect width="2.02408" height="8.05393" transform="matrix(0.699638 -0.714497 0.699639 0.714497 7 15.2456)" fill="white"/>
16
+ <rect width="12.7588" height="2.02408" transform="matrix(0.70062 -0.713534 0.700621 0.713534 12.6428 18.1038)" fill="white"/>
17
+ </svg>
18
+ </g>
19
+ <g class="sprite" id="step">
20
+ <svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
21
+ <path d="M10 8L19 15L10 22V8Z" fill="white"/>
22
+ <rect x="19" y="8" width="2" height="14" fill="white"/>
23
+ </svg>
24
+ </g>
25
+ <g class="sprite" id="locked">
26
+ <svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
27
+ <rect x="9" y="15" width="12" height="7" rx="1" fill="white"/>
28
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M17 15V11C17 9.89543 16.1046 9 15 9C13.8954 9 13 9.89543 13 11V15H11V11C11 8.79086 12.7909 7 15 7C17.2091 7 19 8.79086 19 11V15H17Z" fill="white"/>
29
+ </svg>
30
+ </g>
31
+ <g class="sprite" id="unlocked">
32
+ <svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
33
+ <path d="M9 15C9 14.4477 9.44772 14 10 14H20C20.5523 14 21 14.4477 21 15V21C21 21.5523 20.5523 22 20 22H10C9.44772 22 9 21.5523 9 21V15Z" fill="white"/>
34
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M17.1519 11V8C17.1519 6.89543 16.2564 6 15.1519 6C14.0473 6 13.1519 6.89543 13.1519 8V14.0429C13.1519 14.7186 13.4869 15.3161 14 15.6781V17.8746C12.3523 17.38 11.1519 15.8517 11.1519 14.0429V8C11.1519 5.79086 12.9427 4 15.1519 4C17.361 4 19.1519 5.79086 19.1519 8V11H17.1519Z" fill="white"/>
35
+ </svg>
36
+ </g>
37
+ <g class="sprite" id="resume">
38
+ <svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
39
+ <path d="M11 8L20 15L11 22V8Z" fill="white"/>
40
+ </svg>
41
+ </g>
42
+ </svg>
@@ -1,6 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- /*global Symbol*/
4
- exports.default = Symbol('functionBuilder');
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ /*global Symbol*/
4
+ exports.default = Symbol('functionBuilder');
5
5
  module.exports = exports.default;
6
6
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVpbGRlci1zeW1ib2wuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY2xpZW50LWZ1bmN0aW9ucy9idWlsZGVyLXN5bWJvbC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLGlCQUFpQjtBQUNqQixrQkFBZSxNQUFNLENBQUMsaUJBQWlCLENBQUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qZ2xvYmFsIFN5bWJvbCovXG5leHBvcnQgZGVmYXVsdCBTeW1ib2woJ2Z1bmN0aW9uQnVpbGRlcicpO1xuIl19