codeceptjs 3.5.1 â 3.5.2
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 +7 -0
- package/README.md +2 -2
- package/docs/build/OpenAI.js +14 -10
- package/docs/build/Playwright.js +1 -1
- package/docs/changelog.md +7 -0
- package/lib/helper/OpenAI.js +14 -10
- package/lib/helper/Playwright.js +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -308,12 +308,12 @@ Thanks all to those who are and will have contributing to this awesome project!
|
|
|
308
308
|
<a href="https://github.com/KMKoushik"><img src="https://avatars.githubusercontent.com/u/24666922?v=4" title="KMKoushik" width="80" height="80"></a>
|
|
309
309
|
<a href="https://github.com/nikocanvacom"><img src="https://avatars.githubusercontent.com/u/83254493?v=4" title="nikocanvacom" width="80" height="80"></a>
|
|
310
310
|
<a href="https://github.com/elukoyanov"><img src="https://avatars.githubusercontent.com/u/11647141?v=4" title="elukoyanov" width="80" height="80"></a>
|
|
311
|
-
<a href="https://github.com/gkushang"><img src="https://avatars.githubusercontent.com/u/3663389?v=4" title="gkushang" width="80" height="80"></a>
|
|
312
311
|
<a href="https://github.com/actions-user"><img src="https://avatars.githubusercontent.com/u/65916846?v=4" title="actions-user" width="80" height="80"></a>
|
|
312
|
+
<a href="https://github.com/apps/dependabot"><img src="https://avatars.githubusercontent.com/in/29110?v=4" title="dependabot[bot]" width="80" height="80"></a>
|
|
313
|
+
<a href="https://github.com/gkushang"><img src="https://avatars.githubusercontent.com/u/3663389?v=4" title="gkushang" width="80" height="80"></a>
|
|
313
314
|
<a href="https://github.com/tsuemura"><img src="https://avatars.githubusercontent.com/u/17092259?v=4" title="tsuemura" width="80" height="80"></a>
|
|
314
315
|
<a href="https://github.com/EgorBodnar"><img src="https://avatars.githubusercontent.com/u/63167966?v=4" title="EgorBodnar" width="80" height="80"></a>
|
|
315
316
|
<a href="https://github.com/VikalpP"><img src="https://avatars.githubusercontent.com/u/11846339?v=4" title="VikalpP" width="80" height="80"></a>
|
|
316
|
-
<a href="https://github.com/apps/dependabot"><img src="https://avatars.githubusercontent.com/in/29110?v=4" title="dependabot[bot]" width="80" height="80"></a>
|
|
317
317
|
<a href="https://github.com/BorisOsipov"><img src="https://avatars.githubusercontent.com/u/6514276?v=4" title="BorisOsipov" width="80" height="80"></a>
|
|
318
318
|
<a href="https://github.com/elaichenkov"><img src="https://avatars.githubusercontent.com/u/29764053?v=4" title="elaichenkov" width="80" height="80"></a>
|
|
319
319
|
<a href="https://github.com/nitschSB"><img src="https://avatars.githubusercontent.com/u/39341455?v=4" title="nitschSB" width="80" height="80"></a>
|
package/docs/build/OpenAI.js
CHANGED
|
@@ -25,7 +25,9 @@ class OpenAI extends Helper {
|
|
|
25
25
|
chunkSize: 80000,
|
|
26
26
|
};
|
|
27
27
|
this.options = { ...this.options, ...config };
|
|
28
|
+
}
|
|
28
29
|
|
|
30
|
+
_beforeSuite() {
|
|
29
31
|
const helpers = Container.helpers();
|
|
30
32
|
|
|
31
33
|
for (const helperName of standardActingHelpers) {
|
|
@@ -37,16 +39,16 @@ class OpenAI extends Helper {
|
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
/**
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
42
|
+
* Asks the OpenAI GPT language model a question based on the provided prompt within the context of the current page's HTML.
|
|
43
|
+
*
|
|
44
|
+
* ```js
|
|
45
|
+
* I.askGptOnPage('what does this page do?');
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* @async
|
|
49
|
+
* @param {string} prompt - The question or prompt to ask the GPT model.
|
|
50
|
+
* @returns {Promise<string>} - A Promise that resolves to the generated responses from the GPT model, joined by newlines.
|
|
51
|
+
*/
|
|
50
52
|
async askGptOnPage(prompt) {
|
|
51
53
|
const html = await this.helper.grabSource();
|
|
52
54
|
|
|
@@ -120,3 +122,5 @@ class OpenAI extends Helper {
|
|
|
120
122
|
return response;
|
|
121
123
|
}
|
|
122
124
|
}
|
|
125
|
+
|
|
126
|
+
module.exports = OpenAI;
|
package/docs/build/Playwright.js
CHANGED
|
@@ -1990,7 +1990,7 @@ class Playwright extends Helper {
|
|
|
1990
1990
|
*/
|
|
1991
1991
|
async clearField(locator, options = {}) {
|
|
1992
1992
|
let result;
|
|
1993
|
-
const isNewClearMethodPresent = typeof this.page.locator().clear === 'function';
|
|
1993
|
+
const isNewClearMethodPresent = false; // not works, disabled for now. Prev: typeof this.page.locator().clear === 'function';
|
|
1994
1994
|
|
|
1995
1995
|
if (isNewClearMethodPresent) {
|
|
1996
1996
|
const els = await findFields.call(this, locator);
|
package/docs/changelog.md
CHANGED
|
@@ -7,6 +7,13 @@ layout: Section
|
|
|
7
7
|
|
|
8
8
|
# Releases
|
|
9
9
|
|
|
10
|
+
## 3.5.2
|
|
11
|
+
|
|
12
|
+
đ Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **[Playwright]** reverted `clearField` to previous implementation
|
|
15
|
+
* **[OpenAI]** fixed running helper in pause mode. [#3755](https://github.com/codeceptjs/CodeceptJS/issues/3755) by **[KobeNguyenT](https://github.com/KobeNguyenT)**
|
|
16
|
+
|
|
10
17
|
## 3.5.1
|
|
11
18
|
|
|
12
19
|
đŠī¸ Features
|
package/lib/helper/OpenAI.js
CHANGED
|
@@ -25,7 +25,9 @@ class OpenAI extends Helper {
|
|
|
25
25
|
chunkSize: 80000,
|
|
26
26
|
};
|
|
27
27
|
this.options = { ...this.options, ...config };
|
|
28
|
+
}
|
|
28
29
|
|
|
30
|
+
_beforeSuite() {
|
|
29
31
|
const helpers = Container.helpers();
|
|
30
32
|
|
|
31
33
|
for (const helperName of standardActingHelpers) {
|
|
@@ -37,16 +39,16 @@ class OpenAI extends Helper {
|
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
/**
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
42
|
+
* Asks the OpenAI GPT language model a question based on the provided prompt within the context of the current page's HTML.
|
|
43
|
+
*
|
|
44
|
+
* ```js
|
|
45
|
+
* I.askGptOnPage('what does this page do?');
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* @async
|
|
49
|
+
* @param {string} prompt - The question or prompt to ask the GPT model.
|
|
50
|
+
* @returns {Promise<string>} - A Promise that resolves to the generated responses from the GPT model, joined by newlines.
|
|
51
|
+
*/
|
|
50
52
|
async askGptOnPage(prompt) {
|
|
51
53
|
const html = await this.helper.grabSource();
|
|
52
54
|
|
|
@@ -120,3 +122,5 @@ class OpenAI extends Helper {
|
|
|
120
122
|
return response;
|
|
121
123
|
}
|
|
122
124
|
}
|
|
125
|
+
|
|
126
|
+
module.exports = OpenAI;
|
package/lib/helper/Playwright.js
CHANGED
|
@@ -1560,7 +1560,7 @@ class Playwright extends Helper {
|
|
|
1560
1560
|
*/
|
|
1561
1561
|
async clearField(locator, options = {}) {
|
|
1562
1562
|
let result;
|
|
1563
|
-
const isNewClearMethodPresent = typeof this.page.locator().clear === 'function';
|
|
1563
|
+
const isNewClearMethodPresent = false; // not works, disabled for now. Prev: typeof this.page.locator().clear === 'function';
|
|
1564
1564
|
|
|
1565
1565
|
if (isNewClearMethodPresent) {
|
|
1566
1566
|
const els = await findFields.call(this, locator);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeceptjs",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.2",
|
|
4
4
|
"description": "Supercharged End 2 End Testing Framework for NodeJS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"acceptance",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"@cucumber/gherkin": "^26",
|
|
66
66
|
"@cucumber/messages": "^21.0.1",
|
|
67
67
|
"@xmldom/xmldom": "^0.7.9",
|
|
68
|
-
"acorn": "^
|
|
68
|
+
"acorn": "^8.10.0",
|
|
69
69
|
"arrify": "^2.0.1",
|
|
70
70
|
"axios": "^1.3.3",
|
|
71
71
|
"chai": "^4.3.6",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"cross-spawn": "^7.0.3",
|
|
76
76
|
"css-to-xpath": "^0.1.0",
|
|
77
77
|
"envinfo": "^7.8.1",
|
|
78
|
-
"escape-string-regexp": "^
|
|
78
|
+
"escape-string-regexp": "^4.0.0",
|
|
79
79
|
"figures": "^3.2.0",
|
|
80
80
|
"fn-args": "^4.0.0",
|
|
81
81
|
"fs-extra": "^8.1.0",
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"contributor-faces": "^1.0.3",
|
|
116
116
|
"documentation": "^12.3.0",
|
|
117
117
|
"dtslint": "^4.1.6",
|
|
118
|
-
"electron": "^
|
|
118
|
+
"electron": "^25.2.0",
|
|
119
119
|
"eslint": "^6.8.0",
|
|
120
120
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
121
121
|
"eslint-plugin-import": "^2.25.4",
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
"wdio-docker-service": "^1.5.0",
|
|
148
148
|
"webdriverio": "^8.3.8",
|
|
149
149
|
"xml2js": "^0.6.0",
|
|
150
|
-
"xmldom": "^0.
|
|
150
|
+
"xmldom": "^0.6.0",
|
|
151
151
|
"xpath": "0.0.27"
|
|
152
152
|
},
|
|
153
153
|
"engines": {
|