Last active
May 23, 2018 21:50
-
-
Save efleming969/4f072f269e30da595c2ca9ed9730e79f to your computer and use it in GitHub Desktop.
acme package
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Express = require( "express" ) | |
const Expression = require( "express-session" ) | |
const app = Express() | |
app.use( Expression( { | |
secret: "secret", | |
resave: false, | |
saveUninitialized: false | |
} ) ) | |
app.use( Express.static( "public" ) ) | |
app.get( "/", function ( req, res ) { | |
res.send( "hello" ) | |
} ) | |
app.listen( 8080, function () { | |
console.log( "listening" ) | |
} ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "acme", | |
"version": "1.0.0", | |
"description": "", | |
"main": "src/index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"keywords": [], | |
"author": "", | |
"license": "ISC", | |
"dependencies": { | |
"body-parser": "^1.18.3", | |
"express": "^4.16.3", | |
"express-session": "^1.15.6" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const WebDriver = require( "webdriverio" ) | |
const driver = WebDriver.remote( { | |
browserName: "chrome", | |
path: "/", | |
port: 9515 | |
} ) | |
driver.init() | |
.url( `http://duckduckgo.com/` ) | |
.setValue( "#search_form_input_homepage", "selenium" ) | |
.click( "#search_button_homepage" ) | |
.click( "a*=Web Browser Automation" ) | |
.waitForExist( "#mainContent", 3000 ) | |
.getTitle().then( | |
title => expect( title ).toEqual( "Selenium - Web Browser Automation" ) ) | |
.end() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment