Skip to content

Instantly share code, notes, and snippets.

@BorisOsipov
Created January 14, 2019 13:29
Show Gist options
  • Save BorisOsipov/2755ee4e121d2628f71b6f5750405225 to your computer and use it in GitHub Desktop.
Save BorisOsipov/2755ee4e121d2628f71b6f5750405225 to your computer and use it in GitHub Desktop.
Index: src/step_definitions/test.steps.js
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/step_definitions/test.steps.js (revision 1b2014275b29e92e98659bb5ddf341ad4dd9149f)
+++ src/step_definitions/test.steps.js (revision 529ffdd44b9987e4374700d4377d52e1d60b0112)
@@ -1,4 +1,4 @@
-const { When, Then, Given } = require('cucumber')
+const { When, Then, Given, Before } = require('cucumber')
const expect = require('expect')
Given(/^I'm on bbc page$/, async function () {
@@ -25,3 +25,7 @@
const isVisible = await browser.isVisible('#bbcprivacy')
expect(isVisible).toBe(true)
})
+
+Before(function () {
+ browser.reload()
+});
Index: wdio.conf.js
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- wdio.conf.js (revision 1b2014275b29e92e98659bb5ddf341ad4dd9149f)
+++ wdio.conf.js (revision 529ffdd44b9987e4374700d4377d52e1d60b0112)
@@ -55,10 +53,7 @@
profile: [],
strict: false,
ignoreUndefinedDefinitions: false
- },
- beforeScenario: function () {
- browser.reload()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment