Skip to content
Permalink
Browse files
added snapshot testing and updated dependencies
  • Loading branch information
sellers3 committed Nov 27, 2019
1 parent 0b45c98 commit dbc2d3a0d79ee07e3fb2f139ab4df1c498d5a3d3
Show file tree
Hide file tree
Showing 12 changed files with 38 additions and 4 deletions.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -80,6 +80,9 @@ describe('menu', () => {
title = await page.title()
expect(title).toBe('Log In')

const image = await page.screenshot()
expect(image).toMatchImageSnapshot()

done()
})

@@ -139,7 +142,8 @@ describe('menu', () => {
console.log(newItemName)
expect(newItemName).toStrictEqual(['Bolognese Spaghetti'])


const image = await page.screenshot()
expect(image).toMatchImageSnapshot()
done()
})

@@ -198,6 +202,8 @@ describe('menu', () => {
})

expect(quantity).toStrictEqual(['0'])
const image = await page.screenshot()
expect(image).toMatchImageSnapshot()

done()
})
@@ -264,6 +270,9 @@ describe('menu', () => {

expect(ID).toStrictEqual(['1'])

const image = await page.screenshot()
expect(image).toMatchImageSnapshot()

done()
})
})
@@ -40,6 +40,10 @@ describe('login test cases', () => {

const title = await page.title()
expect(title).toBe('ERROR')

const image = await page.screenshot()
expect(image).toMatchImageSnapshot()

done()
})

@@ -54,6 +58,10 @@ describe('login test cases', () => {

const title = await page.title()
expect(title).toBe('ERROR')

const image = await page.screenshot()
expect(image).toMatchImageSnapshot()

done()
})
})
@@ -73,6 +81,10 @@ describe('register', () => {

const title = await page.title()
expect(title).toBe('ERROR')

const image = await page.screenshot()
expect(image).toMatchImageSnapshot()

done()
})

@@ -89,6 +101,10 @@ describe('register', () => {

const title = await page.title()
expect(title).toBe('ERROR')

const image = await page.screenshot()
expect(image).toMatchImageSnapshot()

done()
})

@@ -113,6 +129,10 @@ describe('register', () => {
await page.click('input[type=submit]')
title = await page.title()
expect(title).toBe('Main Menu')

const image = await page.screenshot()
expect(image).toMatchImageSnapshot()

done()
})
})
@@ -7,12 +7,13 @@
"node": "12.x"
},
"scripts": {
"coverage": "./node_modules/.bin/jest --coverage 'unit tests/' && ./node_modules/.bin/istanbul check-coverage --statement 100 --branch 100 --function 100 --line 100",
"dependency": "./node_modules/.bin/dependency-check -i bcrypt --unused --no-dev . && node_modules/.bin/dependency-check -i modules --missing .",
"start": "node index.js",
"acceptance": "./test.sh",
"jsdoc": "node_modules/.bin/jsdoc -c jsdoc.conf",
"linter": "node_modules/.bin/eslint .",
"test": "jest --coverage --detectOpenHandles unit tests/user.spec.js",
"unit": "node_modules/.bin/jest --coverage --runInBand tests/unit/"
"test": "./node_modules/.bin/jest --coverage",
"acceptance": "acceptanceTests/scripts/test.sh"
},
"jest": {
"projects": [
@@ -46,6 +47,10 @@
"sqlite-async": "^1.0.12"
},
"devDependencies": {
"coverage": "^0.4.1",
"dependency": "0.0.1",
"dependency-check": "^4.1.0",
"istanbul": "^0.4.5",
"0x": "^4.9.1",
"eslint": "^5.15.2",
"handlebars-validate": "^0.1.2",

0 comments on commit dbc2d3a

Please sign in to comment.