Socialify

Folder ..

Viewing password.spec.js
38 lines (32 loc) • 1.0 KB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
const { beforeHelper, afterHelper } = require('./../../helper')

describe('Authentication with master password', function() {
  this.timeout(10000)

  describe('user enters password', () => {
    beforeEach(() => beforeHelper({ storage: 'empty' }))

    afterEach(() => afterHelper())

    it('shows invalid password error', () => {
      return expect(
        app.client
          .setValue('input[type=password]', 'word')
          .keys('\uE007')
          .getText('.error-message')
      ).to.eventually.equal('Incorrect Master Password')
    })

    it('does not show touch id icon', () => {
      return expect(
        app.client
          .setValue('input[type=password]', 'word')
          .keys('\uE007')
          .isExisting('svg.touchid')
      ).to.eventually.equal(false)
    })

    it('logs user in on correct password', () => {
      return expect(
        app.client
          .setValue('input[type=password]', 'password')
          .keys('\uE007')
          .isExisting('.sync-indicator')
      ).to.eventually.equal(true)
    })
  })
})