Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import _ from 'lodash'
import fs from 'fs'
import Steps from 'screener-runner/src/steps'
import keys from 'screener-runner/src/keys'
const DEFAULT_THEMES: ScreenerThemes = ['teams']
Steps.prototype.resetExternalLayout = function resetExternalLayout() {
return this.executeScript(`window.resetExternalLayout()`)
}
Steps.prototype.switchTheme = function switchTheme(themeName: ScreenerThemeName) {
return this.executeScript(`window.switchTheme("${themeName}")`)
}
const getScreenerSteps = (pageUrl: string, stepsModulePath: string): any[] => {
if (!fs.existsSync(`${stepsModulePath}.ts`)) {
return undefined
}
const stepsBuilder: ScreenerStepBuilder = new Steps()
const {
steps: screenerSteps,
themes = DEFAULT_THEMES,
import _ from 'lodash'
import fs from 'fs'
import Steps from 'screener-runner/src/steps'
import keys from 'screener-runner/src/keys'
const DEFAULT_THEMES: ScreenerThemes = ['teams']
Steps.prototype.resetExternalLayout = function resetExternalLayout() {
return this.executeScript(`window.resetExternalLayout()`)
}
Steps.prototype.switchTheme = function switchTheme(themeName: ScreenerThemeName) {
return this.executeScript(`window.switchTheme("${themeName}")`)
}
const getScreenerSteps = (pageUrl: string, stepsModulePath: string): any[] => {
if (!fs.existsSync(`${stepsModulePath}.ts`)) {
return undefined
}
const stepsBuilder: ScreenerStepBuilder = new Steps()
const {
steps: screenerSteps,
themes = DEFAULT_THEMES,
}: ScreenerTestsConfig = require(stepsModulePath).default
_.forEach(themes, themeName => {
stepsBuilder.switchTheme(themeName).snapshot(`Theme: ${themeName}`)