@serenity-js/web 3.4.2 → 3.5.0
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.
- package/CHANGELOG.md +11 -0
- package/lib/expectations/isActive.d.ts +1 -1
- package/lib/expectations/isActive.d.ts.map +1 -1
- package/lib/expectations/isClickable.d.ts +1 -1
- package/lib/expectations/isClickable.d.ts.map +1 -1
- package/lib/expectations/isEnabled.d.ts +1 -1
- package/lib/expectations/isEnabled.d.ts.map +1 -1
- package/lib/expectations/isSelected.d.ts +1 -1
- package/lib/expectations/isSelected.d.ts.map +1 -1
- package/lib/expectations/isVisible.d.ts +1 -1
- package/lib/expectations/isVisible.d.ts.map +1 -1
- package/lib/screenplay/abilities/BrowseTheWeb.d.ts +1 -1
- package/lib/screenplay/abilities/BrowseTheWeb.d.ts.map +1 -1
- package/lib/screenplay/interactions/Clear.d.ts +2 -2
- package/lib/screenplay/interactions/Clear.d.ts.map +1 -1
- package/lib/screenplay/interactions/Clear.js.map +1 -1
- package/lib/screenplay/interactions/Click.d.ts +2 -2
- package/lib/screenplay/interactions/Click.d.ts.map +1 -1
- package/lib/screenplay/interactions/Click.js.map +1 -1
- package/lib/screenplay/interactions/DoubleClick.d.ts +2 -2
- package/lib/screenplay/interactions/DoubleClick.d.ts.map +1 -1
- package/lib/screenplay/interactions/DoubleClick.js.map +1 -1
- package/lib/screenplay/interactions/Enter.d.ts +2 -2
- package/lib/screenplay/interactions/Enter.d.ts.map +1 -1
- package/lib/screenplay/interactions/Enter.js.map +1 -1
- package/lib/screenplay/interactions/ExecuteScript.d.ts +2 -1
- package/lib/screenplay/interactions/ExecuteScript.d.ts.map +1 -1
- package/lib/screenplay/interactions/ExecuteScript.js.map +1 -1
- package/lib/screenplay/interactions/Hover.d.ts +2 -2
- package/lib/screenplay/interactions/Hover.d.ts.map +1 -1
- package/lib/screenplay/interactions/Hover.js.map +1 -1
- package/lib/screenplay/interactions/Navigate.d.ts +2 -1
- package/lib/screenplay/interactions/Navigate.d.ts.map +1 -1
- package/lib/screenplay/interactions/Navigate.js.map +1 -1
- package/lib/screenplay/interactions/PageElementInteraction.d.ts +4 -3
- package/lib/screenplay/interactions/PageElementInteraction.d.ts.map +1 -1
- package/lib/screenplay/interactions/PageElementInteraction.js.map +1 -1
- package/lib/screenplay/interactions/Press.d.ts +4 -2
- package/lib/screenplay/interactions/Press.d.ts.map +1 -1
- package/lib/screenplay/interactions/Press.js.map +1 -1
- package/lib/screenplay/interactions/RightClick.d.ts +2 -2
- package/lib/screenplay/interactions/RightClick.d.ts.map +1 -1
- package/lib/screenplay/interactions/RightClick.js.map +1 -1
- package/lib/screenplay/interactions/Scroll.d.ts +3 -2
- package/lib/screenplay/interactions/Scroll.d.ts.map +1 -1
- package/lib/screenplay/interactions/Scroll.js.map +1 -1
- package/lib/screenplay/interactions/Select.d.ts +2 -2
- package/lib/screenplay/interactions/Select.d.ts.map +1 -1
- package/lib/screenplay/interactions/Select.js.map +1 -1
- package/lib/screenplay/interactions/Switch.d.ts +3 -2
- package/lib/screenplay/interactions/Switch.d.ts.map +1 -1
- package/lib/screenplay/interactions/Switch.js.map +1 -1
- package/lib/screenplay/interactions/TakeScreenshot.d.ts +2 -1
- package/lib/screenplay/interactions/TakeScreenshot.d.ts.map +1 -1
- package/lib/screenplay/interactions/TakeScreenshot.js.map +1 -1
- package/lib/screenplay/models/BrowsingSession.d.ts +2 -2
- package/lib/screenplay/models/BrowsingSession.d.ts.map +1 -1
- package/lib/screenplay/models/Cookie.d.ts +3 -2
- package/lib/screenplay/models/Cookie.d.ts.map +1 -1
- package/lib/screenplay/models/Cookie.js.map +1 -1
- package/lib/screenplay/models/CookieData.d.ts +1 -1
- package/lib/screenplay/models/CookieData.d.ts.map +1 -1
- package/lib/screenplay/models/Key.js +1 -1
- package/lib/screenplay/models/Key.js.map +1 -1
- package/lib/screenplay/models/Locator.d.ts +2 -2
- package/lib/screenplay/models/Locator.d.ts.map +1 -1
- package/lib/screenplay/models/Page.d.ts +14 -14
- package/lib/screenplay/models/Page.d.ts.map +1 -1
- package/lib/screenplay/models/Page.js.map +1 -1
- package/lib/screenplay/models/PageElement.d.ts +6 -6
- package/lib/screenplay/models/PageElement.d.ts.map +1 -1
- package/lib/screenplay/models/PageElement.js.map +1 -1
- package/lib/screenplay/models/PageElements.d.ts +5 -4
- package/lib/screenplay/models/PageElements.d.ts.map +1 -1
- package/lib/screenplay/models/PageElements.js.map +1 -1
- package/lib/screenplay/models/RootLocator.d.ts +1 -1
- package/lib/screenplay/models/RootLocator.d.ts.map +1 -1
- package/lib/screenplay/models/Switchable.d.ts +1 -1
- package/lib/screenplay/models/Switchable.d.ts.map +1 -1
- package/lib/screenplay/models/dialogs/ModalDialog.d.ts +1 -1
- package/lib/screenplay/models/dialogs/ModalDialog.d.ts.map +1 -1
- package/lib/screenplay/models/dialogs/ModalDialog.js.map +1 -1
- package/lib/screenplay/models/dialogs/ModalDialogHandler.d.ts +1 -1
- package/lib/screenplay/models/dialogs/ModalDialogHandler.d.ts.map +1 -1
- package/lib/screenplay/models/selectors/By.d.ts +2 -1
- package/lib/screenplay/models/selectors/By.d.ts.map +1 -1
- package/lib/screenplay/models/selectors/By.js.map +1 -1
- package/lib/screenplay/questions/Attribute.d.ts +2 -1
- package/lib/screenplay/questions/Attribute.d.ts.map +1 -1
- package/lib/screenplay/questions/Attribute.js.map +1 -1
- package/lib/screenplay/questions/CssClasses.d.ts +2 -1
- package/lib/screenplay/questions/CssClasses.d.ts.map +1 -1
- package/lib/screenplay/questions/CssClasses.js.map +1 -1
- package/lib/screenplay/questions/LastScriptExecution.d.ts +1 -1
- package/lib/screenplay/questions/LastScriptExecution.d.ts.map +1 -1
- package/lib/screenplay/questions/LastScriptExecution.js.map +1 -1
- package/lib/screenplay/questions/Selected.d.ts +2 -2
- package/lib/screenplay/questions/Selected.d.ts.map +1 -1
- package/lib/screenplay/questions/Selected.js.map +1 -1
- package/lib/screenplay/questions/Text.d.ts +1 -1
- package/lib/screenplay/questions/Text.d.ts.map +1 -1
- package/lib/screenplay/questions/Text.js.map +1 -1
- package/lib/screenplay/questions/Value.d.ts +2 -1
- package/lib/screenplay/questions/Value.d.ts.map +1 -1
- package/lib/screenplay/questions/Value.js.map +1 -1
- package/lib/stage/crew/photographer/Photographer.d.ts +2 -2
- package/lib/stage/crew/photographer/Photographer.d.ts.map +1 -1
- package/lib/stage/crew/photographer/Photographer.js.map +1 -1
- package/lib/stage/crew/photographer/strategies/PhotoTakingStrategy.d.ts +2 -2
- package/lib/stage/crew/photographer/strategies/PhotoTakingStrategy.d.ts.map +1 -1
- package/lib/stage/crew/photographer/strategies/PhotoTakingStrategy.js.map +1 -1
- package/lib/stage/crew/photographer/strategies/TakePhotosBeforeAndAfterInteractions.d.ts +2 -1
- package/lib/stage/crew/photographer/strategies/TakePhotosBeforeAndAfterInteractions.d.ts.map +1 -1
- package/lib/stage/crew/photographer/strategies/TakePhotosBeforeAndAfterInteractions.js.map +1 -1
- package/lib/stage/crew/photographer/strategies/TakePhotosOfFailures.d.ts +2 -1
- package/lib/stage/crew/photographer/strategies/TakePhotosOfFailures.d.ts.map +1 -1
- package/lib/stage/crew/photographer/strategies/TakePhotosOfFailures.js.map +1 -1
- package/lib/stage/crew/photographer/strategies/TakePhotosOfInteractions.d.ts +2 -1
- package/lib/stage/crew/photographer/strategies/TakePhotosOfInteractions.d.ts.map +1 -1
- package/lib/stage/crew/photographer/strategies/TakePhotosOfInteractions.js.map +1 -1
- package/package.json +5 -5
- package/src/expectations/isActive.ts +1 -1
- package/src/expectations/isClickable.ts +1 -1
- package/src/expectations/isEnabled.ts +1 -1
- package/src/expectations/isSelected.ts +1 -1
- package/src/expectations/isVisible.ts +1 -1
- package/src/screenplay/abilities/BrowseTheWeb.ts +1 -1
- package/src/screenplay/interactions/Clear.ts +3 -2
- package/src/screenplay/interactions/Click.ts +3 -2
- package/src/screenplay/interactions/DoubleClick.ts +3 -2
- package/src/screenplay/interactions/Enter.ts +3 -2
- package/src/screenplay/interactions/ExecuteScript.ts +2 -1
- package/src/screenplay/interactions/Hover.ts +3 -2
- package/src/screenplay/interactions/Navigate.ts +2 -1
- package/src/screenplay/interactions/PageElementInteraction.ts +4 -3
- package/src/screenplay/interactions/Press.ts +4 -2
- package/src/screenplay/interactions/RightClick.ts +4 -3
- package/src/screenplay/interactions/Scroll.ts +3 -2
- package/src/screenplay/interactions/Select.ts +4 -2
- package/src/screenplay/interactions/Switch.ts +3 -2
- package/src/screenplay/interactions/TakeScreenshot.ts +2 -1
- package/src/screenplay/models/BrowsingSession.ts +2 -2
- package/src/screenplay/models/Cookie.ts +5 -3
- package/src/screenplay/models/CookieData.ts +1 -1
- package/src/screenplay/models/Locator.ts +2 -2
- package/src/screenplay/models/Page.ts +15 -14
- package/src/screenplay/models/PageElement.ts +7 -6
- package/src/screenplay/models/PageElements.ts +5 -4
- package/src/screenplay/models/RootLocator.ts +1 -1
- package/src/screenplay/models/Switchable.ts +1 -1
- package/src/screenplay/models/dialogs/ModalDialog.ts +2 -1
- package/src/screenplay/models/dialogs/ModalDialogHandler.ts +1 -1
- package/src/screenplay/models/selectors/By.ts +2 -1
- package/src/screenplay/questions/Attribute.ts +2 -1
- package/src/screenplay/questions/CssClasses.ts +2 -1
- package/src/screenplay/questions/LastScriptExecution.ts +2 -1
- package/src/screenplay/questions/Selected.ts +3 -2
- package/src/screenplay/questions/Text.ts +2 -1
- package/src/screenplay/questions/Value.ts +2 -1
- package/src/stage/crew/photographer/Photographer.ts +3 -2
- package/src/stage/crew/photographer/strategies/PhotoTakingStrategy.ts +4 -2
- package/src/stage/crew/photographer/strategies/TakePhotosBeforeAndAfterInteractions.ts +2 -1
- package/src/stage/crew/photographer/strategies/TakePhotosOfFailures.ts +2 -1
- package/src/stage/crew/photographer/strategies/TakePhotosOfInteractions.ts +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TakePhotosOfFailures.js","sourceRoot":"","sources":["../../../../../src/stage/crew/photographer/strategies/TakePhotosOfFailures.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"TakePhotosOfFailures.js","sourceRoot":"","sources":["../../../../../src/stage/crew/photographer/strategies/TakePhotosOfFailures.ts"],"names":[],"mappings":";;;AACA,yDAAmE;AACnE,uDAAoE;AAEpE,+DAA4D;AAE5D;;;;;;;;;;GAUG;AACH,MAAa,oBAAqB,SAAQ,yCAAmB;IAC/C,kBAAkB,CAAC,KAAkB;QAC3C,OAAO,KAAK,YAAY,4BAAmB;eACpC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,6BAAqB,CAAC,CAAC;IAC5D,CAAC;IAES,YAAY,CAAC,KAA0B;QAC7C,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;IACpC,CAAC;CACJ;AATD,oDASC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { DomainEvent
|
|
1
|
+
import type { DomainEvent } from '@serenity-js/core/lib/events';
|
|
2
|
+
import { InteractionFinished } from '@serenity-js/core/lib/events';
|
|
2
3
|
import { PhotoTakingStrategy } from './PhotoTakingStrategy';
|
|
3
4
|
/**
|
|
4
5
|
* Configures the {@apilink Photographer} to take photos (a.k.a. screenshots)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TakePhotosOfInteractions.d.ts","sourceRoot":"","sources":["../../../../../src/stage/crew/photographer/strategies/TakePhotosOfInteractions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"TakePhotosOfInteractions.d.ts","sourceRoot":"","sources":["../../../../../src/stage/crew/photographer/strategies/TakePhotosOfInteractions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAC,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAEnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;;;;;;;;;;GAWG;AACH,qBAAa,wBAAyB,SAAQ,mBAAmB;IAC7D,SAAS,CAAC,kBAAkB,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO;IAIzD,SAAS,CAAC,YAAY,CAAC,KAAK,EAAE,mBAAmB,GAAG,MAAM;CAG7D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TakePhotosOfInteractions.js","sourceRoot":"","sources":["../../../../../src/stage/crew/photographer/strategies/TakePhotosOfInteractions.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"TakePhotosOfInteractions.js","sourceRoot":"","sources":["../../../../../src/stage/crew/photographer/strategies/TakePhotosOfInteractions.ts"],"names":[],"mappings":";;;AACA,yDAAmE;AAEnE,+DAA4D;AAE5D;;;;;;;;;;;GAWG;AACH,MAAa,wBAAyB,SAAQ,yCAAmB;IACnD,kBAAkB,CAAC,KAAkB;QAC3C,OAAO,KAAK,YAAY,4BAAmB,CAAC;IAChD,CAAC;IAES,YAAY,CAAC,KAA0B;QAC7C,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;IACpC,CAAC;CACJ;AARD,4DAQC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serenity-js/web",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0",
|
|
4
4
|
"description": "Serenity/JS Screenplay Pattern APIs for the Web",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Jan Molak",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"node": "^16.13 || ^18.12 || ^20"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@serenity-js/assertions": "3.
|
|
48
|
-
"@serenity-js/core": "3.
|
|
47
|
+
"@serenity-js/assertions": "3.5.0",
|
|
48
|
+
"@serenity-js/core": "3.5.0",
|
|
49
49
|
"tiny-types": "^1.19.1"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"mocha": "^10.2.0",
|
|
57
57
|
"mocha-multi": "^1.1.7",
|
|
58
58
|
"ts-node": "^10.9.1",
|
|
59
|
-
"typescript": "^5.
|
|
59
|
+
"typescript": "^5.1.6"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "c34ec9a491ded36cc178f219a9b3cae058c34c2b"
|
|
62
62
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { and, isPresent } from '@serenity-js/assertions';
|
|
2
2
|
import { Expectation } from '@serenity-js/core';
|
|
3
3
|
|
|
4
|
-
import { PageElement } from '../screenplay';
|
|
4
|
+
import type { PageElement } from '../screenplay';
|
|
5
5
|
|
|
6
6
|
const isElementActive = Expectation.define(
|
|
7
7
|
'isActive', 'become active',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { and, isPresent } from '@serenity-js/assertions';
|
|
2
2
|
import { Expectation } from '@serenity-js/core';
|
|
3
3
|
|
|
4
|
-
import { PageElement } from '../screenplay';
|
|
4
|
+
import type { PageElement } from '../screenplay';
|
|
5
5
|
|
|
6
6
|
const isElementClickable = Expectation.define(
|
|
7
7
|
'isClickable', 'become clickable',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { and, isPresent } from '@serenity-js/assertions';
|
|
2
2
|
import { Expectation } from '@serenity-js/core';
|
|
3
3
|
|
|
4
|
-
import { PageElement } from '../screenplay';
|
|
4
|
+
import type { PageElement } from '../screenplay';
|
|
5
5
|
|
|
6
6
|
const isElementEnabled = Expectation.define(
|
|
7
7
|
'isEnabled', 'become enabled',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { and, isPresent } from '@serenity-js/assertions';
|
|
2
2
|
import { Expectation } from '@serenity-js/core';
|
|
3
3
|
|
|
4
|
-
import { PageElement } from '../screenplay';
|
|
4
|
+
import type { PageElement } from '../screenplay';
|
|
5
5
|
|
|
6
6
|
const isElementSelected = Expectation.define(
|
|
7
7
|
'isSelected', 'become selected',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { and, isPresent } from '@serenity-js/assertions';
|
|
2
2
|
import { Expectation } from '@serenity-js/core';
|
|
3
3
|
|
|
4
|
-
import { PageElement } from '../screenplay';
|
|
4
|
+
import type { PageElement } from '../screenplay';
|
|
5
5
|
|
|
6
6
|
const isElementVisible = Expectation.define(
|
|
7
7
|
'isVisible', 'become visible',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Ability } from '@serenity-js/core';
|
|
2
2
|
|
|
3
|
-
import { BrowserCapabilities, BrowsingSession, Page } from '../models';
|
|
3
|
+
import type { BrowserCapabilities, BrowsingSession, Page } from '../models';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* The {@apilink Ability|ability} to `BrowseTheWeb` enables an {@apilink Actor|actor}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Answerable, AnswersQuestions,
|
|
1
|
+
import type { Answerable, AnswersQuestions, Interaction, UsesAbilities } from '@serenity-js/core';
|
|
2
|
+
import { d, LogicError } from '@serenity-js/core';
|
|
2
3
|
|
|
3
|
-
import { PageElement } from '../models';
|
|
4
|
+
import type { PageElement } from '../models';
|
|
4
5
|
import { PageElementInteraction } from './PageElementInteraction';
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Answerable, AnswersQuestions,
|
|
1
|
+
import type { Answerable, AnswersQuestions, Interaction, UsesAbilities } from '@serenity-js/core';
|
|
2
|
+
import { d } from '@serenity-js/core';
|
|
2
3
|
|
|
3
|
-
import { PageElement } from '../models';
|
|
4
|
+
import type { PageElement } from '../models';
|
|
4
5
|
import { PageElementInteraction } from './PageElementInteraction';
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Answerable, AnswersQuestions,
|
|
1
|
+
import type { Answerable, AnswersQuestions, Interaction, UsesAbilities } from '@serenity-js/core';
|
|
2
|
+
import { d } from '@serenity-js/core';
|
|
2
3
|
|
|
3
|
-
import { PageElement } from '../models';
|
|
4
|
+
import type { PageElement } from '../models';
|
|
4
5
|
import { PageElementInteraction } from './PageElementInteraction';
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Answerable, AnswersQuestions,
|
|
1
|
+
import type { Answerable, AnswersQuestions, Interaction, UsesAbilities } from '@serenity-js/core';
|
|
2
|
+
import { d } from '@serenity-js/core';
|
|
2
3
|
import { asyncMap } from '@serenity-js/core/lib/io';
|
|
3
4
|
|
|
4
|
-
import { PageElement } from '../models';
|
|
5
|
+
import type { PageElement } from '../models';
|
|
5
6
|
import { PageElementInteraction } from './PageElementInteraction';
|
|
6
7
|
|
|
7
8
|
/**
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Answerable, AnswersQuestions, CollectsArtifacts,
|
|
1
|
+
import type { Answerable, AnswersQuestions, CollectsArtifacts, UsesAbilities } from '@serenity-js/core';
|
|
2
|
+
import { f, Interaction, LogicError } from '@serenity-js/core';
|
|
2
3
|
import { asyncMap } from '@serenity-js/core/lib/io';
|
|
3
4
|
import { Name, TextData } from '@serenity-js/core/lib/model';
|
|
4
5
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Answerable, AnswersQuestions,
|
|
1
|
+
import type { Answerable, AnswersQuestions, Interaction, UsesAbilities } from '@serenity-js/core';
|
|
2
|
+
import { d } from '@serenity-js/core';
|
|
2
3
|
|
|
3
|
-
import { PageElement } from '../models';
|
|
4
|
+
import type { PageElement } from '../models';
|
|
4
5
|
import { PageElementInteraction } from './PageElementInteraction';
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Answerable, AnswersQuestions,
|
|
1
|
+
import type { Answerable, AnswersQuestions, UsesAbilities } from '@serenity-js/core';
|
|
2
|
+
import { d, Interaction, TestCompromisedError } from '@serenity-js/core';
|
|
2
3
|
|
|
3
4
|
import { BrowseTheWeb } from '../abilities';
|
|
4
5
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Answerable, AnswersQuestions
|
|
2
|
-
import {
|
|
1
|
+
import type { Answerable, AnswersQuestions} from '@serenity-js/core';
|
|
2
|
+
import { d, Interaction, LogicError } from '@serenity-js/core';
|
|
3
|
+
import type { FileSystemLocation } from '@serenity-js/core/lib/io';
|
|
3
4
|
|
|
4
|
-
import { PageElement } from '../models';
|
|
5
|
+
import type { PageElement } from '../models';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* A base class for interactions with {@apilink PageElement} objects.
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { Activity, Answerable, AnswersQuestions,
|
|
1
|
+
import type { Activity, Answerable, AnswersQuestions, UsesAbilities } from '@serenity-js/core';
|
|
2
|
+
import { d, Interaction, Question } from '@serenity-js/core';
|
|
2
3
|
import { asyncMap } from '@serenity-js/core/lib/io';
|
|
3
4
|
|
|
4
5
|
import { BrowseTheWeb } from '../abilities';
|
|
5
|
-
import {
|
|
6
|
+
import type { PageElement } from '../models';
|
|
7
|
+
import { Key } from '../models';
|
|
6
8
|
import { PageElementInteraction } from './PageElementInteraction';
|
|
7
9
|
|
|
8
10
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Answerable, AnswersQuestions,
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type { Answerable, AnswersQuestions, Interaction, UsesAbilities } from '@serenity-js/core';
|
|
2
|
+
import { d } from '@serenity-js/core';
|
|
3
|
+
|
|
4
|
+
import type { PageElement } from '../models';
|
|
4
5
|
import { PageElementInteraction } from './PageElementInteraction';
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Answerable, AnswersQuestions,
|
|
1
|
+
import type { Answerable, AnswersQuestions, UsesAbilities } from '@serenity-js/core';
|
|
2
|
+
import { d, Interaction } from '@serenity-js/core';
|
|
2
3
|
|
|
3
|
-
import { PageElement } from '../models';
|
|
4
|
+
import type { PageElement } from '../models';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Instructs an {@apilink Actor|actor} who has the {@apilink Ability|ability} to {@apilink BrowseTheWeb}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { Answerable
|
|
1
|
+
import type { Answerable} from '@serenity-js/core';
|
|
2
|
+
import { d } from '@serenity-js/core';
|
|
2
3
|
import { asyncMap, commaSeparated } from '@serenity-js/core/lib/io';
|
|
3
4
|
import { stringified } from '@serenity-js/core/lib/io/stringified';
|
|
4
5
|
import { Interaction } from '@serenity-js/core/lib/screenplay';
|
|
5
6
|
|
|
6
|
-
import { PageElement
|
|
7
|
+
import type { PageElement} from '../models';
|
|
8
|
+
import { SelectOption } from '../models';
|
|
7
9
|
|
|
8
10
|
/**
|
|
9
11
|
* Instructs an {@apilink Actor|actor} who has the {@apilink Ability|ability} to {@apilink BrowseTheWeb}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Activity, Actor, Answerable, AnswersQuestions,
|
|
1
|
+
import type { Activity, Actor, Answerable, AnswersQuestions, UsesAbilities } from '@serenity-js/core';
|
|
2
|
+
import { Interaction, Task } from '@serenity-js/core';
|
|
2
3
|
|
|
3
|
-
import { Switchable } from '../models';
|
|
4
|
+
import type { Switchable } from '../models';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Instructs an {@apilink Actor|actor} who has the {@apilink Ability|ability} to {@apilink BrowseTheWeb}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Answerable, AnswersQuestions, CollectsArtifacts,
|
|
1
|
+
import type { Answerable, AnswersQuestions, CollectsArtifacts, UsesAbilities } from '@serenity-js/core';
|
|
2
|
+
import { d, Interaction } from '@serenity-js/core';
|
|
2
3
|
import { Name, Photo } from '@serenity-js/core/lib/model';
|
|
3
4
|
|
|
4
5
|
import { BrowseTheWeb } from '../abilities';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CorrelationId } from '@serenity-js/core/lib/model';
|
|
1
|
+
import type { CorrelationId } from '@serenity-js/core/lib/model';
|
|
2
2
|
|
|
3
|
-
import { Page } from './Page';
|
|
3
|
+
import type { Page } from './Page';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Represents the pages open in the current browsing context.
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { Answerable,
|
|
2
|
-
import {
|
|
1
|
+
import type { Answerable, Optional, QuestionAdapter, WithAnswerableProperties } from '@serenity-js/core';
|
|
2
|
+
import { d, Interaction, Question, Timestamp } from '@serenity-js/core';
|
|
3
|
+
import type { Predicate } from 'tiny-types';
|
|
4
|
+
import { ensure, isBoolean, isDefined, isInstanceOf, isOneOf, isPlainObject, isString } from 'tiny-types';
|
|
3
5
|
|
|
4
6
|
import { CookieMissingError } from '../../errors';
|
|
5
7
|
import { BrowseTheWeb } from '../abilities';
|
|
6
|
-
import { CookieData } from './CookieData';
|
|
8
|
+
import type { CookieData } from './CookieData';
|
|
7
9
|
|
|
8
10
|
/**
|
|
9
11
|
* A Screenplay Pattern-style model responsible for managing cookies available to the current {@apilink Page}.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { inspectedObject } from '@serenity-js/core/lib/io';
|
|
2
2
|
import * as util from 'util'; // eslint-disable-line unicorn/import-style
|
|
3
3
|
|
|
4
|
-
import { PageElement } from './PageElement';
|
|
4
|
+
import type { PageElement } from './PageElement';
|
|
5
5
|
import { RootLocator } from './RootLocator';
|
|
6
|
-
import { Selector } from './selectors';
|
|
6
|
+
import type { Selector } from './selectors';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* {@apilink Locator} uses a {@apilink Selector} to locate a {@apilink PageElement} or {@apilink PageElements}
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { Expectation,
|
|
2
|
-
import {
|
|
1
|
+
import type { Expectation, ExpectationOutcome, Optional, QuestionAdapter } from '@serenity-js/core';
|
|
2
|
+
import { ExpectationMet, LogicError, Question } from '@serenity-js/core';
|
|
3
|
+
import type { CorrelationId } from '@serenity-js/core/lib/model';
|
|
3
4
|
import { ensure, isDefined } from 'tiny-types';
|
|
4
|
-
import { URL } from 'url';
|
|
5
|
+
import type { URL } from 'url';
|
|
5
6
|
|
|
6
7
|
import { BrowseTheWeb } from '../abilities';
|
|
7
|
-
import { BrowsingSession } from './BrowsingSession';
|
|
8
|
-
import { Cookie } from './Cookie';
|
|
9
|
-
import { CookieData } from './CookieData';
|
|
10
|
-
import { ModalDialogHandler } from './dialogs';
|
|
11
|
-
import { Key } from './Key';
|
|
12
|
-
import { PageElement } from './PageElement';
|
|
13
|
-
import { PageElements } from './PageElements';
|
|
14
|
-
import { RootLocator } from './RootLocator';
|
|
15
|
-
import { Selector } from './selectors';
|
|
16
|
-
import { Switchable } from './Switchable';
|
|
17
|
-
import { SwitchableOrigin } from './SwitchableOrigin';
|
|
8
|
+
import type { BrowsingSession } from './BrowsingSession';
|
|
9
|
+
import type { Cookie } from './Cookie';
|
|
10
|
+
import type { CookieData } from './CookieData';
|
|
11
|
+
import type { ModalDialogHandler } from './dialogs';
|
|
12
|
+
import type { Key } from './Key';
|
|
13
|
+
import type { PageElement } from './PageElement';
|
|
14
|
+
import type { PageElements } from './PageElements';
|
|
15
|
+
import type { RootLocator } from './RootLocator';
|
|
16
|
+
import type { Selector } from './selectors';
|
|
17
|
+
import type { Switchable } from './Switchable';
|
|
18
|
+
import type { SwitchableOrigin } from './SwitchableOrigin';
|
|
18
19
|
|
|
19
20
|
/**
|
|
20
21
|
* Serenity/JS Screenplay Pattern-style model that enables interactions with a Web page
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { Answerable,
|
|
1
|
+
import type { Answerable, MetaQuestion, Optional, QuestionAdapter } from '@serenity-js/core';
|
|
2
|
+
import { d, Question } from '@serenity-js/core';
|
|
2
3
|
import { ensure, isDefined } from 'tiny-types';
|
|
3
4
|
|
|
4
5
|
import { BrowseTheWeb } from '../abilities';
|
|
5
|
-
import { Locator } from './Locator';
|
|
6
|
-
import { SelectOption } from './SelectOption';
|
|
7
|
-
import { Selector } from './selectors';
|
|
8
|
-
import { Switchable } from './Switchable';
|
|
9
|
-
import { SwitchableOrigin } from './SwitchableOrigin';
|
|
6
|
+
import type { Locator } from './Locator';
|
|
7
|
+
import type { SelectOption } from './SelectOption';
|
|
8
|
+
import type { Selector } from './selectors';
|
|
9
|
+
import type { Switchable } from './Switchable';
|
|
10
|
+
import type { SwitchableOrigin } from './SwitchableOrigin';
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
13
|
* Uses the {@apilink Actor|actor's} {@apilink Ability|ability} to {@apilink BrowseTheWeb} to identify
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { Answerable,
|
|
1
|
+
import type { Answerable, MetaQuestion} from '@serenity-js/core';
|
|
2
|
+
import { List, Question } from '@serenity-js/core';
|
|
2
3
|
|
|
3
4
|
import { BrowseTheWeb } from '../abilities';
|
|
4
|
-
import { Locator } from './Locator';
|
|
5
|
-
import { PageElement } from './PageElement';
|
|
6
|
-
import { Selector } from './selectors';
|
|
5
|
+
import type { Locator } from './Locator';
|
|
6
|
+
import type { PageElement } from './PageElement';
|
|
7
|
+
import type { Selector } from './selectors';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Uses the {@apilink Actor|actor's} {@apilink Ability|ability} to {@apilink BrowseTheWeb} to identify
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Answerable,
|
|
1
|
+
import type { Answerable, Interaction, Optional, Question, QuestionAdapter } from '@serenity-js/core';
|
|
2
|
+
import { d } from '@serenity-js/core';
|
|
2
3
|
|
|
3
4
|
import { Page } from '../Page';
|
|
4
5
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ensure, isDefined } from 'tiny-types';
|
|
2
2
|
|
|
3
3
|
import { AbsentModalDialog } from './AbsentModalDialog';
|
|
4
|
-
import { ModalDialog } from './ModalDialog';
|
|
4
|
+
import type { ModalDialog } from './ModalDialog';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Represent the strategy to use with any upcoming {@apilink ModalDialog} windows.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Answerable, AnswersQuestions,
|
|
1
|
+
import type { Answerable, AnswersQuestions, MetaQuestion, QuestionAdapter, UsesAbilities } from '@serenity-js/core';
|
|
2
|
+
import { d, LogicError, Question } from '@serenity-js/core';
|
|
2
3
|
|
|
3
4
|
import { PageElement } from '../models';
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Answerable, AnswersQuestions,
|
|
1
|
+
import type { Answerable, AnswersQuestions, MetaQuestion, QuestionAdapter, UsesAbilities } from '@serenity-js/core';
|
|
2
|
+
import { d, Question } from '@serenity-js/core';
|
|
2
3
|
|
|
3
4
|
import { PageElement } from '../models';
|
|
4
5
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Answerable,
|
|
1
|
+
import type { Answerable, QuestionAdapter } from '@serenity-js/core';
|
|
2
|
+
import { d, Question } from '@serenity-js/core';
|
|
2
3
|
|
|
3
|
-
import { PageElement } from '../models';
|
|
4
|
+
import type { PageElement } from '../models';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Uses the {@apilink Actor|actor's} {@apilink Ability|ability} to {@apilink BrowseTheWeb} to retrieve
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Answerable, AnswersQuestions,
|
|
1
|
+
import type { Answerable, AnswersQuestions, MetaQuestion, QuestionAdapter, UsesAbilities } from '@serenity-js/core';
|
|
2
|
+
import { d, Question } from '@serenity-js/core';
|
|
2
3
|
import { asyncMap } from '@serenity-js/core/lib/io';
|
|
3
4
|
|
|
4
5
|
import { PageElement, PageElements } from '../models';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Answerable, AnswersQuestions,
|
|
1
|
+
import type { Answerable, AnswersQuestions, MetaQuestion, QuestionAdapter, UsesAbilities } from '@serenity-js/core';
|
|
2
|
+
import { d, Question } from '@serenity-js/core';
|
|
2
3
|
|
|
3
4
|
import { PageElement } from '../models';
|
|
4
5
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ConfigurationError, LogicError } from '@serenity-js/core';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { DomainEvent } from '@serenity-js/core/lib/events';
|
|
3
|
+
import { ActivityFinished, ActivityStarts } from '@serenity-js/core/lib/events';
|
|
4
|
+
import type { Stage, StageCrewMember } from '@serenity-js/core/lib/stage';
|
|
4
5
|
|
|
5
6
|
import * as strategies from './strategies';
|
|
6
7
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { Stage } from '@serenity-js/core';
|
|
2
|
+
import { LogicError } from '@serenity-js/core';
|
|
3
|
+
import type { ActivityFinished, ActivityStarts, DomainEvent } from '@serenity-js/core/lib/events';
|
|
4
|
+
import { ActivityRelatedArtifactGenerated, AsyncOperationAborted, AsyncOperationAttempted, AsyncOperationCompleted, AsyncOperationFailed } from '@serenity-js/core/lib/events';
|
|
3
5
|
import { CorrelationId, Description, Name, Photo } from '@serenity-js/core/lib/model';
|
|
4
6
|
|
|
5
7
|
import { BrowseTheWeb } from '../../../../screenplay';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { DomainEvent
|
|
1
|
+
import type { DomainEvent} from '@serenity-js/core/lib/events';
|
|
2
|
+
import { InteractionFinished, InteractionStarts } from '@serenity-js/core/lib/events';
|
|
2
3
|
|
|
3
4
|
import { PhotoTakingStrategy } from './PhotoTakingStrategy';
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { DomainEvent
|
|
1
|
+
import type { DomainEvent} from '@serenity-js/core/lib/events';
|
|
2
|
+
import { InteractionFinished } from '@serenity-js/core/lib/events';
|
|
2
3
|
import { ImplementationPending } from '@serenity-js/core/lib/model';
|
|
3
4
|
|
|
4
5
|
import { PhotoTakingStrategy } from './PhotoTakingStrategy';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { DomainEvent
|
|
1
|
+
import type { DomainEvent} from '@serenity-js/core/lib/events';
|
|
2
|
+
import { InteractionFinished } from '@serenity-js/core/lib/events';
|
|
2
3
|
|
|
3
4
|
import { PhotoTakingStrategy } from './PhotoTakingStrategy';
|
|
4
5
|
|