askui 0.2.3 → 0.2.4

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.
@@ -1,4 +1,7 @@
1
1
  import { CustomElementJson } from '../core/model/test-case-dto';
2
+ export declare enum Separators {
3
+ STRING = "<|string|>"
4
+ }
2
5
  export declare type PC_KEY = 'backspace' | 'delete' | 'enter' | 'tab' | 'escape' | 'up' | 'down' | 'right' | 'left' | 'home' | 'end' | 'pageup' | 'pagedown' | 'f1' | 'f2' | 'f3' | 'f4' | 'f5' | 'f6' | 'f7' | 'f8' | 'f9' | 'f10' | 'f11' | 'f12' | 'space' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z' | 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z' | '!' | '"' | '#' | '$' | '%' | '&' | "'" | '(' | ')' | '*' | '+' | ',' | '-' | '.' | '/' | ':' | ';' | '<' | '=' | '>' | '?' | '@' | '[' | '\\' | ']' | '^' | '_' | '`' | '{' | '|' | '}' | '~ ';
3
6
  export declare type ANDROID_KEY = 'home' | 'back' | 'call' | 'endcall' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'star' | 'pound' | 'dpad_up' | 'dpad_down' | 'dpad_left' | 'dpad_right' | 'dpad_center' | 'volume_up' | 'volume_down' | 'power' | 'camera' | 'clear' | 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z' | 'comma' | 'period' | 'alt_left' | 'alt_right' | 'shift_left' | 'shift_right' | 'tab' | 'space' | 'sym' | 'explorer' | 'envelope' | 'enter' | 'del' | 'grave' | 'minus' | 'equals' | 'left_bracket' | 'right_bracket' | 'backslash' | 'semicolon' | 'apostrophe' | 'slash' | 'at' | 'num' | 'headsethook' | 'focus' | 'plus' | 'menu' | 'notification' | 'search' | 'media_play_pause' | 'media_stop' | 'media_next' | 'media_previous' | 'media_rewind' | 'media_fast_forward' | 'mute' | 'page_up' | 'page_down' | 'switch_charset' | 'escape' | 'forward_del' | 'ctrl_left' | 'ctrl_right' | 'caps_lock' | 'scroll_lock' | 'function' | 'break' | 'move_home' | 'move_end' | 'insert' | 'forward' | 'media_play' | 'media_pause' | 'media_close' | 'media_eject' | 'media_record' | 'f1' | 'f2' | 'f3' | 'f4' | 'f5' | 'f6' | 'f7' | 'f8' | 'f9' | 'f10' | 'f11' | 'f12' | 'num_lock' | 'numpad_0' | 'numpad_1' | 'numpad_2' | 'numpad_3' | 'numpad_4' | 'numpad_5' | 'numpad_6' | 'numpad_7' | 'numpad_8' | 'numpad_9' | 'numpad_divide' | 'numpad_multiply' | 'numpad_subtract' | 'numpad_add' | 'numpad_dot' | 'numpad_comma' | 'numpad_enter' | 'numpad_equals' | 'numpad_left_paren' | 'numpad_right_paren' | 'volume_mute' | 'info' | 'channel_up' | 'channel_down' | 'zoom_in' | 'zoom_out' | 'window' | 'guide' | 'bookmark' | 'captions' | 'settings' | 'app_switch' | 'language_switch' | 'contacts' | 'calendar' | 'music' | 'calculator' | 'assist' | 'brightness_down' | 'brightness_up' | 'media_audio_track' | 'sleep' | 'wakeup' | 'pairing' | 'media_top_menu' | 'last_channel' | 'tv_data_service' | 'voice_assist' | 'help' | 'navigate_previous' | 'navigate_next' | 'navigate_in' | 'navigate_out' | 'dpad_up_left' | 'dpad_down_left' | 'dpad_up_right' | 'dpad_down_right' | 'media_skip_forward' | 'media_skip_backward' | 'media_step_forward' | 'media_step_backward' | 'soft_sleep' | 'cut' | 'copy' | 'paste' | 'all_apps' | 'refresh';
