@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.
Files changed (164) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/lib/expectations/isActive.d.ts +1 -1
  3. package/lib/expectations/isActive.d.ts.map +1 -1
  4. package/lib/expectations/isClickable.d.ts +1 -1
  5. package/lib/expectations/isClickable.d.ts.map +1 -1
  6. package/lib/expectations/isEnabled.d.ts +1 -1
  7. package/lib/expectations/isEnabled.d.ts.map +1 -1
  8. package/lib/expectations/isSelected.d.ts +1 -1
  9. package/lib/expectations/isSelected.d.ts.map +1 -1
  10. package/lib/expectations/isVisible.d.ts +1 -1
  11. package/lib/expectations/isVisible.d.ts.map +1 -1
  12. package/lib/screenplay/abilities/BrowseTheWeb.d.ts +1 -1
  13. package/lib/screenplay/abilities/BrowseTheWeb.d.ts.map +1 -1
  14. package/lib/screenplay/interactions/Clear.d.ts +2 -2
  15. package/lib/screenplay/interactions/Clear.d.ts.map +1 -1
  16. package/lib/screenplay/interactions/Clear.js.map +1 -1
  17. package/lib/screenplay/interactions/Click.d.ts +2 -2
  18. package/lib/screenplay/interactions/Click.d.ts.map +1 -1
  19. package/lib/screenplay/interactions/Click.js.map +1 -1
  20. package/lib/screenplay/interactions/DoubleClick.d.ts +2 -2
  21. package/lib/screenplay/interactions/DoubleClick.d.ts.map +1 -1
  22. package/lib/screenplay/interactions/DoubleClick.js.map +1 -1
  23. package/lib/screenplay/interactions/Enter.d.ts +2 -2
  24. package/lib/screenplay/interactions/Enter.d.ts.map +1 -1
  25. package/lib/screenplay/interactions/Enter.js.map +1 -1
  26. package/lib/screenplay/interactions/ExecuteScript.d.ts +2 -1
  27. package/lib/screenplay/interactions/ExecuteScript.d.ts.map +1 -1
  28. package/lib/screenplay/interactions/ExecuteScript.js.map +1 -1
  29. package/lib/screenplay/interactions/Hover.d.ts +2 -2
  30. package/lib/screenplay/interactions/Hover.d.ts.map +1 -1
  31. package/lib/screenplay/interactions/Hover.js.map +1 -1
  32. package/lib/screenplay/interactions/Navigate.d.ts +2 -1
  33. package/lib/screenplay/interactions/Navigate.d.ts.map +1 -1
  34. package/lib/screenplay/interactions/Navigate.js.map +1 -1
  35. package/lib/screenplay/interactions/PageElementInteraction.d.ts +4 -3
  36. package/lib/screenplay/interactions/PageElementInteraction.d.ts.map +1 -1
  37. package/lib/screenplay/interactions/PageElementInteraction.js.map +1 -1
  38. package/lib/screenplay/interactions/Press.d.ts +4 -2
  39. package/lib/screenplay/interactions/Press.d.ts.map +1 -1
  40. package/lib/screenplay/interactions/Press.js.map +1 -1
  41. package/lib/screenplay/interactions/RightClick.d.ts +2 -2
  42. package/lib/screenplay/interactions/RightClick.d.ts.map +1 -1
  43. package/lib/screenplay/interactions/RightClick.js.map +1 -1
  44. package/lib/screenplay/interactions/Scroll.d.ts +3 -2
  45. package/lib/screenplay/interactions/Scroll.d.ts.map +1 -1
  46. package/lib/screenplay/interactions/Scroll.js.map +1 -1
  47. package/lib/screenplay/interactions/Select.d.ts +2 -2
  48. package/lib/screenplay/interactions/Select.d.ts.map +1 -1
  49. package/lib/screenplay/interactions/Select.js.map +1 -1
  50. package/lib/screenplay/interactions/Switch.d.ts +3 -2
  51. package/lib/screenplay/interactions/Switch.d.ts.map +1 -1
  52. package/lib/screenplay/interactions/Switch.js.map +1 -1
  53. package/lib/screenplay/interactions/TakeScreenshot.d.ts +2 -1
  54. package/lib/screenplay/interactions/TakeScreenshot.d.ts.map +1 -1
  55. package/lib/screenplay/interactions/TakeScreenshot.js.map +1 -1
  56. package/lib/screenplay/models/BrowsingSession.d.ts +2 -2
  57. package/lib/screenplay/models/BrowsingSession.d.ts.map +1 -1
  58. package/lib/screenplay/models/Cookie.d.ts +3 -2
  59. package/lib/screenplay/models/Cookie.d.ts.map +1 -1
  60. package/lib/screenplay/models/Cookie.js.map +1 -1
  61. package/lib/screenplay/models/CookieData.d.ts +1 -1
  62. package/lib/screenplay/models/CookieData.d.ts.map +1 -1
  63. package/lib/screenplay/models/Key.js +1 -1
  64. package/lib/screenplay/models/Key.js.map +1 -1
  65. package/lib/screenplay/models/Locator.d.ts +2 -2
  66. package/lib/screenplay/models/Locator.d.ts.map +1 -1
  67. package/lib/screenplay/models/Page.d.ts +14 -14
  68. package/lib/screenplay/models/Page.d.ts.map +1 -1
  69. package/lib/screenplay/models/Page.js.map +1 -1
  70. package/lib/screenplay/models/PageElement.d.ts +6 -6
  71. package/lib/screenplay/models/PageElement.d.ts.map +1 -1
  72. package/lib/screenplay/models/PageElement.js.map +1 -1
  73. package/lib/screenplay/models/PageElements.d.ts +5 -4
  74. package/lib/screenplay/models/PageElements.d.ts.map +1 -1
  75. package/lib/screenplay/models/PageElements.js.map +1 -1
  76. package/lib/screenplay/models/RootLocator.d.ts +1 -1
  77. package/lib/screenplay/models/RootLocator.d.ts.map +1 -1
  78. package/lib/screenplay/models/Switchable.d.ts +1 -1
  79. package/lib/screenplay/models/Switchable.d.ts.map +1 -1
  80. package/lib/screenplay/models/dialogs/ModalDialog.d.ts +1 -1
  81. package/lib/screenplay/models/dialogs/ModalDialog.d.ts.map +1 -1
  82. package/lib/screenplay/models/dialogs/ModalDialog.js.map +1 -1
  83. package/lib/screenplay/models/dialogs/ModalDialogHandler.d.ts +1 -1
  84. package/lib/screenplay/models/dialogs/ModalDialogHandler.d.ts.map +1 -1
  85. package/lib/screenplay/models/selectors/By.d.ts +2 -1
  86. package/lib/screenplay/models/selectors/By.d.ts.map +1 -1
  87. package/lib/screenplay/models/selectors/By.js.map +1 -1
  88. package/lib/screenplay/questions/Attribute.d.ts +2 -1
  89. package/lib/screenplay/questions/Attribute.d.ts.map +1 -1
  90. package/lib/screenplay/questions/Attribute.js.map +1 -1
  91. package/lib/screenplay/questions/CssClasses.d.ts +2 -1
  92. package/lib/screenplay/questions/CssClasses.d.ts.map +1 -1
  93. package/lib/screenplay/questions/CssClasses.js.map +1 -1
  94. package/lib/screenplay/questions/LastScriptExecution.d.ts +1 -1
  95. package/lib/screenplay/questions/LastScriptExecution.d.ts.map +1 -1
  96. package/lib/screenplay/questions/LastScriptExecution.js.map +1 -1
  97. package/lib/screenplay/questions/Selected.d.ts +2 -2
  98. package/lib/screenplay/questions/Selected.d.ts.map +1 -1
  99. package/lib/screenplay/questions/Selected.js.map +1 -1
  100. package/lib/screenplay/questions/Text.d.ts +1 -1
  101. package/lib/screenplay/questions/Text.d.ts.map +1 -1
  102. package/lib/screenplay/questions/Text.js.map +1 -1
  103. package/lib/screenplay/questions/Value.d.ts +2 -1
  104. package/lib/screenplay/questions/Value.d.ts.map +1 -1
  105. package/lib/screenplay/questions/Value.js.map +1 -1
  106. package/lib/stage/crew/photographer/Photographer.d.ts +2 -2
  107. package/lib/stage/crew/photographer/Photographer.d.ts.map +1 -1
  108. package/lib/stage/crew/photographer/Photographer.js.map +1 -1
  109. package/lib/stage/crew/photographer/strategies/PhotoTakingStrategy.d.ts +2 -2
  110. package/lib/stage/crew/photographer/strategies/PhotoTakingStrategy.d.ts.map +1 -1
  111. package/lib/stage/crew/photographer/strategies/PhotoTakingStrategy.js.map +1 -1
  112. package/lib/stage/crew/photographer/strategies/TakePhotosBeforeAndAfterInteractions.d.ts +2 -1
  113. package/lib/stage/crew/photographer/strategies/TakePhotosBeforeAndAfterInteractions.d.ts.map +1 -1
  114. package/lib/stage/crew/photographer/strategies/TakePhotosBeforeAndAfterInteractions.js.map +1 -1
  115. package/lib/stage/crew/photographer/strategies/TakePhotosOfFailures.d.ts +2 -1
  116. package/lib/stage/crew/photographer/strategies/TakePhotosOfFailures.d.ts.map +1 -1
  117. package/lib/stage/crew/photographer/strategies/TakePhotosOfFailures.js.map +1 -1
  118. package/lib/stage/crew/photographer/strategies/TakePhotosOfInteractions.d.ts +2 -1
  119. package/lib/stage/crew/photographer/strategies/TakePhotosOfInteractions.d.ts.map +1 -1
  120. package/lib/stage/crew/photographer/strategies/TakePhotosOfInteractions.js.map +1 -1
  121. package/package.json +5 -5
  122. package/src/expectations/isActive.ts +1 -1
  123. package/src/expectations/isClickable.ts +1 -1
  124. package/src/expectations/isEnabled.ts +1 -1
  125. package/src/expectations/isSelected.ts +1 -1
  126. package/src/expectations/isVisible.ts +1 -1
  127. package/src/screenplay/abilities/BrowseTheWeb.ts +1 -1
  128. package/src/screenplay/interactions/Clear.ts +3 -2
  129. package/src/screenplay/interactions/Click.ts +3 -2
  130. package/src/screenplay/interactions/DoubleClick.ts +3 -2
  131. package/src/screenplay/interactions/Enter.ts +3 -2
  132. package/src/screenplay/interactions/ExecuteScript.ts +2 -1
  133. package/src/screenplay/interactions/Hover.ts +3 -2
  134. package/src/screenplay/interactions/Navigate.ts +2 -1
  135. package/src/screenplay/interactions/PageElementInteraction.ts +4 -3
  136. package/src/screenplay/interactions/Press.ts +4 -2
  137. package/src/screenplay/interactions/RightClick.ts +4 -3
  138. package/src/screenplay/interactions/Scroll.ts +3 -2
  139. package/src/screenplay/interactions/Select.ts +4 -2
  140. package/src/screenplay/interactions/Switch.ts +3 -2
  141. package/src/screenplay/interactions/TakeScreenshot.ts +2 -1
  142. package/src/screenplay/models/BrowsingSession.ts +2 -2
  143. package/src/screenplay/models/Cookie.ts +5 -3
  144. package/src/screenplay/models/CookieData.ts +1 -1
  145. package/src/screenplay/models/Locator.ts +2 -2
  146. package/src/screenplay/models/Page.ts +15 -14
  147. package/src/screenplay/models/PageElement.ts +7 -6
  148. package/src/screenplay/models/PageElements.ts +5 -4
  149. package/src/screenplay/models/RootLocator.ts +1 -1
  150. package/src/screenplay/models/Switchable.ts +1 -1
  151. package/src/screenplay/models/dialogs/ModalDialog.ts +2 -1
  152. package/src/screenplay/models/dialogs/ModalDialogHandler.ts +1 -1
  153. package/src/screenplay/models/selectors/By.ts +2 -1
  154. package/src/screenplay/questions/Attribute.ts +2 -1
  155. package/src/screenplay/questions/CssClasses.ts +2 -1
  156. package/src/screenplay/questions/LastScriptExecution.ts +2 -1
  157. package/src/screenplay/questions/Selected.ts +3 -2
  158. package/src/screenplay/questions/Text.ts +2 -1
  159. package/src/screenplay/questions/Value.ts +2 -1
  160. package/src/stage/crew/photographer/Photographer.ts +3 -2
  161. package/src/stage/crew/photographer/strategies/PhotoTakingStrategy.ts +4 -2
  162. package/src/stage/crew/photographer/strategies/TakePhotosBeforeAndAfterInteractions.ts +2 -1
  163. package/src/stage/crew/photographer/strategies/TakePhotosOfFailures.ts +2 -1
  164. 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":";;;AAAA,yDAAgF;AAChF,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
