@live-change/user-frontend 0.2.22 → 0.2.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,6 +12,7 @@ Scenario('sign up with email link', async ({ I }) => {
12
12
  I.amOnPage('/sign-up')
13
13
  I.fillField('input#email', user.email)
14
14
  I.click('button[type=submit]')
15
+ pause()
15
16
 
16
17
  I.seeInCurrentUrl('/sent/')
17
18
  const url = await I.grabCurrentUrl()
package/e2e/steps_file.js CHANGED
@@ -41,11 +41,24 @@ const steps = {
41
41
  }
42
42
  },
43
43
 
44
+ async useEmailLink(email, prefix = '/link/') {
45
+ const I = this
46
+ const MessageAuthentication = await I.haveModel('messageAuthentication', 'Authentication')
47
+ const authentication =
48
+ await MessageAuthentication.indexObjectGet('byContact', ['email', email], { reverse: true, limit: 1 })
49
+ const Link = await I.haveModel('secretLink', 'Link')
50
+ let link = await Link.indexObjectGet('byAuthentication', authentication)
51
+ I.amOnPage(prefix + link.secretCode)
52
+ await I.wait(0.1)
53
+ return { authentication, link }
54
+ },
55
+
44
56
  async amLoggedIn(user) {
45
57
  const I = this
46
58
  console.log("USER", user)
47
59
  const AuthenticatedUser = await I.haveModel("user", "AuthenticatedUser")
48
60
  const session = await I.executeScript(() => window.api.client.value.session)
61
+ console.log("AUTHENTICATE SESSION", session)
49
62
  await AuthenticatedUser.create({ id: session, session, user: user.id })
50
63
  },
51
64
 
@@ -97,7 +110,7 @@ const steps = {
97
110
  await I.wait(0.1)
98
111
  },
99
112
 
100
- async useSecretLink(authentication, happyPath) {
113
+ async useSecretLink(authentication, happyPath, prefix = '') {
101
114
  const I = this
102
115
  const Link = await I.haveModel('secretLink', 'Link')
103
116
  let linkData = await Link.indexObjectGet('byAuthentication', authentication)
@@ -105,18 +118,18 @@ const steps = {
105
118
  I.assert(!!linkData, true, 'link created')
106
119
 
107
120
  if(!happyPath) {
108
- I.amOnPage('/link/[badSecret]')
121
+ I.amOnPage(prefix + '/link/[badSecret]')
109
122
  I.see('Unknown link')
110
123
  }
111
124
 
112
125
  if(!happyPath) {
113
126
  await I.wait(0.2)
114
127
  await Link.update(linkData.id, { expire: new Date() }) // expire now
115
- I.amOnPage('/link/' + linkData.secretCode)
128
+ I.amOnPage(prefix + '/link/' + linkData.secretCode)
116
129
  I.see('Link expired')
117
130
 
118
131
  I.click('Resend')
119
- I.seeInCurrentUrl('/sent/')
132
+ I.seeInCurrentUrl(prefix + '/sent/')
120
133
 
121
134
  await I.wait(0.2)
122
135
  const newLinksData = await Link.indexRangeGet('byAuthentication', authentication)
@@ -127,8 +140,8 @@ const steps = {
127
140
  I.assert(oldLinkData.id != linkData.id, true, 'link is different from previous link')
128
141
  }
129
142
 
130
- console.log("LINK RIGHT", '/link/' + linkData.secretCode)
131
- I.amOnPage('/link/'+linkData.secretCode)
143
+ console.log("LINK RIGHT", prefix + '/link/' + linkData.secretCode)
144
+ I.amOnPage(prefix + '/link/'+linkData.secretCode)
132
145
  await I.wait(0.1)
133
146
 
134
147
  return linkData
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/user-frontend",
3
- "version": "0.2.22",
3
+ "version": "0.2.23",
4
4
  "scripts": {
5
5
  "memDev": "lcli memDev --enableSessions --initScript ./init.js --dbAccess",
6
6
  "localDevInit": "rm tmp.db; lcli localDev --enableSessions --initScript ./init.js",
@@ -20,32 +20,32 @@
20
20
  "debug": "node --inspect-brk server"
21
21
  },
22
22
  "dependencies": {
23
- "@live-change/cli": "0.7.6",
23
+ "@live-change/cli": "0.7.8",
24
24
  "@live-change/dao": "0.5.8",
25
25
  "@live-change/dao-vue3": "0.5.8",
26
26
  "@live-change/dao-websocket": "0.5.8",
27
- "@live-change/email-service": "0.3.8",
28
- "@live-change/framework": "0.7.6",
29
- "@live-change/identicon-service": "0.3.8",
30
- "@live-change/image-frontend": "^0.2.22",
31
- "@live-change/message-authentication-service": "0.3.8",
32
- "@live-change/notification-service": "0.3.8",
33
- "@live-change/password-authentication-service": "0.3.8",
27
+ "@live-change/email-service": "0.3.10",
28
+ "@live-change/framework": "0.7.8",
29
+ "@live-change/identicon-service": "0.3.10",
30
+ "@live-change/image-frontend": "^0.2.23",
31
+ "@live-change/message-authentication-service": "0.3.10",
32
+ "@live-change/notification-service": "0.3.10",
33
+ "@live-change/password-authentication-service": "0.3.10",
34
34
  "@live-change/pattern": "0.2.1",
35
- "@live-change/secret-code-service": "0.3.8",
36
- "@live-change/secret-link-service": "0.3.8",
37
- "@live-change/security-frontend": "^0.2.22",
38
- "@live-change/security-service": "0.3.8",
39
- "@live-change/session-service": "0.3.8",
40
- "@live-change/timer-service": "0.3.8",
41
- "@live-change/upload-service": "0.3.8",
42
- "@live-change/user-identification-service": "0.3.8",
43
- "@live-change/user-service": "0.3.8",
35
+ "@live-change/secret-code-service": "0.3.10",
36
+ "@live-change/secret-link-service": "0.3.10",
37
+ "@live-change/security-frontend": "^0.2.23",
38
+ "@live-change/security-service": "0.3.10",
39
+ "@live-change/session-service": "0.3.10",
40
+ "@live-change/timer-service": "0.3.10",
41
+ "@live-change/upload-service": "0.3.10",
42
+ "@live-change/user-identification-service": "0.3.10",
43
+ "@live-change/user-service": "0.3.10",
44
44
  "@live-change/vue3-components": "0.2.16",
45
45
  "@live-change/vue3-ssr": "0.2.16",
46
46
  "@vueuse/core": "^9.1.0",
47
47
  "codeceptjs-assert": "^0.0.5",
48
- "codeceptjs-video-helper": "^0.1.3",
48
+ "codeceptjs-video-helper": "0.1.3",
49
49
  "compression": "^1.7.4",
50
50
  "cross-env": "^7.0.3",
51
51
  "get-port-sync": "1.0.1",
@@ -65,7 +65,7 @@
65
65
  "wtfnode": "^0.9.1"
66
66
  },
67
67
  "devDependencies": {
68
- "@live-change/codeceptjs-helper": "0.7.6",
68
+ "@live-change/codeceptjs-helper": "0.7.8",
69
69
  "@wdio/selenium-standalone-service": "^7.20.8",
70
70
  "codeceptjs": "^3.3.4",
71
71
  "generate-password": "1.7.0",
@@ -77,5 +77,5 @@
77
77
  "author": "",
78
78
  "license": "BSD-3-Clause",
79
79
  "description": "",
80
- "gitHead": "01a04dd2c01a8f2f899673466b6d4c45b475f4a4"
80
+ "gitHead": "1fd24d66ea25432bff4a9a9cb8435a489bfaa602"
81
81
  }