@smileid/web-components 1.5.1 → 2.0.0
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.
- package/package.json +58 -48
- package/{components → src/components}/combobox/src/Combobox.js +4 -1
- package/{components → src/components}/document/src/DocumentCaptureScreens.js +409 -409
- package/{components → src/components}/document/src/document-capture/DocumentCapture.js +760 -760
- package/{components → src/components}/end-user-consent/src/EndUserConsent.js +4 -1
- package/{components → src/components}/navigation/src/Navigation.js +4 -1
- package/{components → src/components}/selfie/src/SelfieCaptureScreens.js +282 -290
- package/{components → src/components}/selfie/src/selfie-capture/SelfieCapture.js +1010 -1011
- package/{components → src/components}/selfie/src/selfie-capture/SelfieCapture.stories.js +36 -36
- package/{components → src/components}/signature-pad/package.json +30 -30
- package/{components → src/components}/signature-pad/src/SignaturePad.js +4 -1
- package/{components → src/components}/smart-camera-web/src/SmartCameraWeb.js +1 -1
- package/{components → src/components}/totp-consent/src/TotpConsent.js +1 -1
- package/.eslintrc.cjs +0 -72
- package/cypress/e2e/smart-camera-web-agent-mode.cy.js +0 -144
- package/cypress/e2e/smart-camera-web-attribution.cy.js +0 -249
- package/cypress/e2e/smart-camera-web-back-press.cy.js +0 -481
- package/cypress/e2e/smart-camera-web-complete-flow.cy.js +0 -221
- package/cypress/e2e/smart-camera-web-hide-back-to-host.cy.js +0 -61
- package/cypress/e2e/smart-camera-web-hide-instructions.cy.js +0 -334
- package/cypress/e2e/smart-camera-web.cy.js +0 -309
- package/cypress/fixtures/example.json +0 -5
- package/cypress/pages/capture-back-of-id-hide-attribution.html +0 -44
- package/cypress/pages/capture-back-of-id-navigation.html +0 -72
- package/cypress/pages/smart-camera-web-agent-mode.html +0 -36
- package/cypress/pages/smart-camera-web-complete-flow.html +0 -42
- package/cypress/pages/smart-camera-web-hide-instructions.html +0 -38
- package/cypress/pages/smart-camera-web.html +0 -38
- package/cypress/support/commands.js +0 -144
- package/cypress/support/e2e.js +0 -20
- package/cypress.config.js +0 -11
- package/esbuild.js +0 -119
- /package/{components → src/components}/README.md +0 -0
- /package/{components → src/components}/attribution/PoweredBySmileId.js +0 -0
- /package/{components → src/components}/camera-permission/CameraPermission.js +0 -0
- /package/{components → src/components}/camera-permission/CameraPermission.stories.js +0 -0
- /package/{components → src/components}/combobox/src/index.js +0 -0
- /package/{components → src/components}/document/src/DocumentCaptureScreens.stories.js +0 -0
- /package/{components → src/components}/document/src/README.md +0 -0
- /package/{components → src/components}/document/src/document-capture/DocumentCapture.stories.js +0 -0
- /package/{components → src/components}/document/src/document-capture/README.md +0 -0
- /package/{components → src/components}/document/src/document-capture/index.js +0 -0
- /package/{components → src/components}/document/src/document-capture-instructions/DocumentCaptureInstructions.js +0 -0
- /package/{components → src/components}/document/src/document-capture-instructions/DocumentCaptureInstructions.stories.js +0 -0
- /package/{components → src/components}/document/src/document-capture-instructions/README.md +0 -0
- /package/{components → src/components}/document/src/document-capture-instructions/index.js +0 -0
- /package/{components → src/components}/document/src/document-capture-review/DocumentCaptureReview.js +0 -0
- /package/{components → src/components}/document/src/document-capture-review/DocumentCaptureReview.stories.js +0 -0
- /package/{components → src/components}/document/src/document-capture-review/README.md +0 -0
- /package/{components → src/components}/document/src/document-capture-review/index.js +0 -0
- /package/{components → src/components}/document/src/index.js +0 -0
- /package/{components → src/components}/end-user-consent/src/EndUserConsent.stories.js +0 -0
- /package/{components → src/components}/end-user-consent/src/index.js +0 -0
- /package/{components → src/components}/navigation/src/Navigation.stories.js +0 -0
- /package/{components → src/components}/navigation/src/index.js +0 -0
- /package/{components → src/components}/selfie/README.md +0 -0
- /package/{components → src/components}/selfie/src/SelfieCaptureScreens.stories.js +0 -0
- /package/{components → src/components}/selfie/src/index.js +0 -0
- /package/{components → src/components}/selfie/src/selfie-capture/index.js +0 -0
- /package/{components → src/components}/selfie/src/selfie-capture-instructions/SelfieCaptureInstructions.js +0 -0
- /package/{components → src/components}/selfie/src/selfie-capture-instructions/SelfieCaptureInstructions.stories.js +0 -0
- /package/{components → src/components}/selfie/src/selfie-capture-instructions/index.js +0 -0
- /package/{components → src/components}/selfie/src/selfie-capture-review/SelfieCaptureReview.js +0 -0
- /package/{components → src/components}/selfie/src/selfie-capture-review/SelfieCaptureReview.stories.js +0 -0
- /package/{components → src/components}/selfie/src/selfie-capture-review/index.js +0 -0
- /package/{components → src/components}/signature-pad/package-lock.json +0 -0
- /package/{components → src/components}/signature-pad/src/SignaturePad.stories.js +0 -0
- /package/{components → src/components}/signature-pad/src/index.js +0 -0
- /package/{components → src/components}/smart-camera-web/src/README.md +0 -0
- /package/{components → src/components}/smart-camera-web/src/SmartCameraWeb.stories.js +0 -0
- /package/{components → src/components}/totp-consent/src/index.js +0 -0
- /package/{domain → src/domain}/camera/src/README.md +0 -0
- /package/{domain → src/domain}/camera/src/SmartCamera.js +0 -0
- /package/{domain → src/domain}/constants/src/Constants.js +0 -0
- /package/{domain → src/domain}/file-upload/README.md +0 -0
- /package/{domain → src/domain}/file-upload/src/SmartFileUpload.js +0 -0
- /package/{index.js → src/index.js} +0 -0
- /package/{styles → src/styles}/README.md +0 -0
- /package/{styles → src/styles}/src/styles.js +0 -0
- /package/{styles → src/styles}/src/typography.js +0 -0
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import SmartCamera from '../../../../domain/camera/src/SmartCamera';
|
|
2
|
-
import './SelfieCapture';
|
|
3
|
-
|
|
4
|
-
const meta = {
|
|
5
|
-
argTypes: {
|
|
6
|
-
'theme-color': { control: 'color' },
|
|
7
|
-
},
|
|
8
|
-
component: 'selfie-capture',
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export default meta;
|
|
12
|
-
|
|
13
|
-
export const SelfieCapture = {
|
|
14
|
-
args: {
|
|
15
|
-
'theme-color': '#001096',
|
|
16
|
-
},
|
|
17
|
-
loaders: [
|
|
18
|
-
async () => ({
|
|
19
|
-
permissionGranted: await SmartCamera.getMedia({
|
|
20
|
-
audio: false,
|
|
21
|
-
video: true,
|
|
22
|
-
}),
|
|
23
|
-
}),
|
|
24
|
-
],
|
|
25
|
-
render: (args) => `
|
|
26
|
-
<selfie-capture theme-color='${args['theme-color']}'>
|
|
27
|
-
</selfie-capture>
|
|
28
|
-
`,
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export const SelfieCaptureAgentMode = {
|
|
32
|
-
render: () => `
|
|
33
|
-
<selfie-capture allow-agent-mode='true' data-camera-ready show-agent-mode-for-tests>
|
|
34
|
-
</selfie-capture>
|
|
35
|
-
`,
|
|
36
|
-
};
|
|
1
|
+
import SmartCamera from '../../../../domain/camera/src/SmartCamera';
|
|
2
|
+
import './SelfieCapture';
|
|
3
|
+
|
|
4
|
+
const meta = {
|
|
5
|
+
argTypes: {
|
|
6
|
+
'theme-color': { control: 'color' },
|
|
7
|
+
},
|
|
8
|
+
component: 'selfie-capture',
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export default meta;
|
|
12
|
+
|
|
13
|
+
export const SelfieCapture = {
|
|
14
|
+
args: {
|
|
15
|
+
'theme-color': '#001096',
|
|
16
|
+
},
|
|
17
|
+
loaders: [
|
|
18
|
+
async () => ({
|
|
19
|
+
permissionGranted: await SmartCamera.getMedia({
|
|
20
|
+
audio: false,
|
|
21
|
+
video: true,
|
|
22
|
+
}),
|
|
23
|
+
}),
|
|
24
|
+
],
|
|
25
|
+
render: (args) => `
|
|
26
|
+
<selfie-capture theme-color='${args['theme-color']}'>
|
|
27
|
+
</selfie-capture>
|
|
28
|
+
`,
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export const SelfieCaptureAgentMode = {
|
|
32
|
+
render: () => `
|
|
33
|
+
<selfie-capture allow-agent-mode='true' data-camera-ready show-agent-mode-for-tests>
|
|
34
|
+
</selfie-capture>
|
|
35
|
+
`,
|
|
36
|
+
};
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@smileid/signature-pad",
|
|
3
|
-
"version": "
|
|
4
|
-
"private": "true",
|
|
5
|
-
"exports": {
|
|
6
|
-
".": "./index.js"
|
|
7
|
-
},
|
|
8
|
-
"scripts": {
|
|
9
|
-
"lint": "eslint . --ext .js",
|
|
10
|
-
"lint:fix": "eslint . --ext .js --fix"
|
|
11
|
-
},
|
|
12
|
-
"description": "A component to capture signatures using the signature_pad library, and uploads",
|
|
13
|
-
"keywords": [
|
|
14
|
-
"Web Components"
|
|
15
|
-
],
|
|
16
|
-
"author": "SmileID <support@usesmileid.com> (https://usesmileid.com)",
|
|
17
|
-
"dependencies": {
|
|
18
|
-
"signature_pad": "^5.0.2"
|
|
19
|
-
},
|
|
20
|
-
"devDependencies": {
|
|
21
|
-
"eslint": "^8.57.0",
|
|
22
|
-
"eslint-config-airbnb-base": "^15.0.0",
|
|
23
|
-
"eslint-config-prettier": "^9.1.0",
|
|
24
|
-
"eslint-plugin-cypress": "^3.3.0",
|
|
25
|
-
"eslint-plugin-import": "^2.29.1",
|
|
26
|
-
"eslint-plugin-jest": "^28.8.3",
|
|
27
|
-
"eslint-plugin-prettier": "^5.2.1",
|
|
28
|
-
"prettier": "^3.3.3"
|
|
29
|
-
}
|
|
30
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@smileid/signature-pad",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"private": "true",
|
|
5
|
+
"exports": {
|
|
6
|
+
".": "./index.js"
|
|
7
|
+
},
|
|
8
|
+
"scripts": {
|
|
9
|
+
"lint": "eslint . --ext .js",
|
|
10
|
+
"lint:fix": "eslint . --ext .js --fix"
|
|
11
|
+
},
|
|
12
|
+
"description": "A component to capture signatures using the signature_pad library, and uploads",
|
|
13
|
+
"keywords": [
|
|
14
|
+
"Web Components"
|
|
15
|
+
],
|
|
16
|
+
"author": "SmileID <support@usesmileid.com> (https://usesmileid.com)",
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"signature_pad": "^5.0.2"
|
|
19
|
+
},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"eslint": "^8.57.0",
|
|
22
|
+
"eslint-config-airbnb-base": "^15.0.0",
|
|
23
|
+
"eslint-config-prettier": "^9.1.0",
|
|
24
|
+
"eslint-plugin-cypress": "^3.3.0",
|
|
25
|
+
"eslint-plugin-import": "^2.29.1",
|
|
26
|
+
"eslint-plugin-jest": "^28.8.3",
|
|
27
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
28
|
+
"prettier": "^3.3.3"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -474,7 +474,10 @@ button:disabled {
|
|
|
474
474
|
}
|
|
475
475
|
}
|
|
476
476
|
|
|
477
|
-
if (
|
|
477
|
+
if (
|
|
478
|
+
'customElements' in window &&
|
|
479
|
+
!window.customElements.get('smileid-signature-pad')
|
|
480
|
+
) {
|
|
478
481
|
window.customElements.define('smileid-signature-pad', SignaturePad);
|
|
479
482
|
}
|
|
480
483
|
|
|
@@ -4,7 +4,7 @@ import SmartCamera from '../../../domain/camera/src/SmartCamera';
|
|
|
4
4
|
import '../../document/src';
|
|
5
5
|
import '../../selfie/src';
|
|
6
6
|
import '../../camera-permission/CameraPermission';
|
|
7
|
-
import packageJson from '
|
|
7
|
+
import packageJson from '../../../../package.json';
|
|
8
8
|
|
|
9
9
|
const COMPONENTS_VERSION = packageJson.version;
|
|
10
10
|
|
package/.eslintrc.cjs
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
env: {
|
|
3
|
-
browser: true,
|
|
4
|
-
commonjs: true,
|
|
5
|
-
'cypress/globals': true,
|
|
6
|
-
es2021: true,
|
|
7
|
-
},
|
|
8
|
-
extends: 'airbnb-base',
|
|
9
|
-
ignorePatterns: [
|
|
10
|
-
'build/',
|
|
11
|
-
'instrumentation',
|
|
12
|
-
'dist/',
|
|
13
|
-
'libs/',
|
|
14
|
-
'node_modules/',
|
|
15
|
-
],
|
|
16
|
-
overrides: [
|
|
17
|
-
{
|
|
18
|
-
env: {
|
|
19
|
-
node: true,
|
|
20
|
-
},
|
|
21
|
-
files: ['.eslintrc.{js,cjs}'],
|
|
22
|
-
parserOptions: {
|
|
23
|
-
sourceType: 'script',
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
],
|
|
27
|
-
parserOptions: {
|
|
28
|
-
ecmaVersion: 'latest',
|
|
29
|
-
sourceType: 'module',
|
|
30
|
-
},
|
|
31
|
-
plugins: ['cypress'],
|
|
32
|
-
rules: {
|
|
33
|
-
'class-methods-use-this': 'off',
|
|
34
|
-
'function-paren-newline': 'off',
|
|
35
|
-
'implicit-arrow-linebreak': 'off',
|
|
36
|
-
'import/no-extraneous-dependencies': [
|
|
37
|
-
'error',
|
|
38
|
-
{
|
|
39
|
-
devDependencies: [
|
|
40
|
-
'esbuild.js',
|
|
41
|
-
'cypress.config.js',
|
|
42
|
-
'**/*{.,_,-}{test,spec}.js', // tests where the extension or filename suffix denotes that it is a test
|
|
43
|
-
],
|
|
44
|
-
optionalDependencies: false,
|
|
45
|
-
},
|
|
46
|
-
],
|
|
47
|
-
indent: 0,
|
|
48
|
-
'max-classes-per-file': 'off',
|
|
49
|
-
'max-len': 'off',
|
|
50
|
-
'object-curly-newline': 'off',
|
|
51
|
-
'operator-linebreak': 'off',
|
|
52
|
-
'no-console': ['error', { allow: ['warn', 'error', 'info'] }],
|
|
53
|
-
'no-param-reassign': 'off',
|
|
54
|
-
'no-plusplus': 'off',
|
|
55
|
-
'no-underscore-dangle': 'off',
|
|
56
|
-
'no-unused-vars': [
|
|
57
|
-
'error',
|
|
58
|
-
{ args: 'after-used', ignoreRestSiblings: false, vars: 'all' },
|
|
59
|
-
],
|
|
60
|
-
'prefer-destructuring': [
|
|
61
|
-
'error',
|
|
62
|
-
{
|
|
63
|
-
array: false,
|
|
64
|
-
object: true,
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
enforceForRenamedProperties: false,
|
|
68
|
-
},
|
|
69
|
-
],
|
|
70
|
-
'sort-keys': 'error',
|
|
71
|
-
},
|
|
72
|
-
};
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
context('SmartCameraWeb', () => {
|
|
2
|
-
beforeEach(() => {
|
|
3
|
-
cy.visit('/smart-camera-web-agent-mode');
|
|
4
|
-
});
|
|
5
|
-
|
|
6
|
-
it('should switch from the selfie mode to agent mode"', () => {
|
|
7
|
-
cy.log('Enable agent mode for tests');
|
|
8
|
-
cy.get('smart-camera-web')
|
|
9
|
-
.invoke('attr', 'allow-agent-mode', 'true')
|
|
10
|
-
.should('have.attr', 'allow-agent-mode', 'true');
|
|
11
|
-
|
|
12
|
-
cy.get('smart-camera-web').invoke(
|
|
13
|
-
'attr',
|
|
14
|
-
'show-agent-mode-for-tests',
|
|
15
|
-
'true',
|
|
16
|
-
);
|
|
17
|
-
cy.get('smart-camera-web').invoke('attr', 'disable-image-tests', '');
|
|
18
|
-
|
|
19
|
-
cy.clock();
|
|
20
|
-
cy.get('smart-camera-web')
|
|
21
|
-
.shadow()
|
|
22
|
-
.find('selfie-capture-instructions')
|
|
23
|
-
.shadow()
|
|
24
|
-
.find('#allow')
|
|
25
|
-
.click();
|
|
26
|
-
|
|
27
|
-
cy.get('smart-camera-web')
|
|
28
|
-
.shadow()
|
|
29
|
-
.find('selfie-capture')
|
|
30
|
-
.should('be.visible');
|
|
31
|
-
|
|
32
|
-
cy.get('smart-camera-web')
|
|
33
|
-
.shadow()
|
|
34
|
-
.find('selfie-capture')
|
|
35
|
-
.shadow()
|
|
36
|
-
.should('contain.text', 'Agent Mode On');
|
|
37
|
-
|
|
38
|
-
cy.get('smart-camera-web')
|
|
39
|
-
.shadow()
|
|
40
|
-
.find('selfie-capture')
|
|
41
|
-
.shadow()
|
|
42
|
-
.find('#switch-camera')
|
|
43
|
-
.click();
|
|
44
|
-
|
|
45
|
-
cy.get('smart-camera-web')
|
|
46
|
-
.shadow()
|
|
47
|
-
.find('selfie-capture')
|
|
48
|
-
.shadow()
|
|
49
|
-
.should('contain.text', 'Agent Mode Off');
|
|
50
|
-
|
|
51
|
-
cy.get('smart-camera-web')
|
|
52
|
-
.shadow()
|
|
53
|
-
.find('selfie-capture')
|
|
54
|
-
.shadow()
|
|
55
|
-
.find('#switch-camera')
|
|
56
|
-
.click();
|
|
57
|
-
|
|
58
|
-
cy.get('smart-camera-web')
|
|
59
|
-
.shadow()
|
|
60
|
-
.find('selfie-capture')
|
|
61
|
-
.shadow()
|
|
62
|
-
.should('contain.text', 'Agent Mode On');
|
|
63
|
-
|
|
64
|
-
cy.get('smart-camera-web')
|
|
65
|
-
.shadow()
|
|
66
|
-
.find('selfie-capture')
|
|
67
|
-
.shadow()
|
|
68
|
-
.should('contain.text', 'Take a Selfie');
|
|
69
|
-
|
|
70
|
-
cy.get('smart-camera-web')
|
|
71
|
-
.shadow()
|
|
72
|
-
.find('selfie-capture')
|
|
73
|
-
.shadow()
|
|
74
|
-
.find('#start-image-capture')
|
|
75
|
-
.click();
|
|
76
|
-
|
|
77
|
-
cy.tick(8000);
|
|
78
|
-
|
|
79
|
-
cy.get('smart-camera-web')
|
|
80
|
-
.shadow()
|
|
81
|
-
.find('selfie-capture')
|
|
82
|
-
.shadow()
|
|
83
|
-
.should('not.be.visible');
|
|
84
|
-
|
|
85
|
-
cy.get('smart-camera-web')
|
|
86
|
-
.shadow()
|
|
87
|
-
.find('selfie-capture-review')
|
|
88
|
-
.should('be.visible');
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
it('should not show the agent mode switch button"', () => {
|
|
92
|
-
cy.get('smart-camera-web')
|
|
93
|
-
.shadow()
|
|
94
|
-
.find('selfie-capture')
|
|
95
|
-
.invoke('attr', 'show-agent-mode-for-tests', 'false');
|
|
96
|
-
cy.get('smart-camera-web').invoke('attr', 'disable-image-tests', '');
|
|
97
|
-
|
|
98
|
-
cy.clock();
|
|
99
|
-
cy.get('smart-camera-web')
|
|
100
|
-
.shadow()
|
|
101
|
-
.find('selfie-capture-instructions')
|
|
102
|
-
.shadow()
|
|
103
|
-
.find('#allow')
|
|
104
|
-
.click();
|
|
105
|
-
|
|
106
|
-
cy.get('smart-camera-web')
|
|
107
|
-
.shadow()
|
|
108
|
-
.find('selfie-capture')
|
|
109
|
-
.should('be.visible');
|
|
110
|
-
|
|
111
|
-
cy.get('smart-camera-web')
|
|
112
|
-
.shadow()
|
|
113
|
-
.find('selfie-capture')
|
|
114
|
-
.shadow()
|
|
115
|
-
.find('#switch-camera')
|
|
116
|
-
.should('not.exist');
|
|
117
|
-
|
|
118
|
-
cy.get('smart-camera-web')
|
|
119
|
-
.shadow()
|
|
120
|
-
.find('selfie-capture')
|
|
121
|
-
.shadow()
|
|
122
|
-
.should('contain.text', 'Take a Selfie');
|
|
123
|
-
|
|
124
|
-
cy.get('smart-camera-web')
|
|
125
|
-
.shadow()
|
|
126
|
-
.find('selfie-capture')
|
|
127
|
-
.shadow()
|
|
128
|
-
.find('#start-image-capture')
|
|
129
|
-
.click();
|
|
130
|
-
|
|
131
|
-
cy.tick(8000);
|
|
132
|
-
|
|
133
|
-
cy.get('smart-camera-web')
|
|
134
|
-
.shadow()
|
|
135
|
-
.find('selfie-capture')
|
|
136
|
-
.shadow()
|
|
137
|
-
.should('not.be.visible');
|
|
138
|
-
|
|
139
|
-
cy.get('smart-camera-web')
|
|
140
|
-
.shadow()
|
|
141
|
-
.find('selfie-capture-review')
|
|
142
|
-
.should('be.visible');
|
|
143
|
-
});
|
|
144
|
-
});
|
|
@@ -1,249 +0,0 @@
|
|
|
1
|
-
describe('SmartCameraWeb', () => {
|
|
2
|
-
it('shows attribution by default', () => {
|
|
3
|
-
cy.clock();
|
|
4
|
-
cy.visit('/smart-camera-web');
|
|
5
|
-
cy.get('smart-camera-web')
|
|
6
|
-
.shadow()
|
|
7
|
-
.find('selfie-capture-instructions')
|
|
8
|
-
.shadow()
|
|
9
|
-
.find('powered-by-smile-id')
|
|
10
|
-
.should('be.visible');
|
|
11
|
-
|
|
12
|
-
cy.get('smart-camera-web')
|
|
13
|
-
.shadow()
|
|
14
|
-
.find('selfie-capture-instructions')
|
|
15
|
-
.shadow()
|
|
16
|
-
.find('#allow')
|
|
17
|
-
.click();
|
|
18
|
-
|
|
19
|
-
cy.get('smart-camera-web')
|
|
20
|
-
.shadow()
|
|
21
|
-
.find('selfie-capture')
|
|
22
|
-
.shadow()
|
|
23
|
-
.find('powered-by-smile-id')
|
|
24
|
-
.should('be.visible');
|
|
25
|
-
|
|
26
|
-
cy.get('smart-camera-web')
|
|
27
|
-
.shadow()
|
|
28
|
-
.find('selfie-capture')
|
|
29
|
-
.shadow()
|
|
30
|
-
.find('#start-image-capture')
|
|
31
|
-
.click();
|
|
32
|
-
cy.tick(8000);
|
|
33
|
-
|
|
34
|
-
cy.get('smart-camera-web')
|
|
35
|
-
.shadow()
|
|
36
|
-
.find('selfie-capture-review')
|
|
37
|
-
.shadow()
|
|
38
|
-
.find('powered-by-smile-id')
|
|
39
|
-
.should('be.visible');
|
|
40
|
-
|
|
41
|
-
cy.get('smart-camera-web')
|
|
42
|
-
.shadow()
|
|
43
|
-
.find('selfie-capture-review')
|
|
44
|
-
.shadow()
|
|
45
|
-
.find('#select-id-image')
|
|
46
|
-
.click();
|
|
47
|
-
|
|
48
|
-
cy.get('smart-camera-web')
|
|
49
|
-
.shadow()
|
|
50
|
-
.find('document-capture-instructions#document-capture-instructions-front')
|
|
51
|
-
.shadow()
|
|
52
|
-
.find('powered-by-smile-id')
|
|
53
|
-
.should('be.visible');
|
|
54
|
-
|
|
55
|
-
cy.get('smart-camera-web')
|
|
56
|
-
.shadow()
|
|
57
|
-
.find('document-capture-instructions#document-capture-instructions-front')
|
|
58
|
-
.shadow()
|
|
59
|
-
.find('#take-photo')
|
|
60
|
-
.click();
|
|
61
|
-
|
|
62
|
-
cy.get('smart-camera-web')
|
|
63
|
-
.shadow()
|
|
64
|
-
.find('document-capture#document-capture-front')
|
|
65
|
-
.shadow()
|
|
66
|
-
.find('powered-by-smile-id')
|
|
67
|
-
.should('be.visible');
|
|
68
|
-
|
|
69
|
-
cy.get('smart-camera-web')
|
|
70
|
-
.shadow()
|
|
71
|
-
.find('document-capture#document-capture-front')
|
|
72
|
-
.shadow()
|
|
73
|
-
.find('#capture-id-image')
|
|
74
|
-
.click();
|
|
75
|
-
|
|
76
|
-
cy.get('smart-camera-web')
|
|
77
|
-
.shadow()
|
|
78
|
-
.find('document-capture-review#front-of-document-capture-review')
|
|
79
|
-
.shadow()
|
|
80
|
-
.find('powered-by-smile-id')
|
|
81
|
-
.should('be.visible');
|
|
82
|
-
|
|
83
|
-
cy.get('smart-camera-web')
|
|
84
|
-
.shadow()
|
|
85
|
-
.find('document-capture-review#front-of-document-capture-review')
|
|
86
|
-
.shadow()
|
|
87
|
-
.find('#select-id-image')
|
|
88
|
-
.click();
|
|
89
|
-
|
|
90
|
-
cy.get('smart-camera-web')
|
|
91
|
-
.shadow()
|
|
92
|
-
.find('document-capture-instructions#document-capture-instructions-back')
|
|
93
|
-
.shadow()
|
|
94
|
-
.find('powered-by-smile-id')
|
|
95
|
-
.should('be.visible');
|
|
96
|
-
|
|
97
|
-
cy.get('smart-camera-web')
|
|
98
|
-
.shadow()
|
|
99
|
-
.find('document-capture-instructions#document-capture-instructions-back')
|
|
100
|
-
.shadow()
|
|
101
|
-
.find('#take-photo')
|
|
102
|
-
.click();
|
|
103
|
-
|
|
104
|
-
cy.get('smart-camera-web')
|
|
105
|
-
.shadow()
|
|
106
|
-
.find('document-capture#document-capture-back')
|
|
107
|
-
.shadow()
|
|
108
|
-
.find('powered-by-smile-id')
|
|
109
|
-
.should('be.visible');
|
|
110
|
-
|
|
111
|
-
cy.get('smart-camera-web')
|
|
112
|
-
.shadow()
|
|
113
|
-
.find('document-capture#document-capture-back')
|
|
114
|
-
.shadow()
|
|
115
|
-
.find('#capture-id-image')
|
|
116
|
-
.click();
|
|
117
|
-
|
|
118
|
-
cy.get('smart-camera-web')
|
|
119
|
-
.shadow()
|
|
120
|
-
.find('document-capture-review#back-of-document-capture-review')
|
|
121
|
-
.shadow()
|
|
122
|
-
.find('powered-by-smile-id')
|
|
123
|
-
.should('be.visible');
|
|
124
|
-
});
|
|
125
|
-
|
|
126
|
-
it.only('hides attribution when `hide-attribution` attribute is passed', () => {
|
|
127
|
-
cy.clock();
|
|
128
|
-
cy.visit('/capture-back-of-id-hide-attribution');
|
|
129
|
-
cy.get('smart-camera-web')
|
|
130
|
-
.shadow()
|
|
131
|
-
.find('selfie-capture-instructions')
|
|
132
|
-
.shadow()
|
|
133
|
-
.get('powered-by-smile-id')
|
|
134
|
-
.should('not.exist');
|
|
135
|
-
|
|
136
|
-
cy.get('smart-camera-web')
|
|
137
|
-
.shadow()
|
|
138
|
-
.find('selfie-capture-instructions')
|
|
139
|
-
.shadow()
|
|
140
|
-
.find('#allow')
|
|
141
|
-
.click();
|
|
142
|
-
|
|
143
|
-
cy.get('smart-camera-web')
|
|
144
|
-
.shadow()
|
|
145
|
-
.find('selfie-capture')
|
|
146
|
-
.shadow()
|
|
147
|
-
.get('powered-by-smile-id')
|
|
148
|
-
.should('not.exist');
|
|
149
|
-
|
|
150
|
-
cy.get('smart-camera-web')
|
|
151
|
-
.shadow()
|
|
152
|
-
.find('selfie-capture')
|
|
153
|
-
.shadow()
|
|
154
|
-
.find('#start-image-capture')
|
|
155
|
-
.click();
|
|
156
|
-
cy.tick(8000);
|
|
157
|
-
|
|
158
|
-
cy.get('smart-camera-web')
|
|
159
|
-
.shadow()
|
|
160
|
-
.find('selfie-capture-review')
|
|
161
|
-
.shadow()
|
|
162
|
-
.get('powered-by-smile-id')
|
|
163
|
-
.should('not.exist');
|
|
164
|
-
|
|
165
|
-
cy.get('smart-camera-web')
|
|
166
|
-
.shadow()
|
|
167
|
-
.find('selfie-capture-review')
|
|
168
|
-
.shadow()
|
|
169
|
-
.find('#select-id-image')
|
|
170
|
-
.click();
|
|
171
|
-
|
|
172
|
-
cy.get('smart-camera-web')
|
|
173
|
-
.shadow()
|
|
174
|
-
.find('document-capture-instructions#document-capture-instructions-front')
|
|
175
|
-
.shadow()
|
|
176
|
-
.get('powered-by-smile-id')
|
|
177
|
-
.should('not.exist');
|
|
178
|
-
|
|
179
|
-
cy.get('smart-camera-web')
|
|
180
|
-
.shadow()
|
|
181
|
-
.find('document-capture-instructions#document-capture-instructions-front')
|
|
182
|
-
.shadow()
|
|
183
|
-
.find('#take-photo')
|
|
184
|
-
.click();
|
|
185
|
-
|
|
186
|
-
cy.get('smart-camera-web')
|
|
187
|
-
.shadow()
|
|
188
|
-
.find('document-capture#document-capture-front')
|
|
189
|
-
.shadow()
|
|
190
|
-
.get('powered-by-smile-id')
|
|
191
|
-
.should('not.exist');
|
|
192
|
-
|
|
193
|
-
cy.get('smart-camera-web')
|
|
194
|
-
.shadow()
|
|
195
|
-
.find('document-capture#document-capture-front')
|
|
196
|
-
.shadow()
|
|
197
|
-
.find('#capture-id-image')
|
|
198
|
-
.click();
|
|
199
|
-
|
|
200
|
-
cy.get('smart-camera-web')
|
|
201
|
-
.shadow()
|
|
202
|
-
.find('document-capture-review#front-of-document-capture-review')
|
|
203
|
-
.shadow()
|
|
204
|
-
.get('powered-by-smile-id')
|
|
205
|
-
.should('not.exist');
|
|
206
|
-
|
|
207
|
-
cy.get('smart-camera-web')
|
|
208
|
-
.shadow()
|
|
209
|
-
.find('document-capture-review#front-of-document-capture-review')
|
|
210
|
-
.shadow()
|
|
211
|
-
.find('#select-id-image')
|
|
212
|
-
.click();
|
|
213
|
-
|
|
214
|
-
cy.get('smart-camera-web')
|
|
215
|
-
.shadow()
|
|
216
|
-
.find('document-capture-instructions#document-capture-instructions-back')
|
|
217
|
-
.shadow()
|
|
218
|
-
.get('powered-by-smile-id')
|
|
219
|
-
.should('not.exist');
|
|
220
|
-
|
|
221
|
-
cy.get('smart-camera-web')
|
|
222
|
-
.shadow()
|
|
223
|
-
.find('document-capture-instructions#document-capture-instructions-back')
|
|
224
|
-
.shadow()
|
|
225
|
-
.find('#take-photo')
|
|
226
|
-
.click();
|
|
227
|
-
|
|
228
|
-
cy.get('smart-camera-web')
|
|
229
|
-
.shadow()
|
|
230
|
-
.find('document-capture#document-capture-back')
|
|
231
|
-
.shadow()
|
|
232
|
-
.get('powered-by-smile-id')
|
|
233
|
-
.should('not.exist');
|
|
234
|
-
|
|
235
|
-
cy.get('smart-camera-web')
|
|
236
|
-
.shadow()
|
|
237
|
-
.find('document-capture#document-capture-back')
|
|
238
|
-
.shadow()
|
|
239
|
-
.find('#capture-id-image')
|
|
240
|
-
.click();
|
|
241
|
-
|
|
242
|
-
cy.get('smart-camera-web')
|
|
243
|
-
.shadow()
|
|
244
|
-
.find('document-capture-review#back-of-document-capture-review')
|
|
245
|
-
.shadow()
|
|
246
|
-
.get('powered-by-smile-id')
|
|
247
|
-
.should('not.exist');
|
|
248
|
-
});
|
|
249
|
-
});
|