@suitest/types
Advanced tools
Comparing version 2.1.2 to 3.0.0
@@ -9,2 +9,9 @@ export type StringComparator = '=' | '!=' | '~' | '!~' | '^' | '!^' | '$' | '!$'; | ||
export type Comparator = StringComparator | NumberComparator | ColorComparator | JavaScriptComparator; | ||
type ExistComparator = 'exists' | '!exists'; | ||
export type Comparator = | ||
StringComparator | ||
| NumberComparator | ||
| ColorComparator | ||
| JavaScriptComparator | ||
| ExistComparator; |
@@ -8,4 +8,5 @@ import { | ||
NetworkRequestSubject, | ||
PSVideoSubject, | ||
} from './subject'; | ||
import {Comparator, StringComparator} from './comparator'; | ||
import {Comparator, StringComparator, JavaScriptComparator, ExistComparator} from './comparator'; | ||
@@ -19,3 +20,3 @@ export type ApplicationExitedCondition = { | ||
subject: CurrentLocationSubject, | ||
type: StringComparator, | ||
type: StringComparator | JavaScriptComparator, | ||
val: string, | ||
@@ -26,3 +27,3 @@ }; | ||
subject: CookieSubject, | ||
type: StringComparator, | ||
type: StringComparator | JavaScriptComparator | ExistComparator, | ||
val: string, | ||
@@ -53,12 +54,14 @@ }; | ||
export type ElementPropertiesCondition = { | ||
subject: ElementSubject, | ||
subject: ElementSubject | PSVideoSubject, | ||
type: 'has', | ||
expression: Array<{ | ||
property: string, | ||
type: Comparator, | ||
val: string | number, | ||
deviation?: number, | ||
}>, | ||
expression: ElementProperty[], | ||
}; | ||
export type ElementProperty = { | ||
property: string, | ||
type: Comparator, | ||
val: string | number, | ||
deviation?: number, | ||
}; | ||
export type ElementCondition = ElementExistsCondition | ||
@@ -70,6 +73,12 @@ | ElementDoesNotExistCondition | ||
export type PSVideoHadNoErrorCondition = { | ||
subject: PSVideoSubject, | ||
type: 'hadNoError', | ||
searchStrategy: 'all' | 'currentUrl', | ||
}; | ||
export type JavaScriptExpressionCondition = { | ||
subject: JavaScriptExpressionSubject, | ||
type: StringComparator, | ||
val: string, | ||
val?: string, | ||
}; | ||
@@ -87,3 +96,4 @@ | ||
| ElementCondition | ||
| PSVideoHadNoErrorCondition | ||
| JavaScriptExpressionCondition | ||
| NetworkRequestCondition; |
@@ -0,1 +1,3 @@ | ||
export type ElementId = string; | ||
// Element, as delivered by result details feed | ||
@@ -2,0 +4,0 @@ export type Element = { |
@@ -51,2 +51,6 @@ import {NumberComparator, StringComparator} from './comparator'; | ||
export type PSVideoSubject = { | ||
type: 'psVideo', | ||
}; | ||
export type NetworkRequestBodyInfo = { | ||
@@ -91,3 +95,3 @@ name: '@body', | ||
type: 'javascript', | ||
val: string, | ||
val?: string, | ||
}; | ||
@@ -99,4 +103,4 @@ | ||
| ElementSubject | ||
| VideoSubject | ||
| PSVideoSubject | ||
| NetworkRequestSubject | ||
| JavaScriptExpressionSubject; |
{ | ||
"name": "@suitest/types", | ||
"version": "2.1.2", | ||
"version": "3.0.0", | ||
"description": "TypeScript definitions for common data structures", | ||
"homepage": "https://github.com/SuitestAutomation/suitest#readme", | ||
"license": "MIT", | ||
"main": "lib/index.d.ts", | ||
"files": [ | ||
"lib/" | ||
], | ||
"repository": { | ||
@@ -8,0 +12,0 @@ "type": "git", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
18830
712
11
1