@serenity-js/protractor 3.0.0-rc.11 → 3.0.0-rc.14
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 +311 -0
- package/lib/adapter/browser-detector/index.js +5 -1
- package/lib/adapter/browser-detector/index.js.map +1 -1
- package/lib/adapter/index.js +5 -1
- package/lib/adapter/index.js.map +1 -1
- package/lib/adapter/reporter/index.js +5 -1
- package/lib/adapter/reporter/index.js.map +1 -1
- package/lib/adapter/runner/index.js +5 -1
- package/lib/adapter/runner/index.js.map +1 -1
- package/lib/index.js +5 -1
- package/lib/index.js.map +1 -1
- package/lib/screenplay/abilities/BrowseTheWebWithProtractor.d.ts +1 -2
- package/lib/screenplay/abilities/BrowseTheWebWithProtractor.js +0 -4
- package/lib/screenplay/abilities/BrowseTheWebWithProtractor.js.map +1 -1
- package/lib/screenplay/abilities/index.js +5 -1
- package/lib/screenplay/abilities/index.js.map +1 -1
- package/lib/screenplay/index.js +5 -1
- package/lib/screenplay/index.js.map +1 -1
- package/lib/screenplay/interactions/index.js +5 -1
- package/lib/screenplay/interactions/index.js.map +1 -1
- package/lib/screenplay/models/ProtractorPage.d.ts +2 -4
- package/lib/screenplay/models/ProtractorPage.js.map +1 -1
- package/lib/screenplay/models/ProtractorPageElement.d.ts +16 -1
- package/lib/screenplay/models/ProtractorPageElement.js +46 -0
- package/lib/screenplay/models/ProtractorPageElement.js.map +1 -1
- package/lib/screenplay/models/index.d.ts +0 -1
- package/lib/screenplay/models/index.js +5 -2
- package/lib/screenplay/models/index.js.map +1 -1
- package/lib/screenplay/models/locators/index.js +5 -1
- package/lib/screenplay/models/locators/index.js.map +1 -1
- package/lib/screenplay/questions/index.js +5 -1
- package/lib/screenplay/questions/index.js.map +1 -1
- package/package.json +20 -40
- package/src/screenplay/abilities/BrowseTheWebWithProtractor.ts +2 -8
- package/src/screenplay/models/ProtractorPage.ts +2 -2
- package/src/screenplay/models/ProtractorPageElement.ts +62 -10
- package/src/screenplay/models/index.ts +0 -1
- package/lib/screenplay/models/ProtractorFrame.d.ts +0 -10
- package/lib/screenplay/models/ProtractorFrame.js +0 -39
- package/lib/screenplay/models/ProtractorFrame.js.map +0 -1
- package/src/screenplay/models/ProtractorFrame.ts +0 -44
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,298 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.0.0-rc.14](https://github.com/serenity-js/serenity-js/compare/v2.33.3...v3.0.0-rc.14) (2022-03-28)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
# [3.0.0-rc.13](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.12...v3.0.0-rc.13) (2022-03-02)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* **web:** combined Frame and PageElement so they can be Switch-ed to ([1b7ab7c](https://github.com/serenity-js/serenity-js/commit/1b7ab7c828034a14ba801cbfa97acc203fd55adf)), closes [#82](https://github.com/serenity-js/serenity-js/issues/82) [#227](https://github.com/serenity-js/serenity-js/issues/227) [#233](https://github.com/serenity-js/serenity-js/issues/233) [#365](https://github.com/serenity-js/serenity-js/issues/365)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
# [3.0.0-rc.12](https://github.com/serenity-js/serenity-js/compare/v2.33.2...v3.0.0-rc.12) (2022-02-23)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
# [3.0.0-rc.11](https://github.com/serenity-js/serenity-js/compare/v2.33.1...v3.0.0-rc.11) (2022-02-13)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Features
|
|
27
|
+
|
|
28
|
+
* **web:** support for working with frames and an interaction to Switch.to(frameOrPage) ([ef73ef2](https://github.com/serenity-js/serenity-js/commit/ef73ef273f8a17e48d396d5ef03f6b761b136c9a)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
# [3.0.0-rc.10](https://github.com/serenity-js/serenity-js/compare/v2.33.0...v3.0.0-rc.10) (2022-02-03)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
# [3.0.0-rc.9](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.8...v3.0.0-rc.9) (2022-02-01)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
### Features
|
|
40
|
+
|
|
41
|
+
* **web:** isVisible() works with Web elements in Shadow DOM ([cf84fb0](https://github.com/serenity-js/serenity-js/commit/cf84fb072a6b813338b68bb1dec3932ea8709e3e)), closes [#1085](https://github.com/serenity-js/serenity-js/issues/1085)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
# [3.0.0-rc.8](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.7...v3.0.0-rc.8) (2022-01-28)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
# [3.0.0-rc.7](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.6...v3.0.0-rc.7) (2022-01-28)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
### Features
|
|
53
|
+
|
|
54
|
+
* **core:** replaced `Adapter` with `QuestionAdapter` and introduced `Optional` ([8d84ad3](https://github.com/serenity-js/serenity-js/commit/8d84ad3863e3c726533d0f21934fb1e2fa8b3022)), closes [#1103](https://github.com/serenity-js/serenity-js/issues/1103)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
# [3.0.0-rc.6](https://github.com/serenity-js/serenity-js/compare/v2.32.7...v3.0.0-rc.6) (2022-01-10)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
# [3.0.0-rc.5](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.4...v3.0.0-rc.5) (2022-01-07)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
### Features
|
|
66
|
+
|
|
67
|
+
* **web:** support for advanced PageElement locator patterns ([c1ff8b7](https://github.com/serenity-js/serenity-js/commit/c1ff8b7539ebc1da8f79ea2b6d17bb01c42f443d)), closes [#1084](https://github.com/serenity-js/serenity-js/issues/1084)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
# [3.0.0-rc.4](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.3...v3.0.0-rc.4) (2021-12-30)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
# [3.0.0-rc.3](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.2...v3.0.0-rc.3) (2021-12-29)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
### Bug Fixes
|
|
79
|
+
|
|
80
|
+
* **core:** refactored Mappable so that it's easier to implement filters ([176e0cd](https://github.com/serenity-js/serenity-js/commit/176e0cd0303d63271477b2b7a8e7b0572dda99a0)), closes [#1074](https://github.com/serenity-js/serenity-js/issues/1074)
|
|
81
|
+
* **deps:** updated tiny-types to 1.17.0 ([3187051](https://github.com/serenity-js/serenity-js/commit/3187051594158b4b450c82e851e417fd2ed21652))
|
|
82
|
+
* **web:** refactored Selector and NativeElementLocator classes to simplify the implementation ([f0c8f11](https://github.com/serenity-js/serenity-js/commit/f0c8f113433958877d36f13d0bc7f355ea68d280))
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
### Features
|
|
86
|
+
|
|
87
|
+
* **web:** isVisible checks if the element is in viewport and not hidden behind other elements ([429040f](https://github.com/serenity-js/serenity-js/commit/429040fb32b04cd4bc7524100635203fd8128eb6))
|
|
88
|
+
* **web:** re-introduced PageElements.where DSL and universal By selectors ([39fe0a1](https://github.com/serenity-js/serenity-js/commit/39fe0a10edf7f652e93911159e4a4689c36d6876)), closes [#1081](https://github.com/serenity-js/serenity-js/issues/1081)
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
# [3.0.0-rc.2](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.1...v3.0.0-rc.2) (2021-12-09)
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
### Bug Fixes
|
|
96
|
+
|
|
97
|
+
* **lerna:** corrected versions of internal deps ([582b922](https://github.com/serenity-js/serenity-js/commit/582b922dbade08e970cb796f15aca909f606c079))
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
# [3.0.0-rc.1](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.0...v3.0.0-rc.1) (2021-12-09)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
# [3.0.0-rc.0](https://github.com/serenity-js/serenity-js/compare/v2.32.5...v3.0.0-rc.0) (2021-12-08)
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
### Bug Fixes
|
|
109
|
+
|
|
110
|
+
* **core:** 3.0 RC ([469d54e](https://github.com/serenity-js/serenity-js/commit/469d54e4f81ef430566b93852e3174826f8ef672)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
111
|
+
* **core:** renamed "Model" type to "Adapter" to better reflect its purpose ([b4ea7a1](https://github.com/serenity-js/serenity-js/commit/b4ea7a100fac2c896990bf15cbc906de641196b8)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
112
|
+
* **protractor:** fixed the interaction to Switch ([762ca84](https://github.com/serenity-js/serenity-js/commit/762ca8406389a720d2ac6b8ab49b2519fbecfc21))
|
|
113
|
+
* **protractor:** lastScriptExecution.result() returns undefined instead of null for void functions ([997d87a](https://github.com/serenity-js/serenity-js/commit/997d87af2d825bffd47c0a1b3dbeee8ce572e391))
|
|
114
|
+
* **protractor:** modernised ProtractorParam to return a Screenplay Model ([43c2032](https://github.com/serenity-js/serenity-js/commit/43c2032e73c5e1ad3392396dec6fff476283833d))
|
|
115
|
+
* **protractor:** removed interaction to ResizeBrowserWindow in favour of Page.setViewportSize() ([b8e471d](https://github.com/serenity-js/serenity-js/commit/b8e471dc92fe7d930895571ce0bcb99066eb2206))
|
|
116
|
+
* **protractor:** replaced obsolete "Window", replaced by "Page" in @serenity-js/web ([a3442c4](https://github.com/serenity-js/serenity-js/commit/a3442c432082327f9081c269c02141c73b2e4eb3))
|
|
117
|
+
* **web:** corrected timestamp rounding when retrieving the expiry date of a cookie ([d636965](https://github.com/serenity-js/serenity-js/commit/d63696586618cd701e703e33dd8b476efaac65b6))
|
|
118
|
+
* **webdriverio:** separated UIElement.hoverOver from UIElement.scrollIntoView ([cf4ca2c](https://github.com/serenity-js/serenity-js/commit/cf4ca2c531e0f90f9a27917e322359c13bfbc6e6))
|
|
119
|
+
* **web:** removed Cookie as it will be re-implemented ([cb3d081](https://github.com/serenity-js/serenity-js/commit/cb3d0813f9f0532bfe82be77fef0edec45e8ca3e))
|
|
120
|
+
* **web:** removed window-specific APIs from BrowseTheWeb that got replaced by Page ([918f447](https://github.com/serenity-js/serenity-js/commit/918f447c1d8f326fbf5730f1aa61108045556212)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
121
|
+
* **web:** renamed Element and associated classes to PageElement to avoid name conflicts ([1e4204b](https://github.com/serenity-js/serenity-js/commit/1e4204b5507469e6574c87a6d84454e39e8a813e))
|
|
122
|
+
* **web:** renamed PageElementList to PageElements to improve readability ([a9903a7](https://github.com/serenity-js/serenity-js/commit/a9903a7389b00106ef94d2bdb9f86a7fd04be541)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
123
|
+
* **web:** standardised getters across PageElement implementations ([336472b](https://github.com/serenity-js/serenity-js/commit/336472b1a6882412f6a88483e51266909a1d51d0))
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
### Features
|
|
127
|
+
|
|
128
|
+
* **core:** question.about produces "props" that proxy the methods of the underlying model ([f771872](https://github.com/serenity-js/serenity-js/commit/f771872c56b487e404002c3800fc8f3baaed804f))
|
|
129
|
+
* **protractor:** compatibility with @serenity-js/web ([9df4db2](https://github.com/serenity-js/serenity-js/commit/9df4db27a6e0ae62bf0d0e679a170d4865041043)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
130
|
+
* **protractor:** removed Protractor-specific Target implementations in favour of @serenity-js/web ([5cfc7e5](https://github.com/serenity-js/serenity-js/commit/5cfc7e53c977ae919398d9102f43985f393992db))
|
|
131
|
+
* **web:** a common way to run the tests for all the web adapters ([c7e584a](https://github.com/serenity-js/serenity-js/commit/c7e584a9bf288ebc7781affdb720097527e8ed3a))
|
|
132
|
+
* **web:** added Page.viewportSize and Page.setViewportSize methods ([4cabbe2](https://github.com/serenity-js/serenity-js/commit/4cabbe21a7fbac3457c6a6ea3d4442a62c3f1f3c))
|
|
133
|
+
* **web:** interaction to set a Cookie ([c056439](https://github.com/serenity-js/serenity-js/commit/c056439746a8f57c3edd937b8862f2babb70e94e)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
134
|
+
* **web:** interaction to setViewportSize of a Page ([dd7f180](https://github.com/serenity-js/serenity-js/commit/dd7f18057b857d2e69c19265888bfd5b15fda21b))
|
|
135
|
+
* **web:** migrated Photographer from @serenity-js/protractor to @serenity-js/web ([4506dac](https://github.com/serenity-js/serenity-js/commit/4506dacebdf955c32c4eff17bf9982c8e45e2925)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
136
|
+
* **web:** ModalDialog available for both Protractor and WebdriverIO adapters ([ef3c566](https://github.com/serenity-js/serenity-js/commit/ef3c566aed12b52aa22c54058992d369172b8597)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
137
|
+
* **web:** page provides an abstraction around browser window ([2e70a3b](https://github.com/serenity-js/serenity-js/commit/2e70a3b6af2e8cc49255820e8a1aaffcc71b76a8))
|
|
138
|
+
* **web:** Page.url() and Page.title() replace Website.url() and Website.title() ([49fe009](https://github.com/serenity-js/serenity-js/commit/49fe0094422ab53ec67d4ba303f80c33e382eebd)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
139
|
+
* **web:** removed Target in favour of PageElement ([69496c4](https://github.com/serenity-js/serenity-js/commit/69496c47c4a1ec7b92e7ab6c83da1559e926f28e)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
140
|
+
* **web:** support for switching browsing context ([a73a635](https://github.com/serenity-js/serenity-js/commit/a73a635f93183d67229acde78e74526564008869)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
141
|
+
* **web:** support for working with cookies ([39cde6d](https://github.com/serenity-js/serenity-js/commit/39cde6de7a36d27a8b1c596493efbec94900af6b)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
### BREAKING CHANGES
|
|
145
|
+
|
|
146
|
+
* **core:** Introduced @serenity-js/web - a shared library for Serenity/JS Web integration
|
|
147
|
+
modules such as @serenity-js/protractor and @serenity-js/webdriverio. Dropped support for Node 12.
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
# [3.0.0-rc.13](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.12...v3.0.0-rc.13) (2022-03-02)
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
### Features
|
|
157
|
+
|
|
158
|
+
* **web:** combined Frame and PageElement so they can be Switch-ed to ([1b7ab7c](https://github.com/serenity-js/serenity-js/commit/1b7ab7c828034a14ba801cbfa97acc203fd55adf)), closes [#82](https://github.com/serenity-js/serenity-js/issues/82) [#227](https://github.com/serenity-js/serenity-js/issues/227) [#233](https://github.com/serenity-js/serenity-js/issues/233) [#365](https://github.com/serenity-js/serenity-js/issues/365)
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
# [3.0.0-rc.12](https://github.com/serenity-js/serenity-js/compare/v2.33.2...v3.0.0-rc.12) (2022-02-23)
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
# [3.0.0-rc.11](https://github.com/serenity-js/serenity-js/compare/v2.33.1...v3.0.0-rc.11) (2022-02-13)
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
### Features
|
|
172
|
+
|
|
173
|
+
* **web:** support for working with frames and an interaction to Switch.to(frameOrPage) ([ef73ef2](https://github.com/serenity-js/serenity-js/commit/ef73ef273f8a17e48d396d5ef03f6b761b136c9a)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
# [3.0.0-rc.10](https://github.com/serenity-js/serenity-js/compare/v2.33.0...v3.0.0-rc.10) (2022-02-03)
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
# [3.0.0-rc.9](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.8...v3.0.0-rc.9) (2022-02-01)
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
### Features
|
|
185
|
+
|
|
186
|
+
* **web:** isVisible() works with Web elements in Shadow DOM ([cf84fb0](https://github.com/serenity-js/serenity-js/commit/cf84fb072a6b813338b68bb1dec3932ea8709e3e)), closes [#1085](https://github.com/serenity-js/serenity-js/issues/1085)
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
# [3.0.0-rc.8](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.7...v3.0.0-rc.8) (2022-01-28)
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
# [3.0.0-rc.7](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.6...v3.0.0-rc.7) (2022-01-28)
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
### Features
|
|
198
|
+
|
|
199
|
+
* **core:** replaced `Adapter` with `QuestionAdapter` and introduced `Optional` ([8d84ad3](https://github.com/serenity-js/serenity-js/commit/8d84ad3863e3c726533d0f21934fb1e2fa8b3022)), closes [#1103](https://github.com/serenity-js/serenity-js/issues/1103)
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
# [3.0.0-rc.6](https://github.com/serenity-js/serenity-js/compare/v2.32.7...v3.0.0-rc.6) (2022-01-10)
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
# [3.0.0-rc.5](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.4...v3.0.0-rc.5) (2022-01-07)
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
### Features
|
|
211
|
+
|
|
212
|
+
* **web:** support for advanced PageElement locator patterns ([c1ff8b7](https://github.com/serenity-js/serenity-js/commit/c1ff8b7539ebc1da8f79ea2b6d17bb01c42f443d)), closes [#1084](https://github.com/serenity-js/serenity-js/issues/1084)
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
# [3.0.0-rc.4](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.3...v3.0.0-rc.4) (2021-12-30)
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
# [3.0.0-rc.3](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.2...v3.0.0-rc.3) (2021-12-29)
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
### Bug Fixes
|
|
224
|
+
|
|
225
|
+
* **core:** refactored Mappable so that it's easier to implement filters ([176e0cd](https://github.com/serenity-js/serenity-js/commit/176e0cd0303d63271477b2b7a8e7b0572dda99a0)), closes [#1074](https://github.com/serenity-js/serenity-js/issues/1074)
|
|
226
|
+
* **deps:** updated tiny-types to 1.17.0 ([3187051](https://github.com/serenity-js/serenity-js/commit/3187051594158b4b450c82e851e417fd2ed21652))
|
|
227
|
+
* **web:** refactored Selector and NativeElementLocator classes to simplify the implementation ([f0c8f11](https://github.com/serenity-js/serenity-js/commit/f0c8f113433958877d36f13d0bc7f355ea68d280))
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
### Features
|
|
231
|
+
|
|
232
|
+
* **web:** isVisible checks if the element is in viewport and not hidden behind other elements ([429040f](https://github.com/serenity-js/serenity-js/commit/429040fb32b04cd4bc7524100635203fd8128eb6))
|
|
233
|
+
* **web:** re-introduced PageElements.where DSL and universal By selectors ([39fe0a1](https://github.com/serenity-js/serenity-js/commit/39fe0a10edf7f652e93911159e4a4689c36d6876)), closes [#1081](https://github.com/serenity-js/serenity-js/issues/1081)
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
# [3.0.0-rc.2](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.1...v3.0.0-rc.2) (2021-12-09)
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
### Bug Fixes
|
|
241
|
+
|
|
242
|
+
* **lerna:** corrected versions of internal deps ([582b922](https://github.com/serenity-js/serenity-js/commit/582b922dbade08e970cb796f15aca909f606c079))
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
# [3.0.0-rc.1](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.0...v3.0.0-rc.1) (2021-12-09)
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
# [3.0.0-rc.0](https://github.com/serenity-js/serenity-js/compare/v2.32.5...v3.0.0-rc.0) (2021-12-08)
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
### Bug Fixes
|
|
254
|
+
|
|
255
|
+
* **core:** 3.0 RC ([469d54e](https://github.com/serenity-js/serenity-js/commit/469d54e4f81ef430566b93852e3174826f8ef672)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
256
|
+
* **core:** renamed "Model" type to "Adapter" to better reflect its purpose ([b4ea7a1](https://github.com/serenity-js/serenity-js/commit/b4ea7a100fac2c896990bf15cbc906de641196b8)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
257
|
+
* **protractor:** fixed the interaction to Switch ([762ca84](https://github.com/serenity-js/serenity-js/commit/762ca8406389a720d2ac6b8ab49b2519fbecfc21))
|
|
258
|
+
* **protractor:** lastScriptExecution.result() returns undefined instead of null for void functions ([997d87a](https://github.com/serenity-js/serenity-js/commit/997d87af2d825bffd47c0a1b3dbeee8ce572e391))
|
|
259
|
+
* **protractor:** modernised ProtractorParam to return a Screenplay Model ([43c2032](https://github.com/serenity-js/serenity-js/commit/43c2032e73c5e1ad3392396dec6fff476283833d))
|
|
260
|
+
* **protractor:** removed interaction to ResizeBrowserWindow in favour of Page.setViewportSize() ([b8e471d](https://github.com/serenity-js/serenity-js/commit/b8e471dc92fe7d930895571ce0bcb99066eb2206))
|
|
261
|
+
* **protractor:** replaced obsolete "Window", replaced by "Page" in @serenity-js/web ([a3442c4](https://github.com/serenity-js/serenity-js/commit/a3442c432082327f9081c269c02141c73b2e4eb3))
|
|
262
|
+
* **web:** corrected timestamp rounding when retrieving the expiry date of a cookie ([d636965](https://github.com/serenity-js/serenity-js/commit/d63696586618cd701e703e33dd8b476efaac65b6))
|
|
263
|
+
* **webdriverio:** separated UIElement.hoverOver from UIElement.scrollIntoView ([cf4ca2c](https://github.com/serenity-js/serenity-js/commit/cf4ca2c531e0f90f9a27917e322359c13bfbc6e6))
|
|
264
|
+
* **web:** removed Cookie as it will be re-implemented ([cb3d081](https://github.com/serenity-js/serenity-js/commit/cb3d0813f9f0532bfe82be77fef0edec45e8ca3e))
|
|
265
|
+
* **web:** removed window-specific APIs from BrowseTheWeb that got replaced by Page ([918f447](https://github.com/serenity-js/serenity-js/commit/918f447c1d8f326fbf5730f1aa61108045556212)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
266
|
+
* **web:** renamed Element and associated classes to PageElement to avoid name conflicts ([1e4204b](https://github.com/serenity-js/serenity-js/commit/1e4204b5507469e6574c87a6d84454e39e8a813e))
|
|
267
|
+
* **web:** renamed PageElementList to PageElements to improve readability ([a9903a7](https://github.com/serenity-js/serenity-js/commit/a9903a7389b00106ef94d2bdb9f86a7fd04be541)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
268
|
+
* **web:** standardised getters across PageElement implementations ([336472b](https://github.com/serenity-js/serenity-js/commit/336472b1a6882412f6a88483e51266909a1d51d0))
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
### Features
|
|
272
|
+
|
|
273
|
+
* **core:** question.about produces "props" that proxy the methods of the underlying model ([f771872](https://github.com/serenity-js/serenity-js/commit/f771872c56b487e404002c3800fc8f3baaed804f))
|
|
274
|
+
* **protractor:** compatibility with @serenity-js/web ([9df4db2](https://github.com/serenity-js/serenity-js/commit/9df4db27a6e0ae62bf0d0e679a170d4865041043)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
275
|
+
* **protractor:** removed Protractor-specific Target implementations in favour of @serenity-js/web ([5cfc7e5](https://github.com/serenity-js/serenity-js/commit/5cfc7e53c977ae919398d9102f43985f393992db))
|
|
276
|
+
* **web:** a common way to run the tests for all the web adapters ([c7e584a](https://github.com/serenity-js/serenity-js/commit/c7e584a9bf288ebc7781affdb720097527e8ed3a))
|
|
277
|
+
* **web:** added Page.viewportSize and Page.setViewportSize methods ([4cabbe2](https://github.com/serenity-js/serenity-js/commit/4cabbe21a7fbac3457c6a6ea3d4442a62c3f1f3c))
|
|
278
|
+
* **web:** interaction to set a Cookie ([c056439](https://github.com/serenity-js/serenity-js/commit/c056439746a8f57c3edd937b8862f2babb70e94e)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
279
|
+
* **web:** interaction to setViewportSize of a Page ([dd7f180](https://github.com/serenity-js/serenity-js/commit/dd7f18057b857d2e69c19265888bfd5b15fda21b))
|
|
280
|
+
* **web:** migrated Photographer from @serenity-js/protractor to @serenity-js/web ([4506dac](https://github.com/serenity-js/serenity-js/commit/4506dacebdf955c32c4eff17bf9982c8e45e2925)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
281
|
+
* **web:** ModalDialog available for both Protractor and WebdriverIO adapters ([ef3c566](https://github.com/serenity-js/serenity-js/commit/ef3c566aed12b52aa22c54058992d369172b8597)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
282
|
+
* **web:** page provides an abstraction around browser window ([2e70a3b](https://github.com/serenity-js/serenity-js/commit/2e70a3b6af2e8cc49255820e8a1aaffcc71b76a8))
|
|
283
|
+
* **web:** Page.url() and Page.title() replace Website.url() and Website.title() ([49fe009](https://github.com/serenity-js/serenity-js/commit/49fe0094422ab53ec67d4ba303f80c33e382eebd)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
284
|
+
* **web:** removed Target in favour of PageElement ([69496c4](https://github.com/serenity-js/serenity-js/commit/69496c47c4a1ec7b92e7ab6c83da1559e926f28e)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
285
|
+
* **web:** support for switching browsing context ([a73a635](https://github.com/serenity-js/serenity-js/commit/a73a635f93183d67229acde78e74526564008869)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
286
|
+
* **web:** support for working with cookies ([39cde6d](https://github.com/serenity-js/serenity-js/commit/39cde6de7a36d27a8b1c596493efbec94900af6b)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
### BREAKING CHANGES
|
|
290
|
+
|
|
291
|
+
* **core:** Introduced @serenity-js/web - a shared library for Serenity/JS Web integration
|
|
292
|
+
modules such as @serenity-js/protractor and @serenity-js/webdriverio. Dropped support for Node 12.
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
|
|
6
298
|
# [3.0.0-rc.11](https://github.com/serenity-js/serenity-js/compare/v2.33.1...v3.0.0-rc.11) (2022-02-13)
|
|
7
299
|
|
|
8
300
|
|
|
@@ -484,6 +776,25 @@ modules such as @serenity-js/protractor and @serenity-js/webdriverio. Dropped su
|
|
|
484
776
|
|
|
485
777
|
|
|
486
778
|
|
|
779
|
+
## [2.33.3](https://github.com/serenity-js/serenity-js/compare/v2.33.2...v2.33.3) (2022-03-19)
|
|
780
|
+
|
|
781
|
+
|
|
782
|
+
### Bug Fixes
|
|
783
|
+
|
|
784
|
+
* **protractor:** made selenium-webdriver an explicit dependency ([c5c9892](https://github.com/serenity-js/serenity-js/commit/c5c9892f96ea2ae9a6c762c1e2f438099f6eb058)), closes [#724](https://github.com/serenity-js/serenity-js/issues/724)
|
|
785
|
+
|
|
786
|
+
|
|
787
|
+
|
|
788
|
+
|
|
789
|
+
|
|
790
|
+
## [2.33.2](https://github.com/serenity-js/serenity-js/compare/v2.33.1...v2.33.2) (2022-02-23)
|
|
791
|
+
|
|
792
|
+
**Note:** Version bump only for package @serenity-js/protractor
|
|
793
|
+
|
|
794
|
+
|
|
795
|
+
|
|
796
|
+
|
|
797
|
+
|
|
487
798
|
## [2.33.1](https://github.com/serenity-js/serenity-js/compare/v2.33.0...v2.33.1) (2022-02-10)
|
|
488
799
|
|
|
489
800
|
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/adapter/browser-detector/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/adapter/browser-detector/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,6DAA2C"}
|
package/lib/adapter/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
package/lib/adapter/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/adapter/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/adapter/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+DAA6C;AAC7C,wCAAsB;AACtB,2CAAyB"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/adapter/reporter/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/adapter/reporter/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,uDAAqC"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/adapter/runner/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/adapter/runner/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,uDAAqC;AACrC,qDAAmC"}
|
package/lib/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Duration } from '@serenity-js/core';
|
|
2
|
-
import { BrowserCapabilities, BrowseTheWeb, Cookie, CookieData,
|
|
2
|
+
import { BrowserCapabilities, BrowseTheWeb, Cookie, CookieData, Key, ModalDialog, Page } from '@serenity-js/web';
|
|
3
3
|
import { ElementFinder, ProtractorBrowser } from 'protractor';
|
|
4
4
|
import { Capabilities } from 'selenium-webdriver';
|
|
5
5
|
import { ProtractorNativeElementRoot } from '../models/locators';
|
|
@@ -63,7 +63,6 @@ export declare class BrowseTheWebWithProtractor extends BrowseTheWeb<ElementFind
|
|
|
63
63
|
waitUntil(condition: () => boolean | Promise<boolean>, timeout: Duration): Promise<void>;
|
|
64
64
|
sendKeys(keys: (string | Key)[]): Promise<void>;
|
|
65
65
|
modalDialog(): Promise<ModalDialog>;
|
|
66
|
-
frame(bySelector: Selector): Promise<Frame>;
|
|
67
66
|
/**
|
|
68
67
|
* @desc
|
|
69
68
|
* Navigate to the given destination and loads mock modules before Angular.
|
|
@@ -136,10 +136,6 @@ class BrowseTheWebWithProtractor extends web_1.BrowseTheWeb {
|
|
|
136
136
|
async modalDialog() {
|
|
137
137
|
return new models_1.ProtractorModalDialog(this.browser);
|
|
138
138
|
}
|
|
139
|
-
async frame(bySelector) {
|
|
140
|
-
const locator = this.locate(bySelector);
|
|
141
|
-
return new models_1.ProtractorFrame(this.browser, locator);
|
|
142
|
-
}
|
|
143
139
|
/**
|
|
144
140
|
* @desc
|
|
145
141
|
* Navigate to the given destination and loads mock modules before Angular.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BrowseTheWebWithProtractor.js","sourceRoot":"","sources":["../../../src/screenplay/abilities/BrowseTheWebWithProtractor.ts"],"names":[],"mappings":";;;AAAA,4CAA6E;AAC7E,
|
|
1
|
+
{"version":3,"file":"BrowseTheWebWithProtractor.js","sourceRoot":"","sources":["../../../src/screenplay/abilities/BrowseTheWebWithProtractor.ts"],"names":[],"mappings":";;;AAAA,4CAA6E;AAC7E,0CAAuK;AACvK,2CAAkE;AAGlE,sCAA2G;AAC3G,iDAAoF;AACpF,0CAAuC;AAEvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAa,0BAA2B,SAAQ,kBAAwD;IAkBpG;;;OAGG;IACH,YAAsB,OAA0B;QAC5C,KAAK,CAAC,IAAI,GAAG,EAAE;aACV,GAAG,CAAC,WAAK,EAAkB,CAAC,QAAe,EAAgB,EAAE;QAC1D,+GAA+G;QAC/G,4BAAiB,CAAC,iBAAiB,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,EACtD,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAE,eAAE,CAAC,YAAY;YAClD,CAAC,CAAC,eAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YACpD,CAAC,CAAC,eAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CACpC;aACA,GAAG,CAAC,yBAAmB,EAAI,CAAC,QAA6B,EAAE,EAAE,CAAC,4BAAiB,CAAC,iBAAiB,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,eAAE,CAAC,iBAAiB,CAAC,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;aAC/K,GAAG,CAAC,UAAI,EAAmB,CAAC,QAAc,EAAiB,EAAE,CAAC,4BAAiB,CAAC,iBAAiB,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,eAAE,CAAC,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AC,CAAC;IAChC,CAAC;CACJ;AA9bD,gEA8bC;AAED;;GAEG;AACH,MAAM,0BAA0B;IAC5B,YAA4B,MAAW;QAAX,WAAM,GAAN,MAAM,CAAK;IAAG,CAAC;CAC9C"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/screenplay/abilities/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/screenplay/abilities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+DAA6C"}
|
package/lib/screenplay/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/screenplay/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/screenplay/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,iDAA+B;AAC/B,2CAAyB;AACzB,8CAA4B"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/screenplay/interactions/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/screenplay/interactions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { Page } from '@serenity-js/web';
|
|
2
|
+
import { Page, SwitchableOrigin } from '@serenity-js/web';
|
|
3
3
|
import { ProtractorBrowser } from 'protractor';
|
|
4
4
|
import { URL } from 'url';
|
|
5
5
|
export declare class ProtractorPage extends Page {
|
|
@@ -19,8 +19,6 @@ export declare class ProtractorPage extends Page {
|
|
|
19
19
|
close(): Promise<void>;
|
|
20
20
|
closeOthers(): Promise<void>;
|
|
21
21
|
isPresent(): Promise<boolean>;
|
|
22
|
-
switchTo(): Promise<
|
|
23
|
-
switchBack(): Promise<void>;
|
|
24
|
-
}>;
|
|
22
|
+
switchTo(): Promise<SwitchableOrigin>;
|
|
25
23
|
private switchToAndPerform;
|
|
26
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProtractorPage.js","sourceRoot":"","sources":["../../../src/screenplay/models/ProtractorPage.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"ProtractorPage.js","sourceRoot":"","sources":["../../../src/screenplay/models/ProtractorPage.ts"],"names":[],"mappings":";;;AAAA,0CAA0D;AAE1D,6BAA0B;AAE1B,0CAAuC;AAEvC,MAAa,cAAe,SAAQ,UAAI;IACpC,YACqB,OAA0B,EAC3C,MAAc;QAEd,KAAK,CAAC,MAAM,CAAC,CAAC;QAHG,YAAO,GAAP,OAAO,CAAmB;IAI/C,CAAC;IAED,KAAK;QACD,OAAO,IAAI,CAAC,kBAAkB,CAAC,KAAK,EAAC,OAAO,EAAC,EAAE;YAC3C,OAAO,IAAA,mBAAQ,EAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;QACxC,CAAC,CAAC,CAAC;IACP,CAAC;IAED,IAAI;QACA,OAAO,IAAI,CAAC,kBAAkB,CAAC,KAAK,EAAC,OAAO,EAAC,EAAE;YAC3C,OAAO,IAAA,mBAAQ,EAAC,OAAO,CAAC,aAAa,CAAC,oBAAoB,CAAC,CAAC,CAAC;QACjE,CAAC,CAAC,CAAC;IACP,CAAC;IAED,GAAG;QACC,OAAO,IAAI,CAAC,kBAAkB,CAAC,KAAK,EAAC,OAAO,EAAC,EAAE;YAC3C,OAAO,IAAI,SAAG,CAAC,MAAM,IAAA,mBAAQ,EAAC,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC;QAC5D,CAAC,CAAC,CAAC;IACP,CAAC;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AsD;QACtF,MAAM,kBAAkB,GAAI,MAAM,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE,CAAC;QACjE,MAAM,iBAAiB,GAAK,IAAI,CAAC,MAAM,CAAC;QACxC,MAAM,YAAY,GAAU,kBAAkB,KAAK,iBAAiB,CAAC;QAErE,IAAI,YAAY,EAAE;YACd,MAAM,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;SAC3D;QAED,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAE1C,IAAI,YAAY,EAAE;YACd,MAAM,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;SAC5D;QAED,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ;AArHD,wCAqHC"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { PageElement } from '@serenity-js/web';
|
|
1
|
+
import { PageElement, SwitchableOrigin } from '@serenity-js/web';
|
|
2
2
|
import { ElementFinder } from 'protractor';
|
|
3
|
+
/**
|
|
4
|
+
* @extends {@serenity-js/web/lib/screenplay/models~PageElement}
|
|
5
|
+
*/
|
|
3
6
|
export declare class ProtractorPageElement extends PageElement<ElementFinder> {
|
|
4
7
|
of(parent: ProtractorPageElement): PageElement<ElementFinder>;
|
|
5
8
|
clearValue(): Promise<void>;
|
|
@@ -12,10 +15,22 @@ export declare class ProtractorPageElement extends PageElement<ElementFinder> {
|
|
|
12
15
|
attribute(name: string): Promise<string>;
|
|
13
16
|
text(): Promise<string>;
|
|
14
17
|
value(): Promise<string>;
|
|
18
|
+
switchTo(): Promise<SwitchableOrigin>;
|
|
15
19
|
isActive(): Promise<boolean>;
|
|
16
20
|
isClickable(): Promise<boolean>;
|
|
17
21
|
isEnabled(): Promise<boolean>;
|
|
18
22
|
isPresent(): Promise<boolean>;
|
|
19
23
|
isSelected(): Promise<boolean>;
|
|
24
|
+
/**
|
|
25
|
+
* @desc
|
|
26
|
+
* Checks if the PageElement:
|
|
27
|
+
* - is not hidden, so doesn't have CSS style like `display: none`, `visibility: hidden` or `opacity: 0`
|
|
28
|
+
* - is within the browser viewport
|
|
29
|
+
* - doesn't have its centre covered by other elements
|
|
30
|
+
*
|
|
31
|
+
* @returns {Promise<boolean>}
|
|
32
|
+
*
|
|
33
|
+
* @see {@link @serenity-js/web/lib/screenplay/models~PageElement}
|
|
34
|
+
*/
|
|
20
35
|
isVisible(): Promise<boolean>;
|
|
21
36
|
}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ProtractorPageElement = void 0;
|
|
4
|
+
const core_1 = require("@serenity-js/core");
|
|
4
5
|
const web_1 = require("@serenity-js/web");
|
|
5
6
|
const protractor_1 = require("protractor");
|
|
6
7
|
const promised_1 = require("../promised");
|
|
8
|
+
/**
|
|
9
|
+
* @extends {@serenity-js/web/lib/screenplay/models~PageElement}
|
|
10
|
+
*/
|
|
7
11
|
class ProtractorPageElement extends web_1.PageElement {
|
|
8
12
|
of(parent) {
|
|
9
13
|
return new ProtractorPageElement(this.locator.of(parent.locator));
|
|
@@ -77,6 +81,37 @@ class ProtractorPageElement extends web_1.PageElement {
|
|
|
77
81
|
return webElement.value;
|
|
78
82
|
}, webElement));
|
|
79
83
|
}
|
|
84
|
+
async switchTo() {
|
|
85
|
+
const element = await this.locator.nativeElement();
|
|
86
|
+
try {
|
|
87
|
+
// https://github.com/angular/protractor/issues/1846#issuecomment-82634739;
|
|
88
|
+
const webElement = await element.getWebElement();
|
|
89
|
+
const tagName = await element.getTagName();
|
|
90
|
+
const browser = element.browser_;
|
|
91
|
+
if (['iframe', 'frame'].includes(tagName)) {
|
|
92
|
+
// switchToFrame
|
|
93
|
+
await browser.switchTo().frame(webElement);
|
|
94
|
+
return {
|
|
95
|
+
switchBack: async () => {
|
|
96
|
+
await browser.driver.switchToParentFrame();
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
// focus on element
|
|
102
|
+
const previouslyFocusedElement = await webElement.getDriver().switchTo().activeElement();
|
|
103
|
+
await webElement.getDriver().executeScript(`arguments[0].focus()`, webElement);
|
|
104
|
+
return {
|
|
105
|
+
switchBack: async () => {
|
|
106
|
+
await webElement.getDriver().executeScript(`arguments[0].focus()`, previouslyFocusedElement);
|
|
107
|
+
},
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
catch (error) {
|
|
112
|
+
throw new core_1.LogicError(`Couldn't switch to page element located ${this.locator}`, error);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
80
115
|
async isActive() {
|
|
81
116
|
const element = await this.nativeElement();
|
|
82
117
|
const webElement = await element.getWebElement();
|
|
@@ -97,6 +132,17 @@ class ProtractorPageElement extends web_1.PageElement {
|
|
|
97
132
|
const element = await this.nativeElement();
|
|
98
133
|
return element.isSelected();
|
|
99
134
|
}
|
|
135
|
+
/**
|
|
136
|
+
* @desc
|
|
137
|
+
* Checks if the PageElement:
|
|
138
|
+
* - is not hidden, so doesn't have CSS style like `display: none`, `visibility: hidden` or `opacity: 0`
|
|
139
|
+
* - is within the browser viewport
|
|
140
|
+
* - doesn't have its centre covered by other elements
|
|
141
|
+
*
|
|
142
|
+
* @returns {Promise<boolean>}
|
|
143
|
+
*
|
|
144
|
+
* @see {@link @serenity-js/web/lib/screenplay/models~PageElement}
|
|
145
|
+
*/
|
|
100
146
|
async isVisible() {
|
|
101
147
|
const element = await this.nativeElement();
|
|
102
148
|
if (!await element.isDisplayed()) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProtractorPageElement.js","sourceRoot":"","sources":["../../../src/screenplay/models/ProtractorPageElement.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"ProtractorPageElement.js","sourceRoot":"","sources":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,aAAa,EAAE,CAAC;QAE1D,OAAO,OAAO,CAAC,SAAS,EAAE,CAAC;IAC/B,CAAC;IAED,KAAK,CAAC,SAAS;QACX,MAAM,OAAO,GAAkB,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC;QAE1D,OAAO,OAAO,CAAC,SAAS,EAAE,CAAC;IAC/B,CAAC;IAED,KAAK,CAAC,UAAU;QACZ,MAAM,OAAO,GAAkB,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC;QAE1D,OAAO,OAAO,CAAC,UAAU,EAAE,CAAC;IAChC,CAAC;IAED;;;;;;;;;;OAUG;IACH,KAAK,CAAC,SAAS;QACX,MAAM,OAAO,GAAkB,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC;QAE1D,IAAI,CAAC,MAAM,OAAO,CAAC,WAAW,EAAE,EAAE;YAC9B,OAAO,KAAK,CAAC;SAChB;QAED,MAAM,UAAU,GAAe,MAAM,OAAO,CAAC,aAAa,EAAE,CAAC;QAE7D,mGAAmG;QACnG,OAAO,IAAA,mBAAQ,EAAC,UAAU,CAAC,SAAS,EAAE,CAAC,aAAa,CAChD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAuHC,EACD,UAAU,CACb,CAAC,CAAC;IACP,CAAC;CACJ;AAtUD,sDAsUC"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -11,7 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
11
15
|
};
|
|
12
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
17
|
__exportStar(require("./ProtractorCookie"), exports);
|
|
14
|
-
__exportStar(require("./ProtractorFrame"), exports);
|
|
15
18
|
__exportStar(require("./ProtractorModalDialog"), exports);
|
|
16
19
|
__exportStar(require("./ProtractorPage"), exports);
|
|
17
20
|
__exportStar(require("./ProtractorPageElement"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/screenplay/models/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/screenplay/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,0DAAwC;AACxC,mDAAiC;AACjC,0DAAwC"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/screenplay/models/locators/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/screenplay/models/locators/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,gEAA8C"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/screenplay/questions/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/screenplay/questions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serenity-js/protractor",
|
|
3
|
-
"version": "3.0.0-rc.
|
|
3
|
+
"version": "3.0.0-rc.14",
|
|
4
4
|
"description": "Test your web apps with Serenity/JS",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Jan Molak",
|
|
@@ -34,13 +34,14 @@
|
|
|
34
34
|
"lint": "eslint --ext ts --config ../../.eslintrc.yml .",
|
|
35
35
|
"lint:fix": "npm run lint -- --fix",
|
|
36
36
|
"debug": "node --inspect-brk node_modules/.bin/protractor ./spec/protractor.conf.js",
|
|
37
|
-
"test": "nyc
|
|
37
|
+
"test": "nyc protractor ./spec/protractor.conf.js",
|
|
38
38
|
"compile": "tsc --project tsconfig.json",
|
|
39
39
|
"site": "esdoc -c .esdoc.js"
|
|
40
40
|
},
|
|
41
41
|
"repository": {
|
|
42
42
|
"type": "git",
|
|
43
|
-
"url": "https://github.com/serenity-js/serenity-js.git"
|
|
43
|
+
"url": "https://github.com/serenity-js/serenity-js.git",
|
|
44
|
+
"directory": "packages/protractor"
|
|
44
45
|
},
|
|
45
46
|
"bugs": {
|
|
46
47
|
"url": "https://github.com/serenity-js/serenity-js/issues"
|
|
@@ -50,11 +51,12 @@
|
|
|
50
51
|
"npm": "^6 || ^7 || ^8"
|
|
51
52
|
},
|
|
52
53
|
"dependencies": {
|
|
53
|
-
"@serenity-js/assertions": "3.0.0-rc.
|
|
54
|
-
"@serenity-js/core": "3.0.0-rc.
|
|
54
|
+
"@serenity-js/assertions": "3.0.0-rc.14",
|
|
55
|
+
"@serenity-js/core": "3.0.0-rc.14",
|
|
55
56
|
"deepmerge": "^4.2.2",
|
|
56
57
|
"is-plain-object": "^5.0.0",
|
|
57
58
|
"query-selector-shadow-dom": "^1.0.0",
|
|
59
|
+
"selenium-webdriver": "^3.6.0",
|
|
58
60
|
"tiny-types": "^1.17.0"
|
|
59
61
|
},
|
|
60
62
|
"peerDependencies": {
|
|
@@ -78,50 +80,28 @@
|
|
|
78
80
|
"devDependencies": {
|
|
79
81
|
"@documentation/esdoc-template": "3.0.0",
|
|
80
82
|
"@integration/testing-tools": "3.0.0",
|
|
81
|
-
"@serenity-js/cucumber": "3.0.0-rc.
|
|
82
|
-
"@serenity-js/jasmine": "3.0.0-rc.
|
|
83
|
-
"@serenity-js/local-server": "3.0.0-rc.
|
|
84
|
-
"@serenity-js/mocha": "3.0.0-rc.
|
|
85
|
-
"@serenity-js/rest": "3.0.0-rc.
|
|
86
|
-
"@serenity-js/web": "3.0.0-rc.
|
|
83
|
+
"@serenity-js/cucumber": "3.0.0-rc.14",
|
|
84
|
+
"@serenity-js/jasmine": "3.0.0-rc.14",
|
|
85
|
+
"@serenity-js/local-server": "3.0.0-rc.14",
|
|
86
|
+
"@serenity-js/mocha": "3.0.0-rc.14",
|
|
87
|
+
"@serenity-js/rest": "3.0.0-rc.14",
|
|
88
|
+
"@serenity-js/web": "3.0.0-rc.14",
|
|
87
89
|
"@types/chai": "^4.3.0",
|
|
88
90
|
"@types/express": "^4.17.13",
|
|
89
91
|
"@types/html-minifier": "^4.0.2",
|
|
90
|
-
"@types/mocha": "^9.
|
|
92
|
+
"@types/mocha": "^9.1.0",
|
|
91
93
|
"@types/selenium-webdriver": "^3.0.19",
|
|
92
94
|
"axios": "^0.21.4",
|
|
93
|
-
"body-parser": "^1.19.
|
|
95
|
+
"body-parser": "^1.19.2",
|
|
94
96
|
"cross-env": "^7.0.3",
|
|
95
|
-
"express": "^4.17.
|
|
97
|
+
"express": "^4.17.3",
|
|
96
98
|
"html-minifier": "^4.0.0",
|
|
97
|
-
"mocha": "^9.
|
|
99
|
+
"mocha": "^9.2.2",
|
|
98
100
|
"protractor": "^7.0.0",
|
|
99
101
|
"selenium-webdriver": "^3.6.0",
|
|
100
102
|
"start-server-and-test": "^1.14.0",
|
|
101
|
-
"ts-node": "^10.
|
|
102
|
-
"typescript": "^4.
|
|
103
|
-
},
|
|
104
|
-
"nyc": {
|
|
105
|
-
"include": [
|
|
106
|
-
"src/**/*.ts"
|
|
107
|
-
],
|
|
108
|
-
"exclude": [
|
|
109
|
-
"src/**/*.d.ts",
|
|
110
|
-
"lib",
|
|
111
|
-
"node_modules",
|
|
112
|
-
"spec"
|
|
113
|
-
],
|
|
114
|
-
"extension": [
|
|
115
|
-
".ts"
|
|
116
|
-
],
|
|
117
|
-
"require": [
|
|
118
|
-
"ts-node/register"
|
|
119
|
-
],
|
|
120
|
-
"reporter": [
|
|
121
|
-
"json"
|
|
122
|
-
],
|
|
123
|
-
"cache": true,
|
|
124
|
-
"all": true
|
|
103
|
+
"ts-node": "^10.7.0",
|
|
104
|
+
"typescript": "^4.6.2"
|
|
125
105
|
},
|
|
126
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "b4aa801512b45db287e10fa44c9ec1d6f08126c3"
|
|
127
107
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ConfigurationError, Duration, LogicError } from '@serenity-js/core';
|
|
2
|
-
import { BrowserCapabilities, BrowseTheWeb, ByCss, ByCssContainingText, ById, ByTagName, ByXPath, Cookie, CookieData,
|
|
2
|
+
import { BrowserCapabilities, BrowseTheWeb, ByCss, ByCssContainingText, ById, ByTagName, ByXPath, Cookie, CookieData, Key, ModalDialog, Page } from '@serenity-js/web';
|
|
3
3
|
import { by, ElementFinder, ProtractorBrowser } from 'protractor';
|
|
4
4
|
import { Capabilities } from 'selenium-webdriver';
|
|
5
5
|
|
|
6
|
-
import { ProtractorCookie,
|
|
6
|
+
import { ProtractorCookie, ProtractorModalDialog, ProtractorPage, ProtractorPageElement } from '../models';
|
|
7
7
|
import { ProtractorLocator, ProtractorNativeElementRoot } from '../models/locators';
|
|
8
8
|
import { promised } from '../promised';
|
|
9
9
|
|
|
@@ -164,12 +164,6 @@ export class BrowseTheWebWithProtractor extends BrowseTheWeb<ElementFinder, Prot
|
|
|
164
164
|
return new ProtractorModalDialog(this.browser);
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
-
async frame(bySelector: Selector): Promise<Frame> {
|
|
168
|
-
const locator = this.locate(bySelector);
|
|
169
|
-
|
|
170
|
-
return new ProtractorFrame(this.browser, locator);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
167
|
/**
|
|
174
168
|
* @desc
|
|
175
169
|
* Navigate to the given destination and loads mock modules before Angular.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Page } from '@serenity-js/web';
|
|
1
|
+
import { Page, SwitchableOrigin } from '@serenity-js/web';
|
|
2
2
|
import { ProtractorBrowser } from 'protractor';
|
|
3
3
|
import { URL } from 'url';
|
|
4
4
|
|
|
@@ -92,7 +92,7 @@ export class ProtractorPage extends Page {
|
|
|
92
92
|
return isOpen;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
async switchTo(): Promise<
|
|
95
|
+
async switchTo(): Promise<SwitchableOrigin> {
|
|
96
96
|
const originalWindowHandle = await this.browser.getWindowHandle();
|
|
97
97
|
|
|
98
98
|
await this.browser.switchTo().window(this.handle);
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LogicError } from '@serenity-js/core';
|
|
2
|
+
import { PageElement, SwitchableOrigin } from '@serenity-js/web';
|
|
2
3
|
import { ElementFinder, protractor } from 'protractor';
|
|
3
4
|
import { WebElement } from 'selenium-webdriver';
|
|
4
5
|
|
|
5
6
|
import { promised } from '../promised';
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
/**
|
|
9
|
+
* @extends {@serenity-js/web/lib/screenplay/models~PageElement}
|
|
10
|
+
*/
|
|
11
|
+
export class ProtractorPageElement extends PageElement<ElementFinder> {
|
|
12
|
+
|
|
10
13
|
of(parent: ProtractorPageElement): PageElement<ElementFinder> {
|
|
11
14
|
return new ProtractorPageElement(this.locator.of(parent.locator));
|
|
12
15
|
}
|
|
@@ -48,7 +51,7 @@ export class ProtractorPageElement
|
|
|
48
51
|
webElement.getDriver().actions()
|
|
49
52
|
.mouseMove(webElement)
|
|
50
53
|
.doubleClick()
|
|
51
|
-
.perform()
|
|
54
|
+
.perform(),
|
|
52
55
|
);
|
|
53
56
|
}
|
|
54
57
|
|
|
@@ -56,7 +59,7 @@ export class ProtractorPageElement
|
|
|
56
59
|
const element: ElementFinder = await this.nativeElement();
|
|
57
60
|
|
|
58
61
|
return element.sendKeys(
|
|
59
|
-
[].concat(value).join('')
|
|
62
|
+
[].concat(value).join(''),
|
|
60
63
|
);
|
|
61
64
|
}
|
|
62
65
|
|
|
@@ -65,7 +68,7 @@ export class ProtractorPageElement
|
|
|
65
68
|
const webElement: WebElement = await element.getWebElement();
|
|
66
69
|
|
|
67
70
|
return promised(
|
|
68
|
-
webElement.getDriver().executeScript('arguments[0].scrollIntoView(true);', webElement)
|
|
71
|
+
webElement.getDriver().executeScript('arguments[0].scrollIntoView(true);', webElement),
|
|
69
72
|
);
|
|
70
73
|
}
|
|
71
74
|
|
|
@@ -76,7 +79,7 @@ export class ProtractorPageElement
|
|
|
76
79
|
return promised(
|
|
77
80
|
webElement.getDriver().actions()
|
|
78
81
|
.mouseMove(webElement)
|
|
79
|
-
.perform()
|
|
82
|
+
.perform(),
|
|
80
83
|
);
|
|
81
84
|
}
|
|
82
85
|
|
|
@@ -88,7 +91,7 @@ export class ProtractorPageElement
|
|
|
88
91
|
webElement.getDriver().actions()
|
|
89
92
|
.mouseMove(webElement)
|
|
90
93
|
.click(protractor.Button.RIGHT)
|
|
91
|
-
.perform()
|
|
94
|
+
.perform(),
|
|
92
95
|
);
|
|
93
96
|
}
|
|
94
97
|
|
|
@@ -117,6 +120,44 @@ export class ProtractorPageElement
|
|
|
117
120
|
));
|
|
118
121
|
}
|
|
119
122
|
|
|
123
|
+
async switchTo(): Promise<SwitchableOrigin> {
|
|
124
|
+
const element: ElementFinder = await this.locator.nativeElement();
|
|
125
|
+
|
|
126
|
+
try {
|
|
127
|
+
// https://github.com/angular/protractor/issues/1846#issuecomment-82634739;
|
|
128
|
+
const webElement = await element.getWebElement();
|
|
129
|
+
|
|
130
|
+
const tagName = await element.getTagName();
|
|
131
|
+
|
|
132
|
+
const browser = element.browser_;
|
|
133
|
+
|
|
134
|
+
if ([ 'iframe', 'frame' ].includes(tagName)) {
|
|
135
|
+
// switchToFrame
|
|
136
|
+
await browser.switchTo().frame(webElement);
|
|
137
|
+
|
|
138
|
+
return {
|
|
139
|
+
switchBack: async (): Promise<void> => {
|
|
140
|
+
await browser.driver.switchToParentFrame();
|
|
141
|
+
},
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
// focus on element
|
|
146
|
+
const previouslyFocusedElement = await webElement.getDriver().switchTo().activeElement();
|
|
147
|
+
|
|
148
|
+
await webElement.getDriver().executeScript(`arguments[0].focus()`, webElement);
|
|
149
|
+
|
|
150
|
+
return {
|
|
151
|
+
switchBack: async (): Promise<void> => {
|
|
152
|
+
await webElement.getDriver().executeScript(`arguments[0].focus()`, previouslyFocusedElement);
|
|
153
|
+
},
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
} catch (error) {
|
|
157
|
+
throw new LogicError(`Couldn't switch to page element located ${ this.locator }`, error);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
120
161
|
async isActive(): Promise<boolean> {
|
|
121
162
|
const element: ElementFinder = await this.nativeElement();
|
|
122
163
|
const webElement: WebElement = await element.getWebElement();
|
|
@@ -148,10 +189,21 @@ export class ProtractorPageElement
|
|
|
148
189
|
return element.isSelected();
|
|
149
190
|
}
|
|
150
191
|
|
|
192
|
+
/**
|
|
193
|
+
* @desc
|
|
194
|
+
* Checks if the PageElement:
|
|
195
|
+
* - is not hidden, so doesn't have CSS style like `display: none`, `visibility: hidden` or `opacity: 0`
|
|
196
|
+
* - is within the browser viewport
|
|
197
|
+
* - doesn't have its centre covered by other elements
|
|
198
|
+
*
|
|
199
|
+
* @returns {Promise<boolean>}
|
|
200
|
+
*
|
|
201
|
+
* @see {@link @serenity-js/web/lib/screenplay/models~PageElement}
|
|
202
|
+
*/
|
|
151
203
|
async isVisible(): Promise<boolean> {
|
|
152
204
|
const element: ElementFinder = await this.nativeElement();
|
|
153
205
|
|
|
154
|
-
if (!
|
|
206
|
+
if (!await element.isDisplayed()) {
|
|
155
207
|
return false;
|
|
156
208
|
}
|
|
157
209
|
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Frame, Locator } from '@serenity-js/web';
|
|
2
|
-
import { ElementFinder, ProtractorBrowser } from 'protractor';
|
|
3
|
-
export declare class ProtractorFrame extends Frame<ElementFinder> {
|
|
4
|
-
private readonly browser;
|
|
5
|
-
constructor(browser: ProtractorBrowser, locator: Locator<ElementFinder>);
|
|
6
|
-
isPresent(): Promise<boolean>;
|
|
7
|
-
switchTo(): Promise<{
|
|
8
|
-
switchBack(): Promise<void>;
|
|
9
|
-
}>;
|
|
10
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ProtractorFrame = void 0;
|
|
4
|
-
const core_1 = require("@serenity-js/core");
|
|
5
|
-
const web_1 = require("@serenity-js/web");
|
|
6
|
-
class ProtractorFrame extends web_1.Frame {
|
|
7
|
-
constructor(browser, locator) {
|
|
8
|
-
super(locator);
|
|
9
|
-
this.browser = browser;
|
|
10
|
-
}
|
|
11
|
-
async isPresent() {
|
|
12
|
-
const element = await this.locator.nativeElement();
|
|
13
|
-
return element.isPresent();
|
|
14
|
-
}
|
|
15
|
-
async switchTo() {
|
|
16
|
-
const element = await this.locator.nativeElement();
|
|
17
|
-
let webElement;
|
|
18
|
-
try {
|
|
19
|
-
// https://github.com/angular/protractor/issues/1846#issuecomment-82634739;
|
|
20
|
-
webElement = await element.getWebElement();
|
|
21
|
-
}
|
|
22
|
-
catch (error) {
|
|
23
|
-
throw new core_1.LogicError(`Couldn't locate frame ${this.locator}`, error);
|
|
24
|
-
}
|
|
25
|
-
try {
|
|
26
|
-
await this.browser.switchTo().frame(webElement);
|
|
27
|
-
return {
|
|
28
|
-
switchBack: async () => {
|
|
29
|
-
await this.browser.driver.switchToParentFrame();
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
catch (error) {
|
|
34
|
-
throw new core_1.LogicError(`Couldn't switch to a frame located ${this.locator}`, error);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
exports.ProtractorFrame = ProtractorFrame;
|
|
39
|
-
//# sourceMappingURL=ProtractorFrame.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProtractorFrame.js","sourceRoot":"","sources":["../../../src/screenplay/models/ProtractorFrame.ts"],"names":[],"mappings":";;;AAAA,4CAA+C;AAC/C,0CAAkD;AAGlD,MAAa,eAAgB,SAAQ,WAAoB;IACrD,YACqB,OAA0B,EAC3C,OAA+B;QAE/B,KAAK,CAAC,OAAO,CAAC,CAAC;QAHE,YAAO,GAAP,OAAO,CAAmB;IAI/C,CAAC;IAED,KAAK,CAAC,SAAS;QACX,MAAM,OAAO,GAAkB,MAAM,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC;QAElE,OAAO,OAAO,CAAC,SAAS,EAAE,CAAC;IAC/B,CAAC;IAED,KAAK,CAAC,QAAQ;QACV,MAAM,OAAO,GAAkB,MAAM,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,CAAA;QAEjE,IAAI,UAAsB,CAAC;QAE3B,IAAI;YACA,2EAA2E;YAC3E,UAAU,GAAG,MAAM,OAAO,CAAC,aAAa,EAAE,CAAC;SAC9C;QAAC,OAAO,KAAK,EAAE;YACZ,MAAM,IAAI,iBAAU,CAAC,yBAA0B,IAAI,CAAC,OAAQ,EAAE,EAAE,KAAK,CAAC,CAAC;SAC1E;QAED,IAAI;YACA,MAAM,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;YAEhD,OAAO;gBACH,UAAU,EAAE,KAAK,IAAmB,EAAE;oBAClC,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,mBAAmB,EAAE,CAAC;gBACpD,CAAC;aACJ,CAAA;SACJ;QACD,OAAO,KAAK,EAAE;YACV,MAAM,IAAI,iBAAU,CAAC,sCAAuC,IAAI,CAAC,OAAQ,EAAE,EAAE,KAAK,CAAC,CAAC;SACvF;IACL,CAAC;CACJ;AAvCD,0CAuCC"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { LogicError } from '@serenity-js/core';
|
|
2
|
-
import { Frame, Locator } from '@serenity-js/web';
|
|
3
|
-
import { ElementFinder, ProtractorBrowser, WebElement } from 'protractor';
|
|
4
|
-
|
|
5
|
-
export class ProtractorFrame extends Frame<ElementFinder> {
|
|
6
|
-
constructor(
|
|
7
|
-
private readonly browser: ProtractorBrowser,
|
|
8
|
-
locator: Locator<ElementFinder>
|
|
9
|
-
) {
|
|
10
|
-
super(locator);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
async isPresent(): Promise<boolean> {
|
|
14
|
-
const element: ElementFinder = await this.locator.nativeElement();
|
|
15
|
-
|
|
16
|
-
return element.isPresent();
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
async switchTo(): Promise<{ switchBack(): Promise<void> }> {
|
|
20
|
-
const element: ElementFinder = await this.locator.nativeElement()
|
|
21
|
-
|
|
22
|
-
let webElement: WebElement;
|
|
23
|
-
|
|
24
|
-
try {
|
|
25
|
-
// https://github.com/angular/protractor/issues/1846#issuecomment-82634739;
|
|
26
|
-
webElement = await element.getWebElement();
|
|
27
|
-
} catch (error) {
|
|
28
|
-
throw new LogicError(`Couldn't locate frame ${ this.locator }`, error);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
try {
|
|
32
|
-
await this.browser.switchTo().frame(webElement);
|
|
33
|
-
|
|
34
|
-
return {
|
|
35
|
-
switchBack: async (): Promise<void> => {
|
|
36
|
-
await this.browser.driver.switchToParentFrame();
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
catch (error) {
|
|
41
|
-
throw new LogicError(`Couldn't switch to a frame located ${ this.locator }`, error);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|