Skip to content

Commit

Permalink
removing mentioning codecept.json config file (#3410)
Browse files Browse the repository at this point in the history
* removing mentioning codecept.json config file

* changing json config to js config in UTs

* changing json config to js config in UTs

* address CR

* use node 14 as Playwright requires Node.js 14 or higher.
  • Loading branch information
kobenguyent committed Oct 5, 2022
1 parent c8c9cf9 commit 7b1d48d
Show file tree
Hide file tree
Showing 174 changed files with 968 additions and 990 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ MyPage.hasFiles('first arg', 'second arg');

// OUTPUT:
MyPage: hasFile "First arg", "Second arg"
I see file "codecept.json"
I see file "codecept.js"
I see file "codecept.po.json"
```
* Introduced official [TypeScript boilerplate](https://github.com/codeceptjs/typescript-boilerplate). Started by @Vorobeyko.
Expand Down Expand Up @@ -2168,7 +2168,7 @@ module.exports = function(done) {
```js
// inside codecept.conf.js
exports.config = {
// contents of codecept.json
// contents of codecept.js
}
```
* Added `--profile` option to pass its value to `codecept.conf.js` as `process.profile` for [dynamic configuration](http://codecept.io/configuration#dynamic-configuration).
Expand Down
4 changes: 2 additions & 2 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ MyPage.hasFiles('first arg', 'second arg');

// OUTPUT:
MyPage: hasFile "First arg", "Second arg"
I see file "codecept.json"
I see file "codecept.js"
I see file "codecept.po.json"
```
* Introduced official [TypeScript boilerplate](https://github.com/codeceptjs/typescript-boilerplate). Started by **[Vorobeyko](https://github.com/Vorobeyko)**.
Expand Down Expand Up @@ -2176,7 +2176,7 @@ module.exports = function(done) {
```js
// inside codecept.conf.js
exports.config = {
// contents of codecept.json
// contents of codecept.js
}
```
* Added `--profile` option to pass its value to `codecept.conf.js` as `process.profile` for [dynamic configuration](http://codecept.io/configuration#dynamic-configuration).
Expand Down
4 changes: 2 additions & 2 deletions docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Select config file manually (`-c` or `--config` option)

```sh
npx codeceptjs run -c my.codecept.conf.js
npx codeceptjs run --config path/to/codecept.json
npx codeceptjs run --config path/to/codecept.conf.js
```

Override config on the fly. Provide valid JSON which will be merged into current config:
Expand Down Expand Up @@ -223,7 +223,7 @@ TypeScript Definitions allows IDEs to provide autocompletion when writing tests.

```sh
npx codeceptjs def
npx codeceptjs def --config path/to/codecept.json
npx codeceptjs def --config path/to/codecept.conf.js
```

After doing that IDE should provide autocompletion for `I` object inside `Scenario` and `within` blocks.
Expand Down
2 changes: 1 addition & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ exports.config = {
dashboardPage: new DashboardPage()
}

// here goes config as it was in codecept.json
// here goes config as it was in codecept.conf.ts
// ....
};
```
Expand Down
40 changes: 20 additions & 20 deletions docs/helpers/Appium.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Launch the daemon: `appium`

## Helper configuration

This helper should be configured in codecept.json or codecept.conf.js
This helper should be configured in codecept.conf.ts or codecept.conf.js

- `app`: Application path. Local path or remote URL to an .ipa or .apk file, or a .zip containing one of these. Alias to desiredCapabilities.appPackage
- `host`: (default: 'localhost') Appium host
Expand Down Expand Up @@ -824,7 +824,7 @@ I.appendField('#myTextField', 'appended');

- `field` **([string][4] \| [object][8])** located by label|name|CSS|XPath|strict locator
- `value` **[string][4]** text value to append.
[!] returns a _promise_ which is synchronized internally by recorder
⚠️ returns a _promise_ which is synchronized internally by recorder

### checkOption

Expand All @@ -843,7 +843,7 @@ I.checkOption('agree', '//form');

- `field` **([string][4] \| [object][8])** checkbox located by label | name | CSS | XPath | strict locator.
- `context` **([string][4]? | [object][8])** (optional, `null` by default) element located by CSS | XPath | strict locator.
[!] returns a _promise_ which is synchronized internally by recorder (optional, default `null`)
⚠️ returns a _promise_ which is synchronized internally by recorder (optional, default `null`)

### click

Expand Down Expand Up @@ -873,7 +873,7 @@ I.click({css: 'nav a.login'});

- `locator` **([string][4] \| [object][8])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
- `context` **([string][4]? | [object][8] | null)** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
[!] returns a _promise_ which is synchronized internally by recorder (optional, default `null`)
⚠️ returns a _promise_ which is synchronized internally by recorder (optional, default `null`)

### dontSeeCheckboxIsChecked

Expand All @@ -888,7 +888,7 @@ I.dontSeeCheckboxIsChecked('agree'); // located by name
#### Parameters

- `field` **([string][4] \| [object][8])** located by label|name|CSS|XPath|strict locator.
[!] returns a _promise_ which is synchronized internally by recorder
⚠️ returns a _promise_ which is synchronized internally by recorder

### dontSeeElement

Expand All @@ -901,7 +901,7 @@ I.dontSeeElement('.modal'); // modal is not shown
#### Parameters

- `locator` **([string][4] \| [object][8])** located by CSS|XPath|Strict locator.
[!] returns a _promise_ which is synchronized internally by recorder
⚠️ returns a _promise_ which is synchronized internally by recorder

### dontSeeInField

Expand All @@ -917,7 +917,7 @@ I.dontSeeInField({ css: 'form input.email' }, 'user@user.com'); // field by CSS

- `field` **([string][4] \| [object][8])** located by label|name|CSS|XPath|strict locator.
- `value` **[string][4]** value to check.
[!] returns a _promise_ which is synchronized internally by recorder
⚠️ returns a _promise_ which is synchronized internally by recorder

### dontSee

Expand All @@ -933,7 +933,7 @@ I.dontSee('Login', '.nav'); // no login inside .nav element

- `text` **[string][4]** which is not present.
- `context` **([string][4] \| [object][8])?** (optional) element located by CSS|XPath|strict locator in which to perfrom search.
[!] returns a _promise_ which is synchronized internally by recorder (optional, default `null`)
⚠️ returns a _promise_ which is synchronized internally by recorder (optional, default `null`)

### fillField

Expand All @@ -955,7 +955,7 @@ I.fillField({css: 'form#login input[name=username]'}, 'John');

- `field` **([string][4] \| [object][8])** located by label|name|CSS|XPath|strict locator.
- `value` **([string][4] \| [object][8])** text value to fill.
[!] returns a _promise_ which is synchronized internally by recorder
⚠️ returns a _promise_ which is synchronized internally by recorder

### grabTextFromAll

Expand Down Expand Up @@ -1073,7 +1073,7 @@ Returns **[Promise][5]<[string][4]>** attribute value

### saveScreenshot

Saves a screenshot to ouput folder (set in codecept.json or codecept.conf.js).
Saves a screenshot to ouput folder (set in codecept.conf.ts or codecept.conf.js).
Filename is relative to output folder.

```js
Expand All @@ -1100,7 +1100,7 @@ I.scrollIntoView('#submit', { behavior: "smooth", block: "center", inline: "cent

- `locator` **([string][4] \| [object][8])** located by CSS|XPath|strict locator.
- `scrollIntoViewOptions` **ScrollIntoViewOptions** see [https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView][15].
[!] returns a _promise_ which is synchronized internally by recorderSupported only for web testing
⚠️ returns a _promise_ which is synchronized internally by recorderSupported only for web testing

### seeCheckboxIsChecked

Expand All @@ -1115,7 +1115,7 @@ I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
#### Parameters

- `field` **([string][4] \| [object][8])** located by label|name|CSS|XPath|strict locator.
[!] returns a _promise_ which is synchronized internally by recorder
⚠️ returns a _promise_ which is synchronized internally by recorder

### seeElement

Expand All @@ -1129,7 +1129,7 @@ I.seeElement('#modal');
#### Parameters

- `locator` **([string][4] \| [object][8])** located by CSS|XPath|strict locator.
[!] returns a _promise_ which is synchronized internally by recorder
⚠️ returns a _promise_ which is synchronized internally by recorder

### seeInField

Expand All @@ -1147,7 +1147,7 @@ I.seeInField('#searchform input','Search');

- `field` **([string][4] \| [object][8])** located by label|name|CSS|XPath|strict locator.
- `value` **[string][4]** value to check.
[!] returns a _promise_ which is synchronized internally by recorder
⚠️ returns a _promise_ which is synchronized internally by recorder

### see

Expand All @@ -1164,7 +1164,7 @@ I.see('Register', {css: 'form.register'}); // use strict locator

- `text` **[string][4]** expected on page.
- `context` **([string][4]? | [object][8])** (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
[!] returns a _promise_ which is synchronized internally by recorder (optional, default `null`)
⚠️ returns a _promise_ which is synchronized internally by recorder (optional, default `null`)

### selectOption

Expand All @@ -1191,7 +1191,7 @@ I.selectOption('Which OS do you use?', ['Android', 'iOS']);

- `select` **([string][4] \| [object][8])** field located by label|name|CSS|XPath|strict locator.
- `option` **([string][4] \| [Array][6]<any>)** visible text or value of option.
[!] returns a _promise_ which is synchronized internally by recorderSupported only for web testing
⚠️ returns a _promise_ which is synchronized internally by recorderSupported only for web testing

### waitForElement

Expand All @@ -1207,7 +1207,7 @@ I.waitForElement('.btn.continue', 5); // wait for 5 secs

- `locator` **([string][4] \| [object][8])** element located by CSS|XPath|strict locator.
- `sec` **[number][10]?** (optional, `1` by default) time in seconds to wait
[!] returns a _promise_ which is synchronized internally by recorder (optional, default `null`)
⚠️ returns a _promise_ which is synchronized internally by recorder (optional, default `null`)

### waitForVisible

Expand All @@ -1222,7 +1222,7 @@ I.waitForVisible('#popup');

- `locator` **([string][4] \| [object][8])** element located by CSS|XPath|strict locator.
- `sec` **[number][10]** (optional, `1` by default) time in seconds to wait
[!] returns a _promise_ which is synchronized internally by recorder (optional, default `1`)
⚠️ returns a _promise_ which is synchronized internally by recorder (optional, default `1`)

### waitForInvisible

Expand All @@ -1237,7 +1237,7 @@ I.waitForInvisible('#popup');

- `locator` **([string][4] \| [object][8])** element located by CSS|XPath|strict locator.
- `sec` **[number][10]** (optional, `1` by default) time in seconds to wait
[!] returns a _promise_ which is synchronized internally by recorder (optional, default `1`)
⚠️ returns a _promise_ which is synchronized internally by recorder (optional, default `1`)

### waitForText

Expand All @@ -1255,7 +1255,7 @@ I.waitForText('Thank you, form has been submitted', 5, '#modal');
- `text` **[string][4]** to wait for.
- `sec` **[number][10]** (optional, `1` by default) time in seconds to wait (optional, default `1`)
- `context` **([string][4] \| [object][8])?** (optional) element located by CSS|XPath|strict locator.
[!] returns a _promise_ which is synchronized internally by recorder (optional, default `null`)
⚠️ returns a _promise_ which is synchronized internally by recorder (optional, default `null`)

[1]: http://codecept.io/helpers/WebDriver/

Expand Down
2 changes: 1 addition & 1 deletion docs/helpers/FileSystem.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Can be easily used to check file structures:

```js
I.amInPath('test');
I.seeFile('codecept.json');
I.seeFile('codecept.js');
I.seeInThisFile('FileSystem');
I.dontSeeInThisFile("WebDriver");
```
Expand Down

0 comments on commit 7b1d48d

Please sign in to comment.