+ {"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, InteractionFinished } from '@serenity-js/core/lib/events';
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;AAEhF,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
+ {"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":";;;AAAA,yDAAgF;AAEhF,+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"}
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.4.2",
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.4.2",
48
- "@serenity-js/core": "3.4.2",
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.0.4"
59
+ "typescript": "^5.1.6"
60
60
  },
61
- "gitHead": "cfa92797638b21f0fde4f2cc836b57f849fee671"
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, d, Interaction, LogicError, UsesAbilities } from '@serenity-js/core';
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, d, Interaction, UsesAbilities } from '@serenity-js/core';
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, d, Interaction, UsesAbilities } from '@serenity-js/core';
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, d, Interaction, UsesAbilities } from '@serenity-js/core';
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, f, Interaction, LogicError, UsesAbilities } from '@serenity-js/core';
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, d, Interaction, UsesAbilities } from '@serenity-js/core';
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, d, Interaction, TestCompromisedError, UsesAbilities } from '@serenity-js/core';
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, d, Interaction, LogicError } from '@serenity-js/core';
2
- import { FileSystemLocation } from '@serenity-js/core/lib/io';
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, d, Interaction, Question, UsesAbilities } from '@serenity-js/core';
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 { Key, PageElement } from '../models';
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, d, Interaction, UsesAbilities } from '@serenity-js/core';
2
-
3
- import { PageElement } from '../models';
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, d, Interaction, UsesAbilities } from '@serenity-js/core';
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, d } from '@serenity-js/core';
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, SelectOption } from '../models';
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, Interaction, Task, UsesAbilities } from '@serenity-js/core';
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, d, Interaction, UsesAbilities } from '@serenity-js/core';
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, d, Interaction, Optional, Question, QuestionAdapter, Timestamp, WithAnswerableProperties } from '@serenity-js/core';
2
- import { ensure, isBoolean, isDefined, isInstanceOf, isOneOf, isPlainObject, isString, Predicate } from 'tiny-types';
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,4 +1,4 @@
1
- import { Timestamp } from '@serenity-js/core';
1
+ import type { Timestamp } from '@serenity-js/core';
2
2
 
