From 178513a24ac0293696a29b2bb21e102ca1c23a7a Mon Sep 17 00:00:00 2001 From: Jalal Fathi Date: Thu, 25 Apr 2019 18:20:26 +0200 Subject: [PATCH] Update README.md --- README.md | 34 ++++------------------------------ 1 file changed, 4 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index b7d2e0b..123c06f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -### Installation +# Cypress Daywalker + +## Installation Add the plugin to `devDependencies` ```bash @@ -10,35 +12,7 @@ At the top of **`cypress/support/commands.js`**: import 'cypress-daywalker/commands' ``` -**Include the daywalker script:** - -either via a) At the top of your entrypoint e.g. **`index.html`** add following script tag -```html - -``` -or via b) Dynamically add the daywalker script before each test - -```javascript -context('Default', () => { - before(() => { - - cy.on('window:before:load', (w) => { - const script = w.document.createElement('script'); - script.src = '/node_modules/cypress-daywalker/cypress-daywalker.js'; - w.document.querySelector('head').appendChild(script); - }); - - cy.visit('http://localhost:3000/'); - }); - - it('input gets filled', () => { - ... - }); -}); - -``` - -### Usage +## Usage [Example](https://github.com/JaySunSyn/cypress-daywalker/blob/master/example/cypress/integration/example.spec.js) Some custom commands: