Skip to content

Commit

Permalink
fix: some typos (#3735)
Browse files Browse the repository at this point in the history
  • Loading branch information
kobenguyent authored Jul 6, 2023
1 parent 0d39898 commit 1a5ff26
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
6 changes: 3 additions & 3 deletions docs/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ I.click('=sign-up'); // matches => [data-qa=sign-up],[data-test=sign-up]
Prints errors found in HTML code after each failed test.
It scans HTML and searches for elements with error classes.
It scans HTML and searches for elements with error classes.
If an element found prints a text from it to console and adds as artifact to the test.
Enable this plugin in config:
Expand Down Expand Up @@ -608,11 +608,11 @@ Scenario Outline: ...
## heal
Self-healing tests with OpenAI.
Self-healing tests with OpenAI.
This plugin is experimental and requires OpenAI API key.
To use it you need to set OPENAI_API_KEY env variable and enable plugin inside condig.
To use it you need to set OPENAI_API_KEY env variable and enable plugin inside the config.
```js
plugins: {
Expand Down
8 changes: 3 additions & 5 deletions lib/plugin/heal.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const defaultConfig = {
*
* This plugin is experimental and requires OpenAI API key.
*
* To use it you need to set OPENAI_API_KEY env variable and enable plugin inside condig.
* To use it you need to set OPENAI_API_KEY env variable and enable plugin inside the config.
*
* ```js
* plugins: {
Expand Down Expand Up @@ -82,7 +82,7 @@ module.exports = function (config = {}) {
const test = currentTest;

if (healedSteps >= config.healLimit) {
output.print(colors.bold.red(`Can't heal more than ${config.healLimit} steps in a test`));
output.print(colors.bold.red(`Can't heal more than ${config.healLimit} step(s) in a test`));
output.print('Entire flow can be broken, please check it manually');
output.print('or increase healing limit in heal plugin config');

Expand Down Expand Up @@ -126,7 +126,7 @@ module.exports = function (config = {}) {
print('===================');
print(colors.bold.green('Self-Healing Report:'));

print(`${colors.bold(healSuggestions.length)} steps were healed by AI`);
print(`${colors.bold(healSuggestions.length)} step(s) were healed by AI`);

let i = 1;
print('');
Expand All @@ -147,8 +147,6 @@ module.exports = function (config = {}) {
async function tryToHeal(failedStep, err) {
output.debug(`Running OpenAPI to heal ${failedStep.toCode()} step`);

const I = Container.support('I');

const codeSnippets = await aiAssistant.healFailedStep(
failedStep, err, currentTest,
);
Expand Down

0 comments on commit 1a5ff26

Please sign in to comment.