codeceptjs 4.0.1-beta.19 → 4.0.1-beta.20

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 (2) hide show
  1. package/lib/locator.js +4 -7
  2. package/package.json +1 -1
package/lib/locator.js CHANGED
@@ -24,6 +24,10 @@ class Locator {
24
24
  */
25
25
  this.strict = false
26
26
 
27
+ if (typeof locator === 'string' && this.parsedJsonAsString(locator)) {
28
+ return
29
+ }
30
+
27
31
  if (typeof locator === 'object') {
28
32
  if (locator.constructor.name === 'Locator') {
29
33
  Object.assign(this, locator)
@@ -33,11 +37,6 @@ class Locator {
33
37
  return
34
38
  }
35
39
 
36
- // Try to parse JSON strings that look like objects
37
- if (this.parsedJsonAsString(locator)) {
38
- return
39
- }
40
-
41
40
  this.type = defaultType || 'fuzzy'
42
41
  this.output = locator
43
42
  this.value = locator
@@ -659,8 +658,6 @@ function isReactVueLocator(locator) {
659
658
  return locator.includes('_react') || locator.includes('_vue')
660
659
  }
661
660
 
662
- /**
663
- * @private
664
661
  /**
665
662
  * @private
666
663
  * @param {CodeceptJS.LocatorOrString} locator
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeceptjs",
3
- "version": "4.0.1-beta.19",
3
+ "version": "4.0.1-beta.20",
4
4
  "type": "module",
5
5
  "description": "Supercharged End 2 End Testing Framework for NodeJS",
6
6
  "keywords": [