Skip to content

Commit 7dc2d6e

Browse files
committed
feat: mask sensitive data
1 parent 5abda10 commit 7dc2d6e

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed

.codegenie/customizations/test.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# CodeceptJS Testing Cheat Sheet
2+
3+
## Testing Libraries and Frameworks
4+
- Jest
5+
- Chai
6+
- Sinon
7+
- Mocha
8+
9+
## Mocking and Stubbing
10+
- Sinon is used for mocking and stubbing
11+
- `sinon.spy()` for creating spies
12+
- `sinon.mock()` for creating mocks
13+
- `sinon.stub()` for creating stubs
14+
15+
## Assertions
16+
- Chai assertions are used (`expect` syntax)
17+
- Jest assertions are also used in some tests
18+
19+
## Test Structure
20+
- `describe()` for grouping tests
21+
- `it()` for individual test cases
22+
- `before()`, `beforeEach()`, `after()`, `afterEach()` for setup and teardown
23+
24+
## CodeceptJS Specific
25+
- `Feature()` for defining features
26+
- `Scenario()` for defining scenarios
27+
- `Given()`, `When()`, `Then()` for BDD-style steps
28+
- `I` object for actor actions
29+
30+
## Helpers and Plugins
31+
- Custom helpers can be created and used
32+
- Plugins like `tryTo` and `subtitles` are available
33+
34+
## Configuration
35+
- `codecept.conf.js` for main configuration
36+
- Config can be manipulated programmatically using `config` module
37+
38+
## Events
39+
- `event` module for handling test events
40+
- Custom event listeners can be added
41+
42+
## Recorder
43+
- `recorder` module for managing test execution flow
44+
45+
## Locators
46+
- Custom locator strategies can be defined
47+
- XPath and CSS selectors are supported
48+
49+
## Data Tables
50+
- Gherkin-style data tables are supported in scenarios
51+
52+
## Retries
53+
- `I.retry()` for retrying failed steps
54+
55+
## AI Assistant
56+
- `AiAssistant` module for AI-powered testing assistance
57+
58+
## File Operations
59+
- `fs` and `path` modules are used for file operations
60+
61+
## HTML Processing
62+
- Functions for minifying and processing HTML for tests
63+
64+
## Artifacts
65+
- Video recording and subtitle generation for failed tests
66+
67+
This cheat sheet covers the main testing practices and tools used in the CodeceptJS codebase. It includes information on testing frameworks, mocking, assertions, test structure, CodeceptJS-specific features, and various utilities and modules used throughout the tests.

docs/configuration.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ After running `codeceptjs init` it should be saved in test root.
2929
| `tests` | `string` | Pattern to locate CodeceptJS tests. Allows to enter glob pattern or an Array<string> of patterns to match tests / test file names. For tests in JavaScript: ```tests: 'tests/**.test.js' ``` For tests in TypeScript: ```tests: 'tests/**.test.ts' ``` |
3030
| `timeout?` | `number` | Set default tests timeout in seconds. Tests will be killed on no response after timeout. ```timeout: 20, ``` |
3131
| `translation?` | `string` | Enable [localized test commands](https://codecept.io/translation/) |
32+
| `maskSensitiveData?` | `boolean` | Enable to mask Sensitive Data in console. |
3233

3334

3435
## Require

0 commit comments

Comments
 (0)