Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: use Infinity width for non-TTY streams (#6930)
* Use TC_DEFAULT_VIEWPORT_WIDTH env var to allow overriding of DEFAULT_VIEWPORT_WIDTH in get-viewport-width.ts (5919) * use infinity value for non-tty streams * update etalons * update etalons 2 Co-authored-by: Bas van Erp <bas.van.erp@politie.nl> Co-authored-by: MargaritaLoseva <margarita.loseva@devexpress.com> Co-authored-by: miherlosev <miherlosev@mail.ru>
- Loading branch information
1 parent
b2d452c
commit 5d6574a
Showing
52 changed files
with
63 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
import tty, { WriteStream } from 'tty'; | ||
import { Stream } from 'stream'; | ||
|
||
const DEFAULT_VIEWPORT_WIDTH = 78; | ||
const DEFAULT_VIEWPORT_WIDTH_TTY = 78; | ||
|
||
export default function (outStream: Stream): number { | ||
if (outStream === process.stdout && tty.isatty(1)) { | ||
const detectedViewportWidth = process.stdout.getWindowSize ? | ||
process.stdout.getWindowSize()[0] : | ||
(tty as unknown as WriteStream).getWindowSize()[1]; | ||
|
||
return Math.max(detectedViewportWidth, DEFAULT_VIEWPORT_WIDTH); | ||
return Math.max(detectedViewportWidth, DEFAULT_VIEWPORT_WIDTH_TTY); | ||
} | ||
|
||
return DEFAULT_VIEWPORT_WIDTH; | ||
return Infinity; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 1 addition & 3 deletions
4
test/server/data/expected-legacy-test-run-errors/empty-first-argument
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
test/server/data/expected-legacy-test-run-errors/incorrect-wait-for-action-event-argument
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
test/server/data/expected-legacy-test-run-errors/invisible-action-element
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
test/server/data/expected-legacy-test-run-errors/multiple-iframe-argument
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
Error at step "Step with <tag>": | ||
The selector within the inIFrame function returns more than one iframe | ||
element. | ||
The selector within the inIFrame function returns more than one iframe element. | ||
|
||
Browser: Chrome 15.0.874.120 / macOS 10.15 | ||
Screenshot: /unix/path/with/<tag> |
3 changes: 1 addition & 2 deletions
3
test/server/data/expected-legacy-test-run-errors/store-dom-node-or-jquery-object
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
Error at step "Step with <tag>": | ||
It is not allowed to share the DOM element, jQuery object or a function | ||
between test steps via "this" object. | ||
It is not allowed to share the DOM element, jQuery object or a function between test steps via "this" object. | ||
|
||
Browser: Chrome 15.0.874.120 / macOS 10.15 | ||
Screenshot: /unix/path/with/<tag> |
2 changes: 1 addition & 1 deletion
2
test/server/data/expected-test-run-errors/action-additional-element-not-found-error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
...er/data/expected-test-run-errors/action-additional-selector-matches-wrong-node-type-error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
test/server/data/expected-test-run-errors/action-boolean-argument-error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
test/server/data/expected-test-run-errors/action-boolean-option-error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
test/server/data/expected-test-run-errors/action-cookie-argument-error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
test/server/data/expected-test-run-errors/action-cookie-arguments-error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
test/server/data/expected-test-run-errors/action-date-option-error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 1 addition & 3 deletions
4
test/server/data/expected-test-run-errors/action-element-non-content-editable-error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
test/server/data/expected-test-run-errors/action-element-non-editable-error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
test/server/data/expected-test-run-errors/action-element-not-found-error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
test/server/data/expected-test-run-errors/action-invalid-scroll-target-error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
test/server/data/expected-test-run-errors/action-non-empty-string-array-argument-error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
test/server/data/expected-test-run-errors/action-number-option-error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
test/server/data/expected-test-run-errors/action-options-type-error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 1 addition & 3 deletions
4
test/server/data/expected-test-run-errors/action-root-container-not-found-error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
test/server/data/expected-test-run-errors/action-selector-matches-wrong-node-type-error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
test/server/data/expected-test-run-errors/action-speed-option-error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
test/server/data/expected-test-run-errors/action-string-array-element-error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
test/server/data/expected-test-run-errors/action-string-option-error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 1 addition & 3 deletions
4
test/server/data/expected-test-run-errors/action-unsupported-device-type-error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
test/server/data/expected-test-run-errors/assertion-executable-argument-error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
test/server/data/expected-test-run-errors/assertion-unawaited-promise-error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 1 addition & 3 deletions
4
test/server/data/expected-test-run-errors/cannot-close-window-without-parent-error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 2 additions & 3 deletions
5
.../data/expected-test-run-errors/cannot-obtain-info-for-element-specified-by-selector-error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
test/server/data/expected-test-run-errors/client-function-execution-interruption-error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
test/server/data/expected-test-run-errors/dom-node-client-function-result-error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
...erver/data/expected-test-run-errors/external-assertion-library-errors/builtin/equal/array
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
...rver/data/expected-test-run-errors/external-assertion-library-errors/builtin/equal/buffer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
...rver/data/expected-test-run-errors/external-assertion-library-errors/builtin/equal/object
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
test/server/data/expected-test-run-errors/invalid-element-screenshot-dimensions-error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 1 addition & 3 deletions
4
test/server/data/expected-test-run-errors/invalid-selector-result-error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
test/server/data/expected-test-run-errors/multiple-windows-mode-is-disabled-error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 1 addition & 3 deletions
4
...a/expected-test-run-errors/multiple-windows-mode-is-not-available-in-remote-browser-error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 1 addition & 3 deletions
4
test/server/data/expected-test-run-errors/native-dialog-not-handled-error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
test/server/data/expected-test-run-errors/parent-window-not-found-error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
test/server/data/expected-test-run-errors/previous-window-not-found-error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
test/server/data/expected-test-run-errors/set-native-dialog-handler-code-wrong-type-error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
...a/expected-test-run-errors/uncaught-error-in-custom-client-script-code-loaded-from-module
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
test/server/data/expected-test-run-errors/uncaught-error-in-native-dialog-handler
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 2 additions & 4 deletions
6
test/server/data/expected-test-run-errors/uncaught-js-error-on-page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.