Commit fba0c454 authored by Ana Ellis's avatar Ana Ellis

invalid credentials test

parent cbf417de
Pipeline #5910 passed with stages
in 3 minutes and 38 seconds
......@@ -3,6 +3,10 @@
"es6": true,
"browser": true
},
"globals": {
"fixture": true,
"test": true
},
"extends": [
"pubsweet"
],
......
......@@ -18,6 +18,7 @@
"@pubsweet/ui": "3.3.0",
"babel-core": "^6.26.0",
"config": "^1.26.2",
"faker": "^4.1.0",
"font-awesome": "^4.7.0",
"fs-extra": "^4.0.2",
"history": "^4.7.2",
......@@ -96,7 +97,7 @@
"webpack-hot-middleware": "^2.20.0"
},
"scripts": {
"test": "NODE_ENV=test testcafe chrome 'test/**/*.test.js'",
"test": "testcafe chrome 'test/**/*.test.js'",
"clean": "rm -rf node_modules",
"lint": "npm run lint:js && npm run lint:style",
"lint:js": "eslint .",
......
......@@ -8,20 +8,16 @@ fixture('Guest user')
await setup()
})
// test('Signup journey', async t => {
// const user = {
// username: faker.internet.domainWord(),
// email: faker.internet.exampleEmail(),
// password: faker.internet.password(),
// }
test('Signup journey', async t => {
const user = {
username: faker.internet.domainWord(),
email: faker.internet.exampleEmail(),
password: faker.internet.password(),
}
// // cannot log in
// await login
// .doLogin(user.username, user.password)
// .expect(login.alert.innerText)
// .contains('Unauthorized')
// })
test('testing...', async t => {
await t.expect(true).eql(true)
// cannot log in
await login
.doLogin(user.username, user.password)
.expect(login.alert.innerText)
.contains('Unauthorized')
})
......@@ -7,7 +7,7 @@ let server
export async function startServer() {
if (!server) {
//increase timeout to wait for webpack compilation
// increase timeout to wait for webpack compilation
DestinationRequest.TIMEOUT = 60 * 1000
server = await start()
}
......
......@@ -13,7 +13,6 @@ const login = {
doLogin: (username, password) =>
t
.navigateTo(login.url)
.debug()
.typeText(login.username, username)
.typeText(login.password, password)
.click(login.submit),
......
process.env.NODE_ENV = 'test'
process.env.BABEL_ENV = 'test'
const config = require('config')
const path = require('path')
const webpack = require('webpack')
......
......@@ -3490,6 +3490,10 @@ eyes@0.1.x:
version "0.1.8"
resolved "https://registry.yarnpkg.com/eyes/-/eyes-0.1.8.tgz#62cf120234c683785d902348a800ef3e0cc20bc0"
faker@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/faker/-/faker-4.1.0.tgz#1e45bbbecc6774b3c195fad2835109c6d748cc3f"
fast-deep-equal@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614"
......@@ -6955,7 +6959,7 @@ prompt@^1.0.0:
utile "0.3.x"
winston "2.1.x"
"prompt@github:flatiron/prompt#1c95d1d8d333b5fbc13fa5f0619f3dcf0d514f87":
prompt@flatiron/prompt#1c95d1d8d333b5fbc13fa5f0619f3dcf0d514f87:
version "1.0.0"
resolved "https://codeload.github.com/flatiron/prompt/tar.gz/1c95d1d8d333b5fbc13fa5f0619f3dcf0d514f87"
dependencies:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment