@smileid/web-components 1.4.6 → 1.4.7

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.
@@ -194,7 +194,10 @@ class SelfieCaptureScreens extends HTMLElement {
194
194
  }
195
195
 
196
196
  get hideBack() {
197
- return this.hasAttribute('hide-back-to-host') ? 'hide-back' : '';
197
+ return this.hasAttribute('hide-back-to-host') ||
198
+ this.hasAttribute('hide-back')
199
+ ? 'hide-back'
200
+ : '';
198
201
  }
199
202
 
200
203
  get disableImageTests() {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smileid/signature-pad",
3
- "version": "1.4.6",
3
+ "version": "1.4.7",
4
4
  "private": "true",
5
5
  "exports": {
6
6
  ".": "./index.js"
@@ -224,7 +224,10 @@ class SmartCameraWeb extends HTMLElement {
224
224
  }
225
225
 
226
226
  get hideBackToHost() {
227
- return this.hasAttribute('hide-back-to-host') ? 'hide-back-to-host' : '';
227
+ return this.hasAttribute('hide-back-to-host') ||
228
+ this.hasAttribute('hide-back')
229
+ ? 'hide-back'
230
+ : '';
228
231
  }
229
232
 
230
233
  get allowAgentMode() {
@@ -0,0 +1,61 @@
1
+ describe('SmartCameraWeb', () => {
2
+ beforeEach(() => {
3
+ cy.visit('/capture-back-of-id-navigation');
4
+ });
5
+
6
+ it('shows attribution by default', () => {
7
+ cy.get('smart-camera-web')
8
+ .shadow()
9
+ .find('selfie-capture-instructions')
10
+ .should('be.visible');
11
+ cy.get('smart-camera-web')
12
+ .shadow()
13
+ .find('selfie-capture-instructions')
14
+ .shadow()
15
+ .should('contain.text', "Next, we'll take a quick selfie");
16
+ cy.get('smart-camera-web')
17
+ .shadow()
18
+ .find('selfie-capture-instructions')
19
+ .shadow()
20
+ .find('smileid-navigation')
21
+ .shadow()
22
+ .find('.back-button')
23
+ .should('be.visible');
24
+ cy.get('smart-camera-web')
25
+ .shadow()
26
+ .find('selfie-capture-instructions')
27
+ .shadow()
28
+ .find('#cancel')
29
+ .should('be.visible');
30
+ });
31
+
32
+ it('hides back exit and cancel button when `hide-back-to-host` attribute is passed', () => {
33
+ cy.get('smart-camera-web')
34
+ .invoke('attr', 'hide-back-to-host', 'true')
35
+ .should('have.attr', 'hide-back-to-host', 'true');
36
+
37
+ cy.get('smart-camera-web')
38
+ .shadow()
39
+ .find('selfie-capture-instructions')
40
+ .should('be.visible');
41
+ cy.get('smart-camera-web')
42
+ .shadow()
43
+ .find('selfie-capture-instructions')
44
+ .shadow()
45
+ .should('contain.text', "Next, we'll take a quick selfie");
46
+ cy.get('smart-camera-web')
47
+ .shadow()
48
+ .find('selfie-capture-instructions')
49
+ .shadow()
50
+ .find('smileid-navigation')
51
+ .shadow()
52
+ .get('.back-button')
53
+ .should('not.exist');
54
+ cy.get('smart-camera-web')
55
+ .shadow()
56
+ .find('selfie-capture-instructions')
57
+ .shadow()
58
+ .get('#cancel')
59
+ .should('not.exist');
60
+ });
61
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smileid/web-components",
3
- "version": "1.4.6",
3
+ "version": "1.4.7",
4
4
  "main": "index.js",
5
5
  "exports": {
6
6
  ".": "./index.js",