4
7
  export declare type MODIFIER_KEY = 'command' | 'alt' | 'control' | 'shift' | 'right_shift';
@@ -5,7 +5,11 @@
5
5
  /* eslint-disable max-len */
6
6
  // Autogenerated from typescript.template file
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.FluentCommand = exports.FluentFiltersOrRelationsCondition = exports.FluentFiltersCondition = exports.FluentFiltersOrRelations = exports.FluentFilters = exports.Exec = void 0;
8
+ exports.FluentCommand = exports.FluentFiltersOrRelationsCondition = exports.FluentFiltersCondition = exports.FluentFiltersOrRelations = exports.FluentFilters = exports.Exec = exports.Separators = void 0;
9
+ var Separators;
10
+ (function (Separators) {
11
+ Separators["STRING"] = "<|string|>";
12
+ })(Separators = exports.Separators || (exports.Separators = {}));
9
13
  class FluentBase {
10
14
  constructor(prev) {
11
15
  this.prev = prev;
@@ -705,7 +709,7 @@ class FluentFilters extends FluentBase {
705
709
  * @return {FluentFiltersOrRelations}
706
710
  */
707
711
  withText(text) {
708
- this._textStr = `with text <|string|>${text}<|string|>`;
712
+ this._textStr = `with text ${Separators.STRING}${text}${Separators.STRING}`;
709
713
  return new FluentFiltersOrRelations(this);
710
714
  }
711
715
  /**
@@ -724,7 +728,7 @@ class FluentFilters extends FluentBase {
724
728
  * @return {FluentFiltersOrRelations}
725
729
  */
726
730
  withTextRegex(regex_pattern) {
727
- this._textStr = `match regex pattern <|string|>${regex_pattern}<|string|>`;
731
+ this._textStr = `match regex pattern ${Separators.STRING}${regex_pattern}${Separators.STRING}`;
728
732
  return new FluentFiltersOrRelations(this);
729
733
  }
730
734
  /**
@@ -746,7 +750,7 @@ class FluentFilters extends FluentBase {
746
750
  * @return {FluentFiltersOrRelations}
747
751
  */
748
752
  withExactText(text) {
749
- this._textStr = `equals text <|string|>${text}<|string|>`;
753
+ this._textStr = `equals text ${Separators.STRING}${text}${Separators.STRING}`;
750
754
  return new FluentFiltersOrRelations(this);
751
755
  }
752
756
  /**
@@ -764,7 +768,7 @@ class FluentFilters extends FluentBase {
764
768
  * @return {FluentFiltersOrRelations}
765
769
  */
766
770
  containsText(text) {
767
- this._textStr = `contain text <|string|>${text}<|string|>`;
771
+ this._textStr = `contain text ${Separators.STRING}${text}${Separators.STRING}`;
768
772
  return new FluentFiltersOrRelations(this);
769
773
  }
770
774
  /**
@@ -1617,7 +1621,7 @@ class FluentFiltersCondition extends FluentBase {
1617
1621
  * @return {FluentFiltersOrRelationsCondition}
1618
1622
  */
1619
1623
  withText(text) {
1620
- this._textStr = `with text <|string|>${text}<|string|>`;
1624
+ this._textStr = `with text ${Separators.STRING}${text}${Separators.STRING}`;
1621
1625
  return new FluentFiltersOrRelationsCondition(this);
1622
1626
  }
1623
1627
  /**
@@ -1636,7 +1640,7 @@ class FluentFiltersCondition extends FluentBase {
1636
1640
  * @return {FluentFiltersOrRelationsCondition}
1637
1641
  */
1638
1642
  withTextRegex(regex_pattern) {
1639
- this._textStr = `match regex pattern <|string|>${regex_pattern}<|string|>`;
1643
+ this._textStr = `match regex pattern ${Separators.STRING}${regex_pattern}${Separators.STRING}`;
1640
1644
  return new FluentFiltersOrRelationsCondition(this);
1641
1645
  }
1642
1646
  /**
@@ -1658,7 +1662,7 @@ class FluentFiltersCondition extends FluentBase {
1658
1662
  * @return {FluentFiltersOrRelationsCondition}
1659
1663
  */
1660
1664
  withExactText(text) {
1661
- this._textStr = `equals text <|string|>${text}<|string|>`;
1665
+ this._textStr = `equals text ${Separators.STRING}${text}${Separators.STRING}`;
1662
1666
  return new FluentFiltersOrRelationsCondition(this);
1663
1667
  }
1664
1668
  /**
@@ -1676,7 +1680,7 @@ class FluentFiltersCondition extends FluentBase {
1676
1680
  * @return {FluentFiltersOrRelationsCondition}
1677
1681
  */
1678
1682
  containsText(text) {
1679
- this._textStr = `contain text <|string|>${text}<|string|>`;
1683
+ this._textStr = `contain text ${Separators.STRING}${text}${Separators.STRING}`;
1680
1684
  return new FluentFiltersOrRelationsCondition(this);
1681
1685
  }
1682
1686
  /**
@@ -1925,7 +1929,7 @@ class FluentCommand extends FluentBase {
1925
1929
  * @return {FluentFilters}
1926
1930
  */
1927
1931
  typeIn(text) {
1928
- this._textStr = `Type <|string|>${text}<|string|> in`;
1932
+ this._textStr = `Type ${Separators.STRING}${text}${Separators.STRING} in`;
1929
1933
  return new FluentFilters(this);
1930
1934
  }
1931
1935
  /**
@@ -1973,7 +1977,7 @@ class FluentCommand extends FluentBase {
1973
1977
  * @return {Exec}
1974
1978
  */
1975
1979
  type(text) {
1976
- this._textStr = `Type <|string|>${text}<|string|>`;
1980
+ this._textStr = `Type ${Separators.STRING}${text}${Separators.STRING}`;
1977
1981
  return new Exec(this);
1978
1982
  }
1979
1983
  /**
@@ -2022,7 +2026,7 @@ class FluentCommand extends FluentBase {
2022
2026
  * @return {Exec}
2023
2027
  */
2024
2028
  execOnShell(shell_command) {
2025
- this._textStr = `Execute shell command <|string|>${shell_command}<|string|>`;
2029
+ this._textStr = `Execute shell command ${Separators.STRING}${shell_command}${Separators.STRING}`;
2026
2030
  return new Exec(this);
2027
2031
  }
2028
2032
  /**
@@ -26,7 +26,6 @@ class ExecutionRuntime {
26
26
  }
27
27
  executeTestStep(step) {
28
28
  return __awaiter(this, void 0, void 0, function* () {
29
- logger_1.logger.debug(step.instruction);
30
29
  yield this.executeCommand(step);
31
30
  });
32
31
  }
@@ -17,6 +17,7 @@ export declare class UiControlClient extends FluentCommand {
17
17
  connect(): Promise<UiControllerClientConnectionState>;
18
18
  annotate(annotationRequest?: AnnotationRequest): Promise<Annotation>;
19
19
  annotateInteractively(): Promise<void>;
20
+ private escapeSeparatorString;
20
21
  exec(instruction: string, customElementJson?: CustomElementJson[]): Promise<void>;
21
22
  private secretText;
22
23
  /**
@@ -89,10 +89,16 @@ class UiControlClient extends dsl_1.FluentCommand {
89
89
  }
90
90
  });
91
91
  }
92
+ // eslint-disable-next-line class-methods-use-this
93
+ escapeSeparatorString(instruction) {
94
+ return instruction.split(dsl_1.Separators.STRING).join('"');
95
+ }
92
96
  exec(instruction, customElementJson = []) {
93
97
  return __awaiter(this, void 0, void 0, function* () {
94
- const customElements = yield test_case_dto_1.CustomElement.fromJsonListWithImagePathOrImage(customElementJson);
95
98
  const { secretText } = this;
99
+ const customElements = yield test_case_dto_1.CustomElement.fromJsonListWithImagePathOrImage(customElementJson);
100
+ const stringWithoutSeparators = this.escapeSeparatorString(instruction);
101
+ logger_1.logger.debug(stringWithoutSeparators);
96
102
  try {
97
103
  yield this.executionRuntime.executeTestStep({
98
104
  instruction,
@@ -104,7 +110,7 @@ class UiControlClient extends dsl_1.FluentCommand {
104
110
  }
105
111
  catch (error) {
106
112
  yield this.annotateByDefault(test_case_result_dto_1.TestStepState.FAILED, customElements);
107
- return Promise.reject(new ui_control_client_error_1.UiControlClientError(`A problem occures while executing the instruction: ${instruction}. Reason ${error}`));
113
+ return Promise.reject(new ui_control_client_error_1.UiControlClientError(`A problem occurred while executing the instruction: ${stringWithoutSeparators}. Reason ${error}`));
108
114
  }
109
115
  });
110
116
  }
@@ -8,7 +8,7 @@ const unkown_http_client_error_1 = require("./unkown-http-client-error");
8
8
  var general_http_client_error_1 = require("./general-http-client-error");
9
9
  Object.defineProperty(exports, "GeneralHttpClientError", { enumerable: true, get: function () { return general_http_client_error_1.GeneralHttpClientError; } });
10
10
  function httpClientErrorHandler(responseCode, errorMessage) {
11
- const diplayedMessage = `response code: ${responseCode}. Message:${errorMessage}`;
11
+ const diplayedMessage = `HTTP Status Code: ${responseCode}. Message:${errorMessage}`;
12
12
  if (responseCode >= 400 && responseCode < 500) {
13
13
  if (responseCode === 401 || responseCode === 403) {
14
14
  return new authentication_http_client_error_1.AuthenticationHttpClientError(diplayedMessage);
@@ -1,4 +1,7 @@
1
1
  import { CustomElementJson } from '../core/model/test-case-dto';
2
+ export declare enum Separators {
3
+ STRING = "<|string|>"
4
+ }
2
5
  export declare type PC_KEY = 'backspace' | 'delete' | 'enter' | 'tab' | 'escape' | 'up' | 'down' | 'right' | 'left' | 'home' | 'end' | 'pageup' | 'pagedown' | 'f1' | 'f2' | 'f3' | 'f4' | 'f5' | 'f6' | 'f7' | 'f8' | 'f9' | 'f10' | 'f11' | 'f12' | 'space' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z' | 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z' | '!' | '"' | '#' | '$' | '%' | '&' | "'" | '(' | ')' | '*' | '+' | ',' | '-' | '.' | '/' | ':' | ';' | '<' | '=' | '>' | '?' | '@' | '[' | '\\' | ']' | '^' | '_' | '`' | '{' | '|' | '}' | '~ ';
3
6
  export declare type ANDROID_KEY = 'home' | 'back' | 'call' | 'endcall' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'star' | 'pound' | 'dpad_up' | 'dpad_down' | 'dpad_left' | 'dpad_right' | 'dpad_center' | 'volume_up' | 'volume_down' | 'power' | 'camera' | 'clear' | 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z' | 'comma' | 'period' | 'alt_left' | 'alt_right' | 'shift_left' | 'shift_right' | 'tab' | 'space' | 'sym' | 'explorer' | 'envelope' | 'enter' | 'del' | 'grave' | 'minus' | 'equals' | 'left_bracket' | 'right_bracket' | 'backslash' | 'semicolon' | 'apostrophe' | 'slash' | 'at' | 'num' | 'headsethook' | 'focus' | 'plus' | 'menu' | 'notification' | 'search' | 'media_play_pause' | 'media_stop' | 'media_next' | 'media_previous' | 'media_rewind' | 'media_fast_forward' | 'mute' | 'page_up' | 'page_down' | 'switch_charset' | 'escape' | 'forward_del' | 'ctrl_left' | 'ctrl_right' | 'caps_lock' | 'scroll_lock' | 'function' | 'break' | 'move_home' | 'move_end' | 'insert' | 'forward' | 'media_play' | 'media_pause' | 'media_close' | 'media_eject' | 'media_record' | 'f1' | 'f2' | 'f3' | 'f4' | 'f5' | 'f6' | 'f7' | 'f8' | 'f9' | 'f10' | 'f11' | 'f12' | 'num_lock' | 'numpad_0' | 'numpad_1' | 'numpad_2' | 'numpad_3' | 'numpad_4' | 'numpad_5' | 'numpad_6' | 'numpad_7' | 'numpad_8' | 'numpad_9' | 'numpad_divide' | 'numpad_multiply' | 'numpad_subtract' | 'numpad_add' | 'numpad_dot' | 'numpad_comma' | 'numpad_enter' | 'numpad_equals' | 'numpad_left_paren' | 'numpad_right_paren' | 'volume_mute' | 'info' | 'channel_up' | 'channel_down' | 'zoom_in' | 'zoom_out' | 'window' | 'guide' | 'bookmark' | 'captions' | 'settings' | 'app_switch' | 'language_switch' | 'contacts' | 'calendar' | 'music' | 'calculator' | 'assist' | 'brightness_down' | 'brightness_up' | 'media_audio_track' | 'sleep' | 'wakeup' | 'pairing' | 'media_top_menu' | 'last_channel' | 'tv_data_service' | 'voice_assist' | 'help' | 'navigate_previous' | 'navigate_next' | 'navigate_in' | 'navigate_out' | 'dpad_up_left' | 'dpad_down_left' | 'dpad_up_right' | 'dpad_down_right' | 'media_skip_forward' | 'media_skip_backward' | 'media_step_forward' | 'media_step_backward' | 'soft_sleep' | 'cut' | 'copy' | 'paste' | 'all_apps' | 'refresh';
4
7
  export declare type MODIFIER_KEY = 'command' | 'alt' | 'control' | 'shift' | 'right_shift';
@@ -3,6 +3,10 @@
3
3
  /* eslint-disable max-classes-per-file */
4
4
  /* eslint-disable max-len */
5
5
  // Autogenerated from typescript.template file
6
+ export var Separators;
7
+ (function (Separators) {
8
+ Separators["STRING"] = "<|string|>";
9
+ })(Separators || (Separators = {}));
6
10
  class FluentBase {
7
11
  constructor(prev) {
8
12
  this.prev = prev;
@@ -701,7 +705,7 @@ export class FluentFilters extends FluentBase {
701
705
  * @return {FluentFiltersOrRelations}
702
706
  */
703
707
  withText(text) {
704
- this._textStr = `with text <|string|>${text}<|string|>`;
708
+ this._textStr = `with text ${Separators.STRING}${text}${Separators.STRING}`;
705
709
  return new FluentFiltersOrRelations(this);
706
710
  }
707
711
  /**
@@ -720,7 +724,7 @@ export class FluentFilters extends FluentBase {
720
724
  * @return {FluentFiltersOrRelations}
721
725
  */
722
726
  withTextRegex(regex_pattern) {
723
- this._textStr = `match regex pattern <|string|>${regex_pattern}<|string|>`;
727
+ this._textStr = `match regex pattern ${Separators.STRING}${regex_pattern}${Separators.STRING}`;
724
728
  return new FluentFiltersOrRelations(this);
725
729
  }
726
730
  /**
@@ -742,7 +746,7 @@ export class FluentFilters extends FluentBase {
742
746
  * @return {FluentFiltersOrRelations}
743
747
  */
744
748
  withExactText(text) {
745
- this._textStr = `equals text <|string|>${text}<|string|>`;
749
+ this._textStr = `equals text ${Separators.STRING}${text}${Separators.STRING}`;
746
750
  return new FluentFiltersOrRelations(this);
747
751
  }
748
752
  /**
@@ -760,7 +764,7 @@ export class FluentFilters extends FluentBase {
760
764
  * @return {FluentFiltersOrRelations}
761
765
  */
762
766
  containsText(text) {
763
- this._textStr = `contain text <|string|>${text}<|string|>`;
767
+ this._textStr = `contain text ${Separators.STRING}${text}${Separators.STRING}`;
764
768
  return new FluentFiltersOrRelations(this);
765
769
  }
766
770
  /**
@@ -1611,7 +1615,7 @@ export class FluentFiltersCondition extends FluentBase {
1611
1615
  * @return {FluentFiltersOrRelationsCondition}
1612
1616
  */
1613
1617
  withText(text) {
1614
- this._textStr = `with text <|string|>${text}<|string|>`;
1618
+ this._textStr = `with text ${Separators.STRING}${text}${Separators.STRING}`;
1615
1619
  return new FluentFiltersOrRelationsCondition(this);
1616
1620
  }
1617
1621
  /**
@@ -1630,7 +1634,7 @@ export class FluentFiltersCondition extends FluentBase {
1630
1634
  * @return {FluentFiltersOrRelationsCondition}
1631
1635
  */
1632
1636
  withTextRegex(regex_pattern) {
1633
- this._textStr = `match regex pattern <|string|>${regex_pattern}<|string|>`;
1637
+ this._textStr = `match regex pattern ${Separators.STRING}${regex_pattern}${Separators.STRING}`;
1634
1638
  return new FluentFiltersOrRelationsCondition(this);
1635
1639
  }
1636
1640
  /**
@@ -1652,7 +1656,7 @@ export class FluentFiltersCondition extends FluentBase {
1652
1656
  * @return {FluentFiltersOrRelationsCondition}
1653
1657
  */
1654
1658
  withExactText(text) {
1655
- this._textStr = `equals text <|string|>${text}<|string|>`;
1659
+ this._textStr = `equals text ${Separators.STRING}${text}${Separators.STRING}`;
1656
1660
  return new FluentFiltersOrRelationsCondition(this);
1657
1661
  }
1658
1662
  /**
@@ -1670,7 +1674,7 @@ export class FluentFiltersCondition extends FluentBase {
1670
1674
  * @return {FluentFiltersOrRelationsCondition}
1671
1675
  */
1672
1676
  containsText(text) {
1673
- this._textStr = `contain text <|string|>${text}<|string|>`;
1677
+ this._textStr = `contain text ${Separators.STRING}${text}${Separators.STRING}`;
1674
1678
  return new FluentFiltersOrRelationsCondition(this);
1675
1679
  }
1676
1680
  /**
@@ -1917,7 +1921,7 @@ export class FluentCommand extends FluentBase {
1917
1921
  * @return {FluentFilters}
1918
1922
  */
1919
1923
  typeIn(text) {
1920
- this._textStr = `Type <|string|>${text}<|string|> in`;
1924
+ this._textStr = `Type ${Separators.STRING}${text}${Separators.STRING} in`;
1921
1925
  return new FluentFilters(this);
1922
1926
  }
1923
1927
  /**
@@ -1965,7 +1969,7 @@ export class FluentCommand extends FluentBase {
1965
1969
  * @return {Exec}
1966
1970
  */
1967
1971
  type(text) {
1968
- this._textStr = `Type <|string|>${text}<|string|>`;
1972
+ this._textStr = `Type ${Separators.STRING}${text}${Separators.STRING}`;
1969
1973
  return new Exec(this);
1970
1974
  }
1971
1975
  /**
@@ -2014,7 +2018,7 @@ export class FluentCommand extends FluentBase {
2014
2018
  * @return {Exec}
2015
2019
  */
2016
2020
  execOnShell(shell_command) {
2017
- this._textStr = `Execute shell command <|string|>${shell_command}<|string|>`;
2021
+ this._textStr = `Execute shell command ${Separators.STRING}${shell_command}${Separators.STRING}`;
2018
2022
  return new Exec(this);
2019
2023
  }
2020
2024
  /**
@@ -23,7 +23,6 @@ export class ExecutionRuntime {
23
23
  }
24
24
  executeTestStep(step) {
25
25
  return __awaiter(this, void 0, void 0, function* () {
26
- logger.debug(step.instruction);
27
26
  yield this.executeCommand(step);
28
27
  });
29
28
  }
@@ -17,6 +17,7 @@ export declare class UiControlClient extends FluentCommand {
17
17
  connect(): Promise<UiControllerClientConnectionState>;
18
18
  annotate(annotationRequest?: AnnotationRequest): Promise<Annotation>;
19
19
  annotateInteractively(): Promise<void>;
20
+ private escapeSeparatorString;
20
21
  exec(instruction: string, customElementJson?: CustomElementJson[]): Promise<void>;
21
22
  private secretText;
22
23
  /**
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { CustomElement } from '../core/model/test-case-dto';
11
- import { FluentCommand, } from './dsl';
11
+ import { FluentCommand, Separators, } from './dsl';
12
12
  import { HttpClientGot } from '../utils/http/http-client-got';
13
13
  import { UiControllerClient } from './ui-controller-client';
14
14
  import { ExecutionRuntime } from './execution-runtime';
@@ -86,10 +86,16 @@ export class UiControlClient extends FluentCommand {
86
86
  }
87
87
  });
88
88
  }
89
+ // eslint-disable-next-line class-methods-use-this
90
+ escapeSeparatorString(instruction) {
91
+ return instruction.split(Separators.STRING).join('"');
92
+ }
89
93
  exec(instruction, customElementJson = []) {
90
94
  return __awaiter(this, void 0, void 0, function* () {
91
- const customElements = yield CustomElement.fromJsonListWithImagePathOrImage(customElementJson);
92
95
  const { secretText } = this;
96
+ const customElements = yield CustomElement.fromJsonListWithImagePathOrImage(customElementJson);
97
+ const stringWithoutSeparators = this.escapeSeparatorString(instruction);
98
+ logger.debug(stringWithoutSeparators);
93
99
  try {
94
100
  yield this.executionRuntime.executeTestStep({
95
101
  instruction,
@@ -101,7 +107,7 @@ export class UiControlClient extends FluentCommand {
101
107
  }
102
108
  catch (error) {
103
109
  yield this.annotateByDefault(TestStepState.FAILED, customElements);
104
- return Promise.reject(new UiControlClientError(`A problem occures while executing the instruction: ${instruction}. Reason ${error}`));
110
+ return Promise.reject(new UiControlClientError(`A problem occurred while executing the instruction: ${stringWithoutSeparators}. Reason ${error}`));
105
111
  }
106
112
  });
107
113
  }
@@ -4,7 +4,7 @@ import { ClientHttpClientError } from './client-http-client-error';
4
4
  import { UnkownHttpClientError } from './unkown-http-client-error';
5
5
  export { GeneralHttpClientError } from './general-http-client-error';
6
6
  export function httpClientErrorHandler(responseCode, errorMessage) {
7
- const diplayedMessage = `response code: ${responseCode}. Message:${errorMessage}`;
7
+ const diplayedMessage = `HTTP Status Code: ${responseCode}. Message:${errorMessage}`;
8
8
  if (responseCode >= 400 && responseCode < 500) {
9
9
  if (responseCode === 401 || responseCode === 403) {
10
10
  return new AuthenticationHttpClientError(diplayedMessage);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "askui",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "main": "./dist/cjs/main.js",
5
5
  "module": "./dist/esm/main.js",
6
6
  "bin": {
@@ -22,10 +22,6 @@
22
22
  "dist/bin/",
23
23
  "dist/example_projects_templates/"
24
24
  ],
25
- "repository": {
26
- "type": "git",
27
- "url": "git+https://github.com/askui/askui.git"
28
- },
29
25
  "dependencies": {
30
26
  "commander": "~8.3.0",
31
27
  "fkill": "~7.2.1",
@@ -59,4 +55,4 @@
59
55
  "lint-staged": {
60
56
  "./**/*.{js,ts}": "eslint --cache --fix --max-warnings 0"
61
57
  }
62
- }
58
+ }