ngx-speculoos 7.2.0 → 8.0.0

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.
@@ -945,7 +945,7 @@ const speculoosMatchers = {
945
945
  /**
946
946
  * Checks that the receiver is a TestElement wrapping a DOM element and as the given CSS class
947
947
  */
948
- toHaveClass: () => {
948
+ toHaveClass() {
949
949
  const assert = (isNegative, el, expected) => {
950
950
  if (!el) {
951
951
  return { pass: false, message: `Expected to check class '${expected}' on element, but element was falsy` };
@@ -960,10 +960,10 @@ const speculoosMatchers = {
960
960
  return { pass: isNegative ? !pass : pass, message };
961
961
  };
962
962
  return {
963
- compare: (el, expected) => {
963
+ compare(el, expected) {
964
964
  return assert(false, el, expected);
965
965
  },
966
- negativeCompare: (el, expected) => {
966
+ negativeCompare(el, expected) {
967
967
  return assert(true, el, expected);
968
968
  }
969
969
  };
@@ -971,7 +971,7 @@ const speculoosMatchers = {
971
971
  /**
972
972
  * Checks that the receiver is a TestInput or a TestTextArea and has the given value
973
973
  */
974
- toHaveValue: () => {
974
+ toHaveValue() {
975
975
  const assert = (isNegative, el, expected) => {
976
976
  if (!el) {
977
977
  return { pass: false, message: `Expected to check value '${expected}' on element, but element was falsy` };
@@ -988,10 +988,10 @@ const speculoosMatchers = {
988
988
  return { pass: isNegative ? !pass : pass, message };
989
989
  };
990
990
  return {
991
- compare: (el, expected) => {
991
+ compare(el, expected) {
992
992
  return assert(false, el, expected);
993
993
  },
994
- negativeCompare: (el, expected) => {
994
+ negativeCompare(el, expected) {
995
995
  return assert(true, el, expected);
996
996
  }
997
997
  };
@@ -999,7 +999,7 @@ const speculoosMatchers = {
999
999
  /**
1000
1000
  * Checks that the receiver is a TestElement wrapping a DOM element and has the exact given textContent
1001
1001
  */
1002
- toHaveText: () => {
1002
+ toHaveText() {
1003
1003
  const assert = (isNegative, el, expected) => {
1004
1004
  if (!el) {
1005
1005
  return { pass: false, message: `Expected to check text '${expected}' on element, but element was falsy` };
@@ -1013,10 +1013,10 @@ const speculoosMatchers = {
1013
1013
  return { pass: isNegative ? !pass : pass, message };
1014
1014
  };
1015
1015
  return {
1016
- compare: (el, expected) => {
1016
+ compare(el, expected) {
1017
1017
  return assert(false, el, expected);
1018
1018
  },
1019
- negativeCompare: (el, expected) => {
1019
+ negativeCompare(el, expected) {
1020
1020
  return assert(true, el, expected);
1021
1021
  }
1022
1022
  };
@@ -1034,7 +1034,7 @@ const speculoosMatchers = {
1034
1034
  * expect(tester.title).toHaveTrimmedText('Some title')
1035
1035
  * ```
1036
1036
  */
1037
- toHaveTrimmedText: () => {
1037
+ toHaveTrimmedText() {
1038
1038
  const assert = (isNegative, el, expected) => {
1039
1039
  const trimmedExpected = expected.trim();
1040
1040
  if (!el) {
@@ -1052,10 +1052,10 @@ const speculoosMatchers = {
1052
1052
  return { pass: isNegative ? !pass : pass, message };
1053
1053
  };
1054
1054
  return {
1055
- compare: (el, expected) => {
1055
+ compare(el, expected) {
1056
1056
  return assert(false, el, expected);
1057
1057
  },
1058
- negativeCompare: (el, expected) => {
1058
+ negativeCompare(el, expected) {
1059
1059
  return assert(true, el, expected);
1060
1060
  }
1061
1061
  };
@@ -1063,7 +1063,7 @@ const speculoosMatchers = {
1063
1063
  /**
1064
1064
  * Checks that the receiver is a TestElement wrapping a DOM element and contains the given textContent
1065
1065
  */
1066
- toContainText: () => {
1066
+ toContainText() {
1067
1067
  const assert = (isNegative, el, expected) => {
1068
1068
  if (!el) {
1069
1069
  return { pass: false, message: `Expected to check text '${expected}' on element, but element was falsy` };
@@ -1083,10 +1083,10 @@ const speculoosMatchers = {
1083
1083
  return { pass: isNegative ? !pass : pass, message };
1084
1084
  };
1085
1085
  return {
1086
- compare: (el, expected) => {
1086
+ compare(el, expected) {
1087
1087
  return assert(false, el, expected);
1088
1088
  },
1089
- negativeCompare: (el, expected) => {
1089
+ negativeCompare(el, expected) {
1090
1090
  return assert(true, el, expected);
1091
1091
  }
1092
1092
  };
@@ -1094,7 +1094,7 @@ const speculoosMatchers = {
1094
1094
  /**
1095
1095
  * Checks that the receiver is a TestElement wrapping a DOM element and contains the given textContent
1096
1096
  */
1097
- toBeChecked: () => {
1097
+ toBeChecked() {
1098
1098
  const assert = (isNegative, el) => {
1099
1099
  if (!el) {
1100
1100
  return { pass: false, message: `Expected to check if element was checked, but element was falsy` };
@@ -1107,10 +1107,10 @@ const speculoosMatchers = {
1107
1107
  return { pass: isNegative ? !pass : pass, message };
1108
1108
  };
1109
1109
  return {
1110
- compare: (el) => {
1110
+ compare(el) {
1111
1111
  return assert(false, el);
1112
1112
  },
1113
- negativeCompare: (el) => {
1113
+ negativeCompare(el) {
1114
1114
  return assert(true, el);
1115
1115
  }
1116
1116
  };
@@ -1118,7 +1118,7 @@ const speculoosMatchers = {
1118
1118
  /**
1119
1119
  * Checks that the receiver is a TestSelect wrapping a DOM element and has the given selected index
1120
1120
  */
1121
- toHaveSelectedIndex: () => {
1121
+ toHaveSelectedIndex() {
1122
1122
  const assert = (isNegative, el, expected) => {
1123
1123
  if (!el) {
1124
1124
  return { pass: false, message: `Expected to check selected index ${expected} on element, but element was falsy` };
@@ -1132,10 +1132,10 @@ const speculoosMatchers = {
1132
1132
  return { pass: isNegative ? !pass : pass, message };
1133
1133
  };
1134
1134
  return {
1135
- compare: (el, expected) => {
1135
+ compare(el, expected) {
1136
1136
  return assert(false, el, expected);
1137
1137
  },
1138
- negativeCompare: (el, expected) => {
1138
+ negativeCompare(el, expected) {
1139
1139
  return assert(true, el, expected);
1140
1140
  }
1141
1141
  };
@@ -1143,7 +1143,7 @@ const speculoosMatchers = {
1143
1143
  /**
1144
1144
  * Checks that the receiver is a TestSelect wrapping a DOM element with the selected option's value equal to the given value
1145
1145
  */
1146
- toHaveSelectedValue: () => {
1146
+ toHaveSelectedValue() {
1147
1147
  const assert = (isNegative, el, expected) => {
1148
1148
  if (!el) {
1149
1149
  return { pass: false, message: `Expected to check selected value '${expected}' on element, but element was falsy` };
@@ -1157,10 +1157,10 @@ const speculoosMatchers = {
1157
1157
  return { pass: isNegative ? !pass : pass, message };
1158
1158
  };
1159
1159
  return {
1160
- compare: (el, expected) => {
1160
+ compare(el, expected) {
1161
1161
  return assert(false, el, expected);
1162
1162
  },
1163
- negativeCompare: (el, expected) => {
1163
+ negativeCompare(el, expected) {
1164
1164
  return assert(true, el, expected);
1165
1165
  }
1166
1166
  };
@@ -1168,7 +1168,7 @@ const speculoosMatchers = {
1168
1168
  /**
1169
1169
  * Checks that the receiver is a TestSelect wrapping a DOM element with the selected option's label equal to the given label
1170
1170
  */
1171
- toHaveSelectedLabel: () => {
1171
+ toHaveSelectedLabel() {
1172
1172
  const assert = (isNegative, el, expected) => {
1173
1173
  if (!el) {
1174
1174
  return { pass: false, message: `Expected to check selected label '${expected}' on element, but element was falsy` };
@@ -1182,10 +1182,10 @@ const speculoosMatchers = {
1182
1182
  return { pass: isNegative ? !pass : pass, message };
1183
1183
  };
1184
1184
  return {
1185
- compare: (el, expected) => {
1185
+ compare(el, expected) {
1186
1186
  return assert(false, el, expected);
1187
1187
  },
1188
- negativeCompare: (el, expected) => {
1188
+ negativeCompare(el, expected) {
1189
1189
  return assert(true, el, expected);
1190
1190
  }
1191
1191
  };
@@ -1193,7 +1193,7 @@ const speculoosMatchers = {
1193
1193
  /**
1194
1194
  * Checks that the receiver is a TestHtmlElement which is visible
1195
1195
  */
1196
- toBeVisible: () => {
1196
+ toBeVisible() {
1197
1197
  const assert = (isNegative, el) => {
1198
1198
  const expectedState = `${isNegative ? 'in' : ''}visible`;
1199
1199
  const inverseState = `${isNegative ? '' : 'in'}visible`;
@@ -1208,10 +1208,10 @@ const speculoosMatchers = {
1208
1208
  return { pass: isNegative ? !pass : pass, message };
1209
1209
  };
1210
1210
  return {
1211
- compare: (el) => {
1211
+ compare(el) {
1212
1212
  return assert(false, el);
1213
1213
  },
1214
- negativeCompare: (el) => {
1214
+ negativeCompare(el) {
1215
1215
  return assert(true, el);
1216
1216
  }
1217
1217
  };