# Cypress MetaMask plugin

Enable interactions with the [MetaMask](https://metamask.io/) extension in Cypress tests.

**Acknowledgments**:
 This plugin was heavily inspired by [CraftAcademyLabs/cypress-metamask](https://github.com/CraftAcademyLabs/cypress-metamask) and [Synpress](https://github.com/Synthetixio/synpress).

## Installation

Install the npm package:

```shell
npm install -D @deepsquare/cypress-metamask
# or
yarn add -D @deepsquare/cypress-metamask
# or
pnpm install -D @deepsquare/cypress-metamask
```

*NB: if you are using another package manager, adapt the command accordingly*.

In your plugin entry file (`cypress/plugins/index.js`):

```javascript
module.exports = (on, config) => {
 require('@deepsquare/cypress-metamask/plugin')
}
```

## Limitations

- Firefox is not supported
- Headless mode (which is the default of `cypress run`) is not supported because extensions cannot be installed in
  headless mode
