@empiricalrun/playwright-utils 0.6.2 → 0.6.3

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @empiricalrun/playwright-utils
2
2
 
3
+ ## 0.6.3
4
+
5
+ ### Patch Changes
6
+
7
+ - e605188: fix: errors in firefox browser for scroll into view
8
+
3
9
  ## 0.6.2
4
10
 
5
11
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"expect.d.ts","sourceRoot":"","sources":["../../../../src/test/scripts/pw-locator-patch/expect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAIhD,wBAAgB,WAAW,CAAC,YAAY,EAAE;IAAE,SAAS,EAAE,OAAO,CAAA;CAAE,QA+B/D"}
1
+ {"version":3,"file":"expect.d.ts","sourceRoot":"","sources":["../../../../src/test/scripts/pw-locator-patch/expect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAIhD,wBAAgB,WAAW,CAAC,YAAY,EAAE;IAAE,SAAS,EAAE,OAAO,CAAA;CAAE,QAmC/D"}
@@ -12,7 +12,12 @@ function patchExpect(LocatorClass) {
12
12
  if (result.matches) {
13
13
  try {
14
14
  await this.evaluate((node) => {
15
- node.scrollIntoViewIfNeeded();
15
+ if (node.scrollIntoViewIfNeeded) {
16
+ node.scrollIntoViewIfNeeded();
17
+ }
18
+ else {
19
+ node.scrollIntoView();
20
+ }
16
21
  node.classList.add("empirical-element-grab-highlight");
17
22
  setTimeout(() => {
18
23
  if (node && node.isConnected && node.classList) {
@@ -1 +1 @@
1
- {"version":3,"file":"hover.d.ts","sourceRoot":"","sources":["../../../../src/test/scripts/pw-locator-patch/hover.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAI3C,wBAAgB,UAAU,CAAC,YAAY,EAAE;IAAE,SAAS,EAAE,OAAO,CAAA;CAAE,QAuB9D"}
1
+ {"version":3,"file":"hover.d.ts","sourceRoot":"","sources":["../../../../src/test/scripts/pw-locator-patch/hover.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAI3C,wBAAgB,UAAU,CAAC,YAAY,EAAE;IAAE,SAAS,EAAE,OAAO,CAAA;CAAE,QA2B9D"}
@@ -9,7 +9,12 @@ function patchHover(LocatorClass) {
9
9
  await originalHover.apply(this, [options]);
10
10
  try {
11
11
  await this.evaluate((node) => {
12
- node.scrollIntoViewIfNeeded();
12
+ if (node.scrollIntoViewIfNeeded) {
13
+ node.scrollIntoViewIfNeeded();
14
+ }
15
+ else {
16
+ node.scrollIntoView();
17
+ }
13
18
  node.classList.add("empirical-element-grab-highlight");
14
19
  setTimeout(() => {
15
20
  if (node && node.isConnected && node.classList) {
@@ -1 +1 @@
1
- {"version":3,"file":"inner-text.d.ts","sourceRoot":"","sources":["../../../../src/test/scripts/pw-locator-patch/inner-text.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAIhD,wBAAgB,cAAc,CAAC,YAAY,EAAE;IAAE,SAAS,EAAE,OAAO,CAAA;CAAE,QAwBlE"}
1
+ {"version":3,"file":"inner-text.d.ts","sourceRoot":"","sources":["../../../../src/test/scripts/pw-locator-patch/inner-text.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAIhD,wBAAgB,cAAc,CAAC,YAAY,EAAE;IAAE,SAAS,EAAE,OAAO,CAAA;CAAE,QA4BlE"}
@@ -9,7 +9,12 @@ function patchInnerText(LocatorClass) {
9
9
  const result = await originalInputValue.apply(this, [options]);
10
10
  try {
11
11
  await this.evaluate((node) => {
12
- node.scrollIntoViewIfNeeded();
12
+ if (node.scrollIntoViewIfNeeded) {
13
+ node.scrollIntoViewIfNeeded();
14
+ }
15
+ else {
16
+ node.scrollIntoView();
17
+ }
13
18
  node.classList.add("empirical-element-grab-highlight");
14
19
  setTimeout(() => {
15
20
  if (node && node.isConnected && node.classList) {
@@ -1 +1 @@
1
- {"version":3,"file":"input-value.d.ts","sourceRoot":"","sources":["../../../../src/test/scripts/pw-locator-patch/input-value.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAIhD,wBAAgB,eAAe,CAAC,YAAY,EAAE;IAAE,SAAS,EAAE,OAAO,CAAA;CAAE,QAwBnE"}
1
+ {"version":3,"file":"input-value.d.ts","sourceRoot":"","sources":["../../../../src/test/scripts/pw-locator-patch/input-value.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAIhD,wBAAgB,eAAe,CAAC,YAAY,EAAE;IAAE,SAAS,EAAE,OAAO,CAAA;CAAE,QA4BnE"}
@@ -9,7 +9,12 @@ function patchInputValue(LocatorClass) {
9
9
  const result = await originalInputValue.apply(this, [options]);
10
10
  try {
11
11
  await this.evaluate((node) => {
12
- node.scrollIntoViewIfNeeded();
12
+ if (node.scrollIntoViewIfNeeded) {
13
+ node.scrollIntoViewIfNeeded();
14
+ }
15
+ else {
16
+ node.scrollIntoView();
17
+ }
13
18
  node.classList.add("empirical-element-grab-highlight");
14
19
  setTimeout(() => {
15
20
  if (node && node.isConnected && node.classList) {
@@ -1 +1 @@
1
- {"version":3,"file":"is-checked.d.ts","sourceRoot":"","sources":["../../../../src/test/scripts/pw-locator-patch/is-checked.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAI3C,wBAAgB,cAAc,CAAC,YAAY,EAAE;IAAE,SAAS,EAAE,OAAO,CAAA;CAAE,QAwBlE"}
1
+ {"version":3,"file":"is-checked.d.ts","sourceRoot":"","sources":["../../../../src/test/scripts/pw-locator-patch/is-checked.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAI3C,wBAAgB,cAAc,CAAC,YAAY,EAAE;IAAE,SAAS,EAAE,OAAO,CAAA;CAAE,QA4BlE"}
@@ -9,7 +9,12 @@ function patchIsChecked(LocatorClass) {
9
9
  const result = await originalIsChecked.apply(this, [options]);
10
10
  try {
11
11
  await this.evaluate((node) => {
12
- node.scrollIntoViewIfNeeded();
12
+ if (node.scrollIntoViewIfNeeded) {
13
+ node.scrollIntoViewIfNeeded();
14
+ }
15
+ else {
16
+ node.scrollIntoView();
17
+ }
13
18
  node.classList.add("empirical-element-grab-highlight");
14
19
  setTimeout(() => {
15
20
  if (node && node.isConnected && node.classList) {
@@ -1 +1 @@
1
- {"version":3,"file":"is-disabled.d.ts","sourceRoot":"","sources":["../../../../src/test/scripts/pw-locator-patch/is-disabled.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAI3C,wBAAgB,eAAe,CAAC,YAAY,EAAE;IAAE,SAAS,EAAE,OAAO,CAAA;CAAE,QAwBnE"}
1
+ {"version":3,"file":"is-disabled.d.ts","sourceRoot":"","sources":["../../../../src/test/scripts/pw-locator-patch/is-disabled.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAI3C,wBAAgB,eAAe,CAAC,YAAY,EAAE;IAAE,SAAS,EAAE,OAAO,CAAA;CAAE,QA4BnE"}
@@ -9,7 +9,12 @@ function patchIsDisabled(LocatorClass) {
9
9
  const result = await originalIsDisabled.apply(this, [options]);
10
10
  try {
11
11
  await this.evaluate((node) => {
12
- node.scrollIntoViewIfNeeded();
12
+ if (node.scrollIntoViewIfNeeded) {
13
+ node.scrollIntoViewIfNeeded();
14
+ }
15
+ else {
16
+ node.scrollIntoView();
17
+ }
13
18
  node.classList.add("empirical-element-grab-highlight");
14
19
  setTimeout(() => {
15
20
  if (node && node.isConnected && node.classList) {
@@ -1 +1 @@
1
- {"version":3,"file":"is-editable.d.ts","sourceRoot":"","sources":["../../../../src/test/scripts/pw-locator-patch/is-editable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAI3C,wBAAgB,eAAe,CAAC,YAAY,EAAE;IAAE,SAAS,EAAE,OAAO,CAAA;CAAE,QAwBnE"}
1
+ {"version":3,"file":"is-editable.d.ts","sourceRoot":"","sources":["../../../../src/test/scripts/pw-locator-patch/is-editable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAI3C,wBAAgB,eAAe,CAAC,YAAY,EAAE;IAAE,SAAS,EAAE,OAAO,CAAA;CAAE,QA4BnE"}
@@ -9,7 +9,12 @@ function patchIsEditable(LocatorClass) {
9
9
  const result = await originalIsEditable.apply(this, [options]);
10
10
  try {
11
11
  await this.evaluate((node) => {
12
- node.scrollIntoViewIfNeeded();
12
+ if (node.scrollIntoViewIfNeeded) {
13
+ node.scrollIntoViewIfNeeded();
14
+ }
15
+ else {
16
+ node.scrollIntoView();
17
+ }
13
18
  node.classList.add("empirical-element-grab-highlight");
14
19
  setTimeout(() => {
15
20
  if (node && node.isConnected && node.classList) {
@@ -1 +1 @@
1
- {"version":3,"file":"text-content.d.ts","sourceRoot":"","sources":["../../../../src/test/scripts/pw-locator-patch/text-content.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAIhD,wBAAgB,gBAAgB,CAAC,YAAY,EAAE;IAAE,SAAS,EAAE,OAAO,CAAA;CAAE,QAwBpE"}
1
+ {"version":3,"file":"text-content.d.ts","sourceRoot":"","sources":["../../../../src/test/scripts/pw-locator-patch/text-content.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAIhD,wBAAgB,gBAAgB,CAAC,YAAY,EAAE;IAAE,SAAS,EAAE,OAAO,CAAA;CAAE,QA4BpE"}
@@ -9,7 +9,12 @@ function patchTextContent(LocatorClass) {
9
9
  const result = await originalTextContent.apply(this, [options]);
10
10
  try {
11
11
  await this.evaluate((node) => {
12
- node.scrollIntoViewIfNeeded();
12
+ if (node.scrollIntoViewIfNeeded) {
13
+ node.scrollIntoViewIfNeeded();
14
+ }
15
+ else {
16
+ node.scrollIntoView();
17
+ }
13
18
  node.classList.add("empirical-element-grab-highlight");
14
19
  setTimeout(() => {
15
20
  if (node && node.isConnected && node.classList) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empiricalrun/playwright-utils",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"