Skip to content

Commit 536c1bc

Browse files
committed
Fixed 3.6.0 release for interactive pause
1 parent 6546673 commit 536c1bc

File tree

4 files changed

+12
-13
lines changed

4 files changed

+12
-13
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 3.6.1
2+
3+
* Fixed regression in interactive pause.
4+
15
## 3.6.0
26

37
🛩️ *Features*

docs/heal.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ To enable healing, you need to define healing recipes and enable heal plugin.
5252
Create basic healing recipes using this command:
5353

5454
```
55-
npx codeceptjs geenrate:heal
55+
npx codeceptjs generate:heal
5656
```
5757

5858
or
@@ -113,7 +113,7 @@ heal.addRecipe('reloadPageOnUserAccount', {
113113
// in this case we execute recipe only on tests that have "@flaky" in their name
114114
grep: '@flaky',
115115

116-
// function to launch to heal the
116+
// function to launch healing process
117117
fn: async ({
118118
// standard context variables
119119
step, test, error, prevSteps,
@@ -179,7 +179,7 @@ heal.addRecipe('ai', {
179179
});
180180
```
181181

182-
As you usee, it will be activated on failed steps and will use HTML of a page as additional information. The prompt, error, and the HTML will be sent to AI provider you configured.
182+
As you use, it will be activated on failed steps and will use HTML of a page as additional information. The prompt, error, and the HTML will be sent to AI provider you configured.
183183

184184
Learn more how you can [configure AI provider](./ai).
185185

lib/pause.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const debug = require('debug')('codeceptjs:pause');
66
const container = require('./container');
77
const history = require('./history');
88
const store = require('./store');
9-
const AiAssistant = require('./ai');
9+
const aiAssistant = require('./ai');
1010
const recorder = require('./recorder');
1111
const event = require('./event');
1212
const output = require('./output');
@@ -18,7 +18,6 @@ let nextStep;
1818
let finish;
1919
let next;
2020
let registeredVariables = {};
21-
let aiAssistant;
2221
/**
2322
* Pauses test execution and starts interactive shell
2423
* @param {Object<string, *>} [passedObject]
@@ -44,8 +43,6 @@ function pauseSession(passedObject = {}) {
4443
let vars = Object.keys(registeredVariables).join(', ');
4544
if (vars) vars = `(vars: ${vars})`;
4645

47-
aiAssistant = AiAssistant.getInstance();
48-
4946
output.print(colors.yellow(' Interactive shell started'));
5047
output.print(colors.yellow(' Use JavaScript syntax to try steps in action'));
5148
output.print(colors.yellow(` - Press ${colors.bold('ENTER')} to run the next step`));
@@ -54,11 +51,9 @@ function pauseSession(passedObject = {}) {
5451
output.print(colors.yellow(` - Prefix ${colors.bold('=>')} to run js commands ${colors.bold(vars)}`));
5552

5653
if (aiAssistant.isEnabled) {
57-
output.print(colors.blue(` ${colors.bold('OpenAI is enabled! (experimental)')} Write what you want and make OpenAI run it`));
58-
output.print(colors.blue(' Please note, only HTML fragments with interactive elements are sent to OpenAI'));
54+
output.print(colors.blue(` ${colors.bold('AI is enabled! (experimental)')} Write what you want and make AI run it`));
55+
output.print(colors.blue(' Please note, only HTML fragments with interactive elements are sent to AI provider'));
5956
output.print(colors.blue(' Ideas: ask it to fill forms for you or to click'));
60-
} else {
61-
output.print(colors.blue(` Enable OpenAI assistant by setting ${colors.bold('OPENAI_API_KEY')} env variable`));
6257
}
6358
}
6459
rl = readline.createInterface(process.stdin, process.stdout, completer);
@@ -125,7 +120,7 @@ async function parseInput(cmd) {
125120
} finally {
126121
output.level(currentOutputLevel);
127122
}
128-
// aiAssistant.mockResponse("```js\nI.click('Sign in');\n```");
123+
129124
const spinner = ora("Processing OpenAI request...").start();
130125
cmd = await aiAssistant.writeSteps(cmd);
131126
spinner.stop();

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codeceptjs",
3-
"version": "3.6.0",
3+
"version": "3.6.1",
44
"description": "Supercharged End 2 End Testing Framework for NodeJS",
55
"keywords": [
66
"acceptance",

0 commit comments

Comments
 (0)