@serenity-js/web
Advanced tools
Comparing version 3.0.0-rc.23 to 3.0.0-rc.24
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isActive = void 0; | ||
const assertions_1 = require("@serenity-js/assertions"); | ||
const core_1 = require("@serenity-js/core"); | ||
const ElementExpectation_1 = require("./ElementExpectation"); | ||
@@ -17,7 +19,6 @@ /** | ||
*/ | ||
// todo: isFocused? | ||
function isActive() { | ||
return ElementExpectation_1.ElementExpectation.forElementTo('become active', actual => actual.isActive()); | ||
return core_1.Expectation.to('become active').soThatActual((0, assertions_1.and)((0, assertions_1.isPresent)(), ElementExpectation_1.ElementExpectation.forElementTo('become active', actual => actual.isActive()))); | ||
} | ||
exports.isActive = isActive; | ||
//# sourceMappingURL=isActive.js.map |
@@ -7,3 +7,2 @@ "use strict"; | ||
const ElementExpectation_1 = require("./ElementExpectation"); | ||
const isEnabled_1 = require("./isEnabled"); | ||
const isVisible_1 = require("./isVisible"); | ||
@@ -28,5 +27,5 @@ /** | ||
function isClickable() { | ||
return core_1.Expectation.to('become clickable').soThatActual((0, assertions_1.and)((0, isVisible_1.isVisible)(), (0, isEnabled_1.isEnabled)(), ElementExpectation_1.ElementExpectation.forElementTo('become clickable', actual => actual.isClickable()))); | ||
return core_1.Expectation.to('become clickable').soThatActual((0, assertions_1.and)((0, isVisible_1.isVisible)(), ElementExpectation_1.ElementExpectation.forElementTo('become clickable', actual => actual.isClickable()))); | ||
} | ||
exports.isClickable = isClickable; | ||
//# sourceMappingURL=isClickable.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isEnabled = void 0; | ||
const assertions_1 = require("@serenity-js/assertions"); | ||
const core_1 = require("@serenity-js/core"); | ||
const ElementExpectation_1 = require("./ElementExpectation"); | ||
@@ -17,5 +19,5 @@ /** | ||
function isEnabled() { | ||
return ElementExpectation_1.ElementExpectation.forElementTo('become enabled', actual => actual.isEnabled()); | ||
return core_1.Expectation.to('become enabled').soThatActual((0, assertions_1.and)((0, assertions_1.isPresent)(), ElementExpectation_1.ElementExpectation.forElementTo('become enabled', actual => actual.isEnabled()))); | ||
} | ||
exports.isEnabled = isEnabled; | ||
//# sourceMappingURL=isEnabled.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isVisible = void 0; | ||
const assertions_1 = require("@serenity-js/assertions"); | ||
const core_1 = require("@serenity-js/core"); | ||
const ElementExpectation_1 = require("./ElementExpectation"); | ||
@@ -20,5 +22,5 @@ /** | ||
function isVisible() { | ||
return ElementExpectation_1.ElementExpectation.forElementTo('become visible', actual => actual.isVisible()); | ||
return core_1.Expectation.to('become visible').soThatActual((0, assertions_1.and)((0, assertions_1.isPresent)(), ElementExpectation_1.ElementExpectation.forElementTo('become visible', actual => actual.isVisible()))); | ||
} | ||
exports.isVisible = isVisible; | ||
//# sourceMappingURL=isVisible.js.map |
{ | ||
"name": "@serenity-js/web", | ||
"version": "3.0.0-rc.23", | ||
"version": "3.0.0-rc.24", | ||
"description": "Serenity/JS Screenplay Pattern APIs for the Web", | ||
@@ -50,4 +50,4 @@ "author": { | ||
"dependencies": { | ||
"@serenity-js/assertions": "3.0.0-rc.23", | ||
"@serenity-js/core": "3.0.0-rc.23", | ||
"@serenity-js/assertions": "3.0.0-rc.24", | ||
"@serenity-js/core": "3.0.0-rc.24", | ||
"tiny-types": "^1.18.4" | ||
@@ -64,3 +64,3 @@ }, | ||
}, | ||
"gitHead": "debd05ecd17b48de66a53afbef8f7aa7f457ba6b" | ||
"gitHead": "76443ef557e876727b7dae9ef66d4e6612a3034b" | ||
} |
@@ -0,1 +1,2 @@ | ||
import { and, isPresent } from '@serenity-js/assertions'; | ||
import { Expectation } from '@serenity-js/core'; | ||
@@ -18,6 +19,7 @@ | ||
*/ | ||
// todo: isFocused? | ||
export function isActive(): Expectation<PageElement> { | ||
return ElementExpectation.forElementTo('become active', actual => actual.isActive()); | ||
return Expectation.to<boolean, PageElement>('become active').soThatActual(and( | ||
isPresent(), | ||
ElementExpectation.forElementTo('become active', actual => actual.isActive()), | ||
)); | ||
} | ||
@@ -6,3 +6,2 @@ import { and } from '@serenity-js/assertions'; | ||
import { ElementExpectation } from './ElementExpectation'; | ||
import { isEnabled } from './isEnabled'; | ||
import { isVisible } from './isVisible'; | ||
@@ -30,5 +29,4 @@ | ||
isVisible(), | ||
isEnabled(), | ||
ElementExpectation.forElementTo('become clickable', actual => actual.isClickable()) | ||
)); | ||
} |
@@ -0,1 +1,2 @@ | ||
import { and, isPresent } from '@serenity-js/assertions'; | ||
import { Expectation } from '@serenity-js/core'; | ||
@@ -18,3 +19,6 @@ | ||
export function isEnabled(): Expectation<PageElement> { | ||
return ElementExpectation.forElementTo('become enabled', actual => actual.isEnabled()); | ||
return Expectation.to<boolean, PageElement>('become enabled').soThatActual(and( | ||
isPresent(), | ||
ElementExpectation.forElementTo('become enabled', actual => actual.isEnabled()) | ||
)); | ||
} |
@@ -0,1 +1,2 @@ | ||
import { and, isPresent } from '@serenity-js/assertions'; | ||
import { Expectation } from '@serenity-js/core'; | ||
@@ -21,3 +22,6 @@ | ||
export function isVisible(): Expectation<PageElement> { | ||
return ElementExpectation.forElementTo('become visible', actual => actual.isVisible()); | ||
return Expectation.to<boolean, PageElement>('become visible').soThatActual(and( | ||
isPresent(), | ||
ElementExpectation.forElementTo('become visible', actual => actual.isVisible()), | ||
)); | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
739631
13616
+ Added@serenity-js/assertions@3.0.0-rc.24(transitive)
+ Added@serenity-js/core@3.0.0-rc.24(transitive)
- Removed@serenity-js/assertions@3.0.0-rc.23(transitive)
- Removed@serenity-js/core@3.0.0-rc.23(transitive)