@serenity-js/web
Advanced tools
Comparing version 3.17.0 to 3.18.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [3.18.0](https://github.com/serenity-js/serenity-js/compare/v3.17.0...v3.18.0) (2024-02-17) | ||
### Features | ||
* **web:** actors can now check if an HTML element attribute is present ([3ce115a](https://github.com/serenity-js/serenity-js/commit/3ce115ab5c27b05b970f529ee0e97c89d46bbde4)) | ||
# [3.17.0](https://github.com/serenity-js/serenity-js/compare/v3.16.2...v3.17.0) (2024-02-10) | ||
@@ -8,0 +19,0 @@ |
@@ -1,2 +0,2 @@ | ||
import type { Answerable, AnswersQuestions, MetaQuestion, MetaQuestionAdapter, QuestionAdapter, UsesAbilities } from '@serenity-js/core'; | ||
import type { Answerable, AnswersQuestions, MetaQuestion, MetaQuestionAdapter, Optional, QuestionAdapter, UsesAbilities } from '@serenity-js/core'; | ||
import { Question } from '@serenity-js/core'; | ||
@@ -96,3 +96,3 @@ import { PageElement } from '../models'; | ||
*/ | ||
export declare class Attribute<Native_Element_Type> extends Question<Promise<string>> implements MetaQuestion<PageElement<Native_Element_Type>, Question<Promise<string>>> { | ||
export declare class Attribute<Native_Element_Type> extends Question<Promise<string>> implements MetaQuestion<PageElement<Native_Element_Type>, Question<Promise<string>>>, Optional { | ||
private readonly name; | ||
@@ -127,2 +127,6 @@ private readonly element?; | ||
*/ | ||
isPresent(): QuestionAdapter<boolean>; | ||
/** | ||
* @inheritDoc | ||
*/ | ||
describedAs(subject: string): this; | ||
@@ -129,0 +133,0 @@ /** |
@@ -148,2 +148,11 @@ "use strict"; | ||
*/ | ||
isPresent() { | ||
return core_1.Question.about(this.subject, async (actor) => { | ||
const attribute = await this.answeredBy(actor); | ||
return attribute !== null && attribute !== undefined; | ||
}); | ||
} | ||
/** | ||
* @inheritDoc | ||
*/ | ||
describedAs(subject) { | ||
@@ -150,0 +159,0 @@ this.subject = subject; |
{ | ||
"name": "@serenity-js/web", | ||
"version": "3.17.0", | ||
"version": "3.18.0", | ||
"description": "Serenity/JS Screenplay Pattern APIs for the Web", | ||
@@ -48,4 +48,4 @@ "author": { | ||
"dependencies": { | ||
"@serenity-js/assertions": "3.17.0", | ||
"@serenity-js/core": "3.17.0", | ||
"@serenity-js/assertions": "3.18.0", | ||
"@serenity-js/core": "3.18.0", | ||
"tiny-types": "1.21.0" | ||
@@ -63,3 +63,3 @@ }, | ||
}, | ||
"gitHead": "a60f6d1cb17807240f32f6c7cb1014df52f26c16" | ||
"gitHead": "c4f12cc2dd366788b88fd06b4452084a6b36b5fe" | ||
} |
@@ -1,2 +0,2 @@ | ||
import type { Answerable, AnswersQuestions, MetaQuestion, MetaQuestionAdapter,QuestionAdapter, UsesAbilities } from '@serenity-js/core'; | ||
import type { Answerable, AnswersQuestions, MetaQuestion, MetaQuestionAdapter, Optional, QuestionAdapter, UsesAbilities } from '@serenity-js/core'; | ||
import { d, LogicError, Question } from '@serenity-js/core'; | ||
@@ -100,3 +100,3 @@ | ||
extends Question<Promise<string>> | ||
implements MetaQuestion<PageElement<Native_Element_Type>, Question<Promise<string>>> | ||
implements MetaQuestion<PageElement<Native_Element_Type>, Question<Promise<string>>>, Optional | ||
{ | ||
@@ -164,2 +164,12 @@ private subject: string; | ||
*/ | ||
isPresent(): QuestionAdapter<boolean> { | ||
return Question.about(this.subject, async actor => { | ||
const attribute = await this.answeredBy(actor); | ||
return attribute !== null && attribute !== undefined; | ||
}); | ||
} | ||
/** | ||
* @inheritDoc | ||
*/ | ||
describedAs(subject: string): this { | ||
@@ -166,0 +176,0 @@ this.subject = subject; |
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
716669
15255
+ Added@serenity-js/assertions@3.18.0(transitive)
+ Added@serenity-js/core@3.18.0(transitive)
+ Addeddiff@5.2.0(transitive)
- Removed@serenity-js/assertions@3.17.0(transitive)
- Removed@serenity-js/core@3.17.0(transitive)
- Removeddiff@5.1.0(transitive)
Updated@serenity-js/core@3.18.0