From 7dc2d6e7a4cd6163911471f91866d2c2f1ee4397 Mon Sep 17 00:00:00 2001 From: kgajjar Date: Wed, 11 Dec 2024 10:44:14 -0500 Subject: [PATCH 1/2] feat: mask sensitive data --- .codegenie/customizations/test.md | 67 +++++++++++++++++++++++++++++++ docs/configuration.md | 1 + 2 files changed, 68 insertions(+) create mode 100644 .codegenie/customizations/test.md diff --git a/.codegenie/customizations/test.md b/.codegenie/customizations/test.md new file mode 100644 index 000000000..609ada24c --- /dev/null +++ b/.codegenie/customizations/test.md @@ -0,0 +1,67 @@ +# CodeceptJS Testing Cheat Sheet + +## Testing Libraries and Frameworks +- Jest +- Chai +- Sinon +- Mocha + +## Mocking and Stubbing +- Sinon is used for mocking and stubbing +- `sinon.spy()` for creating spies +- `sinon.mock()` for creating mocks +- `sinon.stub()` for creating stubs + +## Assertions +- Chai assertions are used (`expect` syntax) +- Jest assertions are also used in some tests + +## Test Structure +- `describe()` for grouping tests +- `it()` for individual test cases +- `before()`, `beforeEach()`, `after()`, `afterEach()` for setup and teardown + +## CodeceptJS Specific +- `Feature()` for defining features +- `Scenario()` for defining scenarios +- `Given()`, `When()`, `Then()` for BDD-style steps +- `I` object for actor actions + +## Helpers and Plugins +- Custom helpers can be created and used +- Plugins like `tryTo` and `subtitles` are available + +## Configuration +- `codecept.conf.js` for main configuration +- Config can be manipulated programmatically using `config` module + +## Events +- `event` module for handling test events +- Custom event listeners can be added + +## Recorder +- `recorder` module for managing test execution flow + +## Locators +- Custom locator strategies can be defined +- XPath and CSS selectors are supported + +## Data Tables +- Gherkin-style data tables are supported in scenarios + +## Retries +- `I.retry()` for retrying failed steps + +## AI Assistant +- `AiAssistant` module for AI-powered testing assistance + +## File Operations +- `fs` and `path` modules are used for file operations + +## HTML Processing +- Functions for minifying and processing HTML for tests + +## Artifacts +- Video recording and subtitle generation for failed tests + +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. \ No newline at end of file diff --git a/docs/configuration.md b/docs/configuration.md index 2d07bd58a..363de25b5 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -29,6 +29,7 @@ After running `codeceptjs init` it should be saved in test root. | `tests` | `string` | Pattern to locate CodeceptJS tests. Allows to enter glob pattern or an Array of patterns to match tests / test file names. For tests in JavaScript: ```tests: 'tests/**.test.js' ``` For tests in TypeScript: ```tests: 'tests/**.test.ts' ``` | | `timeout?` | `number` | Set default tests timeout in seconds. Tests will be killed on no response after timeout. ```timeout: 20, ``` | | `translation?` | `string` | Enable [localized test commands](https://codecept.io/translation/) | +| `maskSensitiveData?` | `boolean` | Enable to mask Sensitive Data in console. | ## Require From 7ff36da369d4b26da8333ff1098f359c32163f03 Mon Sep 17 00:00:00 2001 From: kgajjar Date: Wed, 11 Dec 2024 10:45:41 -0500 Subject: [PATCH 2/2] feat: mask sensitive data --- .codegenie/customizations/test.md | 67 ------------------------------- 1 file changed, 67 deletions(-) delete mode 100644 .codegenie/customizations/test.md diff --git a/.codegenie/customizations/test.md b/.codegenie/customizations/test.md deleted file mode 100644 index 609ada24c..000000000 --- a/.codegenie/customizations/test.md +++ /dev/null @@ -1,67 +0,0 @@ -# CodeceptJS Testing Cheat Sheet - -## Testing Libraries and Frameworks -- Jest -- Chai -- Sinon -- Mocha - -## Mocking and Stubbing -- Sinon is used for mocking and stubbing -- `sinon.spy()` for creating spies -- `sinon.mock()` for creating mocks -- `sinon.stub()` for creating stubs - -## Assertions -- Chai assertions are used (`expect` syntax) -- Jest assertions are also used in some tests - -## Test Structure -- `describe()` for grouping tests -- `it()` for individual test cases -- `before()`, `beforeEach()`, `after()`, `afterEach()` for setup and teardown - -## CodeceptJS Specific -- `Feature()` for defining features -- `Scenario()` for defining scenarios -- `Given()`, `When()`, `Then()` for BDD-style steps -- `I` object for actor actions - -## Helpers and Plugins -- Custom helpers can be created and used -- Plugins like `tryTo` and `subtitles` are available - -## Configuration -- `codecept.conf.js` for main configuration -- Config can be manipulated programmatically using `config` module - -## Events -- `event` module for handling test events -- Custom event listeners can be added - -## Recorder -- `recorder` module for managing test execution flow - -## Locators -- Custom locator strategies can be defined -- XPath and CSS selectors are supported - -## Data Tables -- Gherkin-style data tables are supported in scenarios - -## Retries -- `I.retry()` for retrying failed steps - -## AI Assistant -- `AiAssistant` module for AI-powered testing assistance - -## File Operations -- `fs` and `path` modules are used for file operations - -## HTML Processing -- Functions for minifying and processing HTML for tests - -## Artifacts -- Video recording and subtitle generation for failed tests - -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. \ No newline at end of file