Socket
Socket
Sign inDemoInstall

@serenity-js/web

Package Overview
Dependencies
Maintainers
1
Versions
118
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@serenity-js/web - npm Package Compare versions

Comparing version 3.17.0 to 3.18.0

11

CHANGELOG.md

@@ -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 @@

8

lib/screenplay/questions/Attribute.d.ts

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc