Skip to content

Commit

Permalink
Merge pull request #111 from filiphric/107-cypress-config-env-variabl…
Browse files Browse the repository at this point in the history
…e-when-defining-get-property-var_name-does-not-exist-on-type-partialpluginenvoptions

107 cypress config env variable when defining get property var name does not exist on type partialpluginenvoptions
  • Loading branch information
filiphric authored Feb 3, 2023
2 parents cc919cc + b3f2080 commit 8da620c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 11 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [2.10.2](https://github.com/filiphric/cypress-plugin-api/compare/v2.10.1...v2.10.2) (2023-02-03)


### Bug Fixes

* types for Cypress.env() ([f6d5496](https://github.com/filiphric/cypress-plugin-api/commits/f6d5496277982800b8286926578373c8dd3e5006))

### [2.10.1](https://github.com/filiphric/cypress-plugin-api/compare/v2.10.0...v2.10.1) (2023-02-03)


Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"author": "Filip Hric (https://filiphric.com/)",
"license": "ISC",
"name": "cypress-plugin-api",
"version": "2.10.1",
"version": "2.10.2",
"keywords": [
"cypress",
"api",
Expand Down
16 changes: 8 additions & 8 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ declare global {
*
* @see https://on.cypress.io/env
*/
env(): Partial<PluginEnvOptions> & object;
env(): PluginEnvOptions;
/**
* Returns specific environment variable or undefined
* @see https://on.cypress.io/env
Expand All @@ -87,22 +87,22 @@ declare global {
* @example
* Cypress.env({ host: "http://server.dev.local", foo: "foo" })
*/
env(object: Partial<PluginEnvOptions>): void;
env(object: PluginEnvOptions): void;
}
interface TestConfigOverrides {
env?: Partial<PluginEnvOptions>
env?: PluginEnvOptions
}
}
interface Window {
props: Record<string, RequestProps[]>
}
}

export interface PluginEnvOptions {
snapshotOnly: boolean
hideCredentials: boolean
hideCredentialsOptions: HideCredentialsOptions,
requestMode: boolean
export interface PluginEnvOptions extends Cypress.ObjectLike {
snapshotOnly?: boolean
hideCredentials?: boolean
hideCredentialsOptions?: HideCredentialsOptions,
requestMode?: boolean
}

export interface HideCredentialsOptions {
Expand Down

0 comments on commit 8da620c

Please sign in to comment.