3
3
  /**
4
4
  * A data structure describing a {@apilink Cookie} to be set, or one that's been read.
@@ -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, ExpectationMet, ExpectationOutcome, LogicError, Optional, Question, QuestionAdapter } from '@serenity-js/core';
2
- import { CorrelationId } from '@serenity-js/core/lib/model';
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, d, MetaQuestion, Optional, Question, QuestionAdapter } from '@serenity-js/core';
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, List, MetaQuestion, Question } from '@serenity-js/core';
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,4 @@
1
- import { Optional } from '@serenity-js/core';
1
+ import type { Optional } from '@serenity-js/core';
2
2
  import { inspectedObject } from '@serenity-js/core/lib/io';
3
3
  import * as util from 'util'; // eslint-disable-line unicorn/import-style
4
4
 
@@ -1,4 +1,4 @@
1
- import { SwitchableOrigin } from './SwitchableOrigin';
1
+ import type { SwitchableOrigin } from './SwitchableOrigin';
2
2
 
3
3
  /**
4
4
  * Describes a Serenity/JS model object that can be switched _to_ and switched back _from_
@@ -1,4 +1,5 @@
1
- import { Answerable, d, Interaction, Optional, Question, QuestionAdapter } from '@serenity-js/core';
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, f, Question } from '@serenity-js/core';
1
+ import type { Answerable} from '@serenity-js/core';
2
+ import { f, Question } from '@serenity-js/core';
2
3
 
3
4
  import { ByCss } from './ByCss';
4
5
  import { ByCssContainingText } from './ByCssContainingText';
@@ -1,4 +1,5 @@
1
- import { Answerable, AnswersQuestions, d, LogicError, MetaQuestion, Question, QuestionAdapter, UsesAbilities } from '@serenity-js/core';
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, d, MetaQuestion, Question, QuestionAdapter, UsesAbilities } from '@serenity-js/core';
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,4 +1,5 @@
1
- import { Question, QuestionAdapter } from '@serenity-js/core';
1
+ import type { QuestionAdapter } from '@serenity-js/core';
2
+ import { Question } from '@serenity-js/core';
2
3
 
3
4
  import { BrowseTheWeb } from '../abilities';
4
5
 
@@ -1,6 +1,7 @@
1
- import { Answerable, d, Question, QuestionAdapter } from '@serenity-js/core';
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, d, MetaQuestion, Question, QuestionAdapter, UsesAbilities } from '@serenity-js/core';
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, d, MetaQuestion, Question, QuestionAdapter, UsesAbilities } from '@serenity-js/core';
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 { ActivityFinished, ActivityStarts, DomainEvent } from '@serenity-js/core/lib/events';
3
- import { Stage, StageCrewMember } from '@serenity-js/core/lib/stage';
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 { LogicError, Stage } from '@serenity-js/core';
2
- import { ActivityFinished, ActivityRelatedArtifactGenerated, ActivityStarts, AsyncOperationAborted, AsyncOperationAttempted, AsyncOperationCompleted, AsyncOperationFailed, DomainEvent } from '@serenity-js/core/lib/events';
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, InteractionFinished, InteractionStarts } from '@serenity-js/core/lib/events';
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, InteractionFinished } from '@serenity-js/core/lib/events';
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, InteractionFinished } from '@serenity-js/core/lib/events';
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