@testgorilla/tgo-immersive-test 1.0.0 → 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/.eslintrc.json +47 -0
- package/jest.config.ts +34 -0
- package/ng-package.json +16 -0
- package/package.json +10 -25
- package/project.json +48 -0
- package/src/lib/components/immersive-test/immersive-test.component.html +100 -0
- package/src/lib/components/immersive-test/immersive-test.component.scss +247 -0
- package/src/lib/components/immersive-test/immersive-test.component.spec.ts +583 -0
- package/src/lib/components/immersive-test/immersive-test.component.ts +278 -0
- package/{lib/components/index.d.ts → src/lib/components/index.ts} +2 -0
- package/src/lib/components/review-instructions-dialog/review-instructions-dialog.component.html +39 -0
- package/src/lib/components/review-instructions-dialog/review-instructions-dialog.component.scss +160 -0
- package/src/lib/components/review-instructions-dialog/review-instructions-dialog.component.spec.ts +81 -0
- package/src/lib/components/review-instructions-dialog/review-instructions-dialog.component.ts +79 -0
- package/src/lib/components/ringing-phone-animation/ringing-phone-animation.component.html +16 -0
- package/src/lib/components/ringing-phone-animation/ringing-phone-animation.component.scss +79 -0
- package/src/lib/components/ringing-phone-animation/ringing-phone-animation.component.spec.ts +104 -0
- package/src/lib/components/ringing-phone-animation/ringing-phone-animation.component.ts +53 -0
- package/src/lib/components/ringing-phone-animation/ringing-phone-animation.sound.ts +2 -0
- package/src/lib/components/video-countdown/video-countdown.component.html +10 -0
- package/src/lib/components/video-countdown/video-countdown.component.scss +16 -0
- package/src/lib/components/video-countdown/video-countdown.component.spec.ts +58 -0
- package/src/lib/components/video-countdown/video-countdown.component.ts +100 -0
- package/src/lib/models/index.ts +9 -0
- package/src/lib/models/translations.ts +3 -0
- package/src/lib/services/index.ts +7 -0
- package/src/test-setup.ts +62 -0
- package/tsconfig.json +20 -0
- package/tsconfig.lib.json +20 -0
- package/tsconfig.lib.prod.json +11 -0
- package/tsconfig.spec.json +17 -0
- package/esm2022/index.mjs +0 -5
- package/esm2022/lib/components/immersive-test/immersive-test.component.mjs +0 -257
- package/esm2022/lib/components/index.mjs +0 -6
- package/esm2022/lib/components/review-instructions-dialog/index.mjs +0 -2
- package/esm2022/lib/components/review-instructions-dialog/review-instructions-dialog.component.mjs +0 -69
- package/esm2022/lib/components/ringing-phone-animation/index.mjs +0 -2
- package/esm2022/lib/components/ringing-phone-animation/ringing-phone-animation.component.mjs +0 -43
- package/esm2022/lib/components/ringing-phone-animation/ringing-phone-animation.sound.mjs +0 -2
- package/esm2022/lib/components/video-countdown/index.mjs +0 -2
- package/esm2022/lib/components/video-countdown/video-countdown.component.mjs +0 -105
- package/esm2022/lib/models/index.mjs +0 -2
- package/esm2022/lib/models/translations.mjs +0 -3
- package/esm2022/lib/services/index.mjs +0 -3
- package/esm2022/shared/index.mjs +0 -5
- package/esm2022/shared/lib/components/audio-animation/audio-animation.component.mjs +0 -114
- package/esm2022/shared/lib/components/audio-animation/index.mjs +0 -2
- package/esm2022/shared/lib/components/index.mjs +0 -3
- package/esm2022/shared/lib/components/vimeo-video/index.mjs +0 -2
- package/esm2022/shared/lib/components/vimeo-video/vimeo-video.component.mjs +0 -101
- package/esm2022/shared/lib/models/answer.mjs +0 -2
- package/esm2022/shared/lib/models/assessment.mjs +0 -2
- package/esm2022/shared/lib/models/environment.mjs +0 -2
- package/esm2022/shared/lib/models/index.mjs +0 -9
- package/esm2022/shared/lib/models/question-component.mjs +0 -2
- package/esm2022/shared/lib/models/question.mjs +0 -2
- package/esm2022/shared/lib/models/test.mjs +0 -2
- package/esm2022/shared/lib/models/translations.mjs +0 -2
- package/esm2022/shared/lib/models/window.mjs +0 -2
- package/esm2022/shared/lib/services/api/api.service.mjs +0 -97
- package/esm2022/shared/lib/services/api/mocked-api.service.mjs +0 -131
- package/esm2022/shared/lib/services/environment/environment.service.mjs +0 -13
- package/esm2022/shared/lib/services/index.mjs +0 -10
- package/esm2022/shared/lib/services/localization/languages.model.mjs +0 -19
- package/esm2022/shared/lib/services/localization/transloco-lazy-module-utils.mjs +0 -27
- package/esm2022/shared/lib/services/localization/transloco-testing.module.mjs +0 -11
- package/esm2022/shared/lib/services/media/media.service.mjs +0 -129
- package/esm2022/shared/lib/services/mixpanel/mixpanel.service.mjs +0 -30
- package/esm2022/shared/lib/services/theme/theme.service.mjs +0 -24
- package/esm2022/shared/test-mocks/assessment-test.mock.mjs +0 -112
- package/esm2022/shared/test-mocks/index.mjs +0 -3
- package/esm2022/shared/test-mocks/tgo-ui.mock.mjs +0 -39
- package/esm2022/testgorilla-tgo-immersive-test.mjs +0 -5
- package/fesm2022/testgorilla-tgo-immersive-test.mjs +0 -466
- package/fesm2022/testgorilla-tgo-immersive-test.mjs.map +0 -1
- package/lib/components/immersive-test/immersive-test.component.d.ts +0 -53
- package/lib/components/review-instructions-dialog/review-instructions-dialog.component.d.ts +0 -24
- package/lib/components/ringing-phone-animation/ringing-phone-animation.component.d.ts +0 -13
- package/lib/components/ringing-phone-animation/ringing-phone-animation.sound.d.ts +0 -1
- package/lib/components/video-countdown/video-countdown.component.d.ts +0 -24
- package/lib/models/index.d.ts +0 -2
- package/lib/models/translations.d.ts +0 -1
- package/lib/services/index.d.ts +0 -1
- package/shared/index.d.ts +0 -4
- package/shared/lib/components/audio-animation/audio-animation.component.d.ts +0 -27
- package/shared/lib/components/audio-animation/index.d.ts +0 -1
- package/shared/lib/components/index.d.ts +0 -2
- package/shared/lib/components/vimeo-video/index.d.ts +0 -1
- package/shared/lib/components/vimeo-video/vimeo-video.component.d.ts +0 -24
- package/shared/lib/models/answer.d.ts +0 -17
- package/shared/lib/models/assessment.d.ts +0 -80
- package/shared/lib/models/environment.d.ts +0 -1
- package/shared/lib/models/index.d.ts +0 -8
- package/shared/lib/models/question-component.d.ts +0 -54
- package/shared/lib/models/question.d.ts +0 -102
- package/shared/lib/models/test.d.ts +0 -81
- package/shared/lib/models/translations.d.ts +0 -1
- package/shared/lib/models/window.d.ts +0 -6
- package/shared/lib/services/api/api.service.d.ts +0 -25
- package/shared/lib/services/api/mocked-api.service.d.ts +0 -35
- package/shared/lib/services/environment/environment.service.d.ts +0 -6
- package/shared/lib/services/index.d.ts +0 -9
- package/shared/lib/services/localization/languages.model.d.ts +0 -15
- package/shared/lib/services/localization/transloco-lazy-module-utils.d.ts +0 -11
- package/shared/lib/services/localization/transloco-testing.module.d.ts +0 -2
- package/shared/lib/services/media/media.service.d.ts +0 -29
- package/shared/lib/services/mixpanel/mixpanel.service.d.ts +0 -10
- package/shared/lib/services/theme/theme.service.d.ts +0 -8
- package/shared/test-mocks/assessment-test.mock.d.ts +0 -21
- package/shared/test-mocks/index.d.ts +0 -2
- package/shared/test-mocks/tgo-ui.mock.d.ts +0 -21
- /package/{assets → src/assets}/i18n/en.json +0 -0
- /package/{index.d.ts → src/index.ts} +0 -0
- /package/{lib/components/review-instructions-dialog/index.d.ts → src/lib/components/review-instructions-dialog/index.ts} +0 -0
- /package/{lib/components/ringing-phone-animation/index.d.ts → src/lib/components/ringing-phone-animation/index.ts} +0 -0
- /package/{lib/components/video-countdown/index.d.ts → src/lib/components/video-countdown/index.ts} +0 -0
package/.eslintrc.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": ["../../.eslintrc.json"],
|
|
3
|
+
"ignorePatterns": ["!**/*"],
|
|
4
|
+
"overrides": [
|
|
5
|
+
{
|
|
6
|
+
"files": ["*.ts"],
|
|
7
|
+
"extends": ["plugin:@nx/angular", "plugin:@angular-eslint/template/process-inline-templates"],
|
|
8
|
+
"rules": {
|
|
9
|
+
"@angular-eslint/directive-selector": [
|
|
10
|
+
"error",
|
|
11
|
+
{
|
|
12
|
+
"type": "attribute",
|
|
13
|
+
"prefix": "tgo",
|
|
14
|
+
"style": "camelCase"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"@angular-eslint/component-selector": [
|
|
18
|
+
"error",
|
|
19
|
+
{
|
|
20
|
+
"type": "element",
|
|
21
|
+
"prefix": "tgo",
|
|
22
|
+
"style": "kebab-case"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"@angular-eslint/prefer-standalone": "off"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"files": ["*.html"],
|
|
30
|
+
"extends": ["plugin:@nx/angular-template"],
|
|
31
|
+
"rules": {}
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"files": ["*.json"],
|
|
35
|
+
"parser": "jsonc-eslint-parser",
|
|
36
|
+
"rules": {
|
|
37
|
+
"@nx/dependency-checks": [
|
|
38
|
+
"error",
|
|
39
|
+
{
|
|
40
|
+
"ignoredFiles": ["{projectRoot}/eslint.config.{js,cjs,mjs}"],
|
|
41
|
+
"ignoredDependencies": ["@vimeo/player"]
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
}
|
package/jest.config.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// Detect CI environment
|
|
2
|
+
const isCI = process.env.CI === 'true' || process.env.CIRCLECI === 'true';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
displayName: 'tgo-immersive-test',
|
|
6
|
+
preset: '../../jest.preset.js',
|
|
7
|
+
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
|
|
8
|
+
coverageDirectory: '../../coverage/packages/tgo-immersive-test',
|
|
9
|
+
testMatch: ['**/__tests__/**/*.[jt]s?(x)', '**/*.spec.[jt]s?(x)'],
|
|
10
|
+
testPathIgnorePatterns: ['/node_modules/', '/src/lib/models/'],
|
|
11
|
+
// Run tests sequentially in CI to prevent OOM with media-related tests
|
|
12
|
+
...(isCI && { maxWorkers: 1 }),
|
|
13
|
+
moduleNameMapper: {
|
|
14
|
+
'^@testgorilla/tgo-ui$': '<rootDir>/../shared/src/test-mocks/tgo-ui.mock.ts',
|
|
15
|
+
'^@testgorilla/tgo-test-shared$': '<rootDir>/src/shared/index.ts',
|
|
16
|
+
},
|
|
17
|
+
transform: {
|
|
18
|
+
'^.+\\.(ts|mjs|js|html)$': [
|
|
19
|
+
'jest-preset-angular',
|
|
20
|
+
{
|
|
21
|
+
tsconfig: '<rootDir>/tsconfig.spec.json',
|
|
22
|
+
stringifyContentPathRegex: '\\.(html|svg)$',
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
transformIgnorePatterns: [
|
|
27
|
+
'node_modules/(?!.*\\.mjs$|lodash-es|@testgorilla|ng2-charts|chart\\.js|chartjs-plugin-datalabels)',
|
|
28
|
+
],
|
|
29
|
+
snapshotSerializers: [
|
|
30
|
+
'jest-preset-angular/build/serializers/no-ng-attributes',
|
|
31
|
+
'jest-preset-angular/build/serializers/ng-snapshot',
|
|
32
|
+
'jest-preset-angular/build/serializers/html-comment',
|
|
33
|
+
],
|
|
34
|
+
};
|
package/ng-package.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
|
|
3
|
+
"dest": "../../dist/packages/tgo-immersive-test",
|
|
4
|
+
"assets": [
|
|
5
|
+
{
|
|
6
|
+
"glob": "**/*",
|
|
7
|
+
"input": "./src/assets",
|
|
8
|
+
"output": "./assets"
|
|
9
|
+
}
|
|
10
|
+
],
|
|
11
|
+
"lib": {
|
|
12
|
+
"entryFile": "./src/index.ts"
|
|
13
|
+
},
|
|
14
|
+
"allowedNonPeerDependencies": []
|
|
15
|
+
}
|
|
16
|
+
|
package/package.json
CHANGED
|
@@ -1,35 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@testgorilla/tgo-immersive-test",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/common": "~
|
|
6
|
-
"@angular/core": "~
|
|
7
|
-
"@angular/animations": "~
|
|
8
|
-
"@angular/material": "~
|
|
5
|
+
"@angular/common": "~19.2.17",
|
|
6
|
+
"@angular/core": "~19.2.17",
|
|
7
|
+
"@angular/animations": "~19.2.17",
|
|
8
|
+
"@angular/material": "~19.2.19",
|
|
9
9
|
"@ngneat/transloco": "~4.3.0",
|
|
10
|
-
"@testgorilla/tgo-ui": "~
|
|
11
|
-
"jest-preset-angular": "
|
|
12
|
-
"ngx-quill": "^
|
|
10
|
+
"@testgorilla/tgo-ui": "~4.0.0",
|
|
11
|
+
"jest-preset-angular": "14.4.2",
|
|
12
|
+
"ngx-quill": "^27.1.2",
|
|
13
13
|
"rxjs": "~7.8.1"
|
|
14
14
|
},
|
|
15
|
-
"typings": "
|
|
15
|
+
"typings": "src/lib/types",
|
|
16
16
|
"sideEffects": false,
|
|
17
17
|
"license": "PROPRIETARY",
|
|
18
18
|
"displayName": "Immersive Test",
|
|
19
|
-
"description": "Immersive Test component"
|
|
20
|
-
"module": "fesm2022/testgorilla-tgo-immersive-test.mjs",
|
|
21
|
-
"exports": {
|
|
22
|
-
"./package.json": {
|
|
23
|
-
"default": "./package.json"
|
|
24
|
-
},
|
|
25
|
-
".": {
|
|
26
|
-
"types": "./index.d.ts",
|
|
27
|
-
"esm2022": "./esm2022/testgorilla-tgo-immersive-test.mjs",
|
|
28
|
-
"esm": "./esm2022/testgorilla-tgo-immersive-test.mjs",
|
|
29
|
-
"default": "./fesm2022/testgorilla-tgo-immersive-test.mjs"
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
"dependencies": {
|
|
33
|
-
"tslib": "^2.3.0"
|
|
34
|
-
}
|
|
19
|
+
"description": "Immersive Test component"
|
|
35
20
|
}
|
package/project.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "tgo-immersive-test",
|
|
3
|
+
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
|
4
|
+
"sourceRoot": "packages/tgo-immersive-test/src",
|
|
5
|
+
"prefix": "tgo",
|
|
6
|
+
"projectType": "library",
|
|
7
|
+
"tags": [],
|
|
8
|
+
"targets": {
|
|
9
|
+
"build": {
|
|
10
|
+
"executor": "nx:run-commands",
|
|
11
|
+
"outputs": ["{workspaceRoot}/dist/packages/tgo-immersive-test"],
|
|
12
|
+
"options": {
|
|
13
|
+
"commands": [
|
|
14
|
+
"nx run tgo-immersive-test:package",
|
|
15
|
+
"node scripts/replace-shared-alias.js dist/packages/tgo-immersive-test @testgorilla/tgo-test-shared"
|
|
16
|
+
],
|
|
17
|
+
"parallel": false,
|
|
18
|
+
"forwardAllArgs": false
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"package": {
|
|
22
|
+
"executor": "@nx/angular:package",
|
|
23
|
+
"outputs": ["{workspaceRoot}/dist/{projectRoot}"],
|
|
24
|
+
"options": {
|
|
25
|
+
"project": "packages/tgo-immersive-test/ng-package.json"
|
|
26
|
+
},
|
|
27
|
+
"configurations": {
|
|
28
|
+
"production": {
|
|
29
|
+
"tsConfig": "packages/tgo-immersive-test/tsconfig.lib.prod.json"
|
|
30
|
+
},
|
|
31
|
+
"development": {
|
|
32
|
+
"tsConfig": "packages/tgo-immersive-test/tsconfig.lib.json"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"defaultConfiguration": "production"
|
|
36
|
+
},
|
|
37
|
+
"test": {
|
|
38
|
+
"executor": "@nx/jest:jest",
|
|
39
|
+
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
|
40
|
+
"options": {
|
|
41
|
+
"jestConfig": "packages/tgo-immersive-test/jest.config.ts"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"lint": {
|
|
45
|
+
"executor": "@nx/eslint:lint"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
<div class="immersive-test">
|
|
2
|
+
<div class="test-container">
|
|
3
|
+
<div
|
|
4
|
+
class="media-container"
|
|
5
|
+
[class.is-video-visible]="isQuestionPlaying() && !isAnswering()"
|
|
6
|
+
[class.is-playing]="isVideoPlaying()"
|
|
7
|
+
[class.is-answering]="isAnswering()"
|
|
8
|
+
>
|
|
9
|
+
<div class="candidate-no-camera" *ngIf="!candidateVideoStreamReady()">
|
|
10
|
+
<h3> </h3>
|
|
11
|
+
<tgo-audio-animation
|
|
12
|
+
*ngIf="isAnswering()"
|
|
13
|
+
[volume]="volume()"
|
|
14
|
+
[fakeData]="false"
|
|
15
|
+
></tgo-audio-animation>
|
|
16
|
+
<ui-icon name="User-profile-in-line" color="white" size="24"></ui-icon>
|
|
17
|
+
<h3 class="bold">{{ translations['YOU'] }}</h3>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="candidate-camera" [hidden]="!candidateVideoStreamReady()">
|
|
20
|
+
<tgo-audio-animation
|
|
21
|
+
*ngIf="isAnswering() && candidateVideoStreamReady()"
|
|
22
|
+
[volume]="volume()"
|
|
23
|
+
[fakeData]="false"
|
|
24
|
+
></tgo-audio-animation>
|
|
25
|
+
<video height #video id="video" playsinline (loadedmetadata)="onVideoLoad()"></video>
|
|
26
|
+
<h3 class="bold" *ngIf="candidateVideoStreamReady()">
|
|
27
|
+
{{ translations['YOU'] }}
|
|
28
|
+
</h3>
|
|
29
|
+
</div>
|
|
30
|
+
<tgo-audio-animation *ngIf="isVideoPlaying()" [fakeData]="true"></tgo-audio-animation>
|
|
31
|
+
<tgo-vimeo-video
|
|
32
|
+
*ngIf="isVideo"
|
|
33
|
+
[isPlaying]="isQuestionPlaying()"
|
|
34
|
+
[videoUrl]="fileUrl"
|
|
35
|
+
(videoEnded)="startCountdown()"
|
|
36
|
+
(videoStarted)="isVideoPlaying.set(true)"
|
|
37
|
+
></tgo-vimeo-video>
|
|
38
|
+
<div class="audio-info" *ngIf="isQuestionPlaying() && !isVideo">
|
|
39
|
+
<ui-icon name="User-profile-filled" color="white" size="80"></ui-icon>
|
|
40
|
+
</div>
|
|
41
|
+
<div class="start" *ngIf="isFirstQuestion && !isQuestionPlaying()">
|
|
42
|
+
<tgo-ringing-phone-animation [isRinging]="true"></tgo-ringing-phone-animation>
|
|
43
|
+
<ui-button
|
|
44
|
+
[label]="translations['ANSWER']"
|
|
45
|
+
[class.white-btn]="test.is_preview_mode"
|
|
46
|
+
variant="primary"
|
|
47
|
+
[companyColor]="companyColor"
|
|
48
|
+
(click)="startQuestion()"
|
|
49
|
+
data-testid="immersive-test.start-question-btn"
|
|
50
|
+
></ui-button>
|
|
51
|
+
</div>
|
|
52
|
+
<div class="overlay" *ngIf="isAnswering() || isCountingDown()" [@fadeInFadeOut]>
|
|
53
|
+
<div class="answer" *ngIf="!audioUrl() && isAnswering()">
|
|
54
|
+
<div>
|
|
55
|
+
<h3 class="uppercase recording-started">
|
|
56
|
+
<span class="recording-dot"></span>{{ translations['RECORDING_STARTED'] }}
|
|
57
|
+
</h3>
|
|
58
|
+
<h1 class="bold">
|
|
59
|
+
{{ translations['ANSWER_THE_QUESTION'] }}
|
|
60
|
+
</h1>
|
|
61
|
+
</div>
|
|
62
|
+
<ui-button
|
|
63
|
+
[label]="translations['ANSWER_COMPLETED']"
|
|
64
|
+
[class.white-btn]="test.is_preview_mode"
|
|
65
|
+
variant="primary"
|
|
66
|
+
[companyColor]="companyColor"
|
|
67
|
+
(click)="stopRecording()"
|
|
68
|
+
data-testid="immersive-test.stop-recording-btn"
|
|
69
|
+
></ui-button>
|
|
70
|
+
</div>
|
|
71
|
+
<div class="answer" *ngIf="isCountingDown()">
|
|
72
|
+
<div>
|
|
73
|
+
<h1 class="bold">
|
|
74
|
+
{{ translations['GET_READY'] }}
|
|
75
|
+
</h1>
|
|
76
|
+
</div>
|
|
77
|
+
<tgo-video-countdown (finished)="startRecordAnswer()"></tgo-video-countdown>
|
|
78
|
+
<div> </div>
|
|
79
|
+
</div>
|
|
80
|
+
<div class="preview" [class.hidden]="!audioUrl()" *ngIf="test.is_preview_mode">
|
|
81
|
+
<h4>{{ translations['AUDIO_READY'] }}</h4>
|
|
82
|
+
<p>{{ translations['AUDIO_PREVIEW'] }}</p>
|
|
83
|
+
<audio #audio controls></audio>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
<div class="media-info">
|
|
88
|
+
<h3 class="bold">{{ translations['CUSTOMER'] }}</h3>
|
|
89
|
+
<ui-button
|
|
90
|
+
[hidden]="!test.test_instruction && !test.intro_text"
|
|
91
|
+
class="review-button"
|
|
92
|
+
[label]="translations['REVIEW_INSTRUCTIONS']"
|
|
93
|
+
variant="secondary"
|
|
94
|
+
size="small"
|
|
95
|
+
(click)="openReviewInstructionsDialog()"
|
|
96
|
+
data-testid="immersive-test.review-instructions-btn"
|
|
97
|
+
></ui-button>
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
@import '@testgorilla/tgo-ui/projects/tgo-canopy-ui/theme/variables';
|
|
2
|
+
|
|
3
|
+
$border-radius: 10px;
|
|
4
|
+
|
|
5
|
+
.immersive-test {
|
|
6
|
+
padding: 0 64px;
|
|
7
|
+
margin-top: 40px;
|
|
8
|
+
|
|
9
|
+
.media-info {
|
|
10
|
+
width: 100%;
|
|
11
|
+
display: flex;
|
|
12
|
+
justify-content: space-between;
|
|
13
|
+
align-items: center;
|
|
14
|
+
background: rgba(36, 36, 36, 0.66);
|
|
15
|
+
background-color: $black;
|
|
16
|
+
border-bottom-left-radius: $border-radius;
|
|
17
|
+
border-bottom-right-radius: $border-radius;
|
|
18
|
+
padding: 13px 32px;
|
|
19
|
+
color: $tgo-white;
|
|
20
|
+
|
|
21
|
+
::ng-deep ui-button button {
|
|
22
|
+
border-color: $tgo-white;
|
|
23
|
+
color: $tgo-white;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.test-container {
|
|
28
|
+
min-width: 360px;
|
|
29
|
+
max-width: 1312px;
|
|
30
|
+
min-height: 725px;
|
|
31
|
+
height: min(
|
|
32
|
+
725px,
|
|
33
|
+
100%,
|
|
34
|
+
max(calc(100vw - 200px), calc(100vh - 200px), 200px)
|
|
35
|
+
);
|
|
36
|
+
border-radius: $border-radius;
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-direction: column;
|
|
39
|
+
justify-content: space-between;
|
|
40
|
+
position: relative;
|
|
41
|
+
background-color: $black;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.media-container {
|
|
45
|
+
position: relative;
|
|
46
|
+
color: $tgo-white;
|
|
47
|
+
flex-grow: 1;
|
|
48
|
+
border-top-left-radius: $border-radius;
|
|
49
|
+
border-top-right-radius: $border-radius;
|
|
50
|
+
aspect-ratio: 16 / 9;
|
|
51
|
+
|
|
52
|
+
.candidate-no-camera {
|
|
53
|
+
position: absolute;
|
|
54
|
+
width: 200px;
|
|
55
|
+
aspect-ratio: 16 / 9;
|
|
56
|
+
z-index: 3;
|
|
57
|
+
top: 32px;
|
|
58
|
+
left: 32px;
|
|
59
|
+
border-radius: $border-radius;
|
|
60
|
+
background-color: #1a47aa;
|
|
61
|
+
display: flex;
|
|
62
|
+
justify-content: space-between;
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
padding: 16px;
|
|
65
|
+
|
|
66
|
+
ui-icon {
|
|
67
|
+
margin: auto;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.candidate-camera {
|
|
72
|
+
position: absolute;
|
|
73
|
+
width: 200px;
|
|
74
|
+
top: 32px;
|
|
75
|
+
left: 32px;
|
|
76
|
+
z-index: 3;
|
|
77
|
+
|
|
78
|
+
video {
|
|
79
|
+
width: 200px;
|
|
80
|
+
border-radius: $border-radius;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
h3 {
|
|
84
|
+
position: absolute;
|
|
85
|
+
bottom: 16px;
|
|
86
|
+
left: 16px;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
tgo-audio-animation {
|
|
91
|
+
position: absolute;
|
|
92
|
+
top: 32px;
|
|
93
|
+
right: 32px;
|
|
94
|
+
z-index: 1;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
tgo-vimeo-video {
|
|
98
|
+
display: none;
|
|
99
|
+
position: absolute;
|
|
100
|
+
height: 100%;
|
|
101
|
+
width: 100%;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&.is-video-visible {
|
|
105
|
+
tgo-vimeo-video {
|
|
106
|
+
display: block;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
&.is-playing {
|
|
111
|
+
border: 4px solid $informative-40;
|
|
112
|
+
border-bottom-width: 3px;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
&.is-answering {
|
|
116
|
+
.candidate-camera,
|
|
117
|
+
.candidate-no-camera {
|
|
118
|
+
tgo-audio-animation {
|
|
119
|
+
position: absolute;
|
|
120
|
+
top: 16px;
|
|
121
|
+
right: 16px;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.candidate-camera video,
|
|
126
|
+
.candidate-no-camera {
|
|
127
|
+
border: 3px solid $informative-40;
|
|
128
|
+
border-radius: $border-radius;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
tgo-vimeo-video {
|
|
132
|
+
display: block;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.start,
|
|
137
|
+
.audio-info,
|
|
138
|
+
.overlay,
|
|
139
|
+
.answer {
|
|
140
|
+
display: flex;
|
|
141
|
+
justify-content: center;
|
|
142
|
+
align-items: center;
|
|
143
|
+
flex-direction: column;
|
|
144
|
+
gap: 40px;
|
|
145
|
+
height: 100%;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.preview {
|
|
149
|
+
height: 100%;
|
|
150
|
+
display: flex;
|
|
151
|
+
align-items: center;
|
|
152
|
+
flex-direction: column;
|
|
153
|
+
justify-content: flex-end;
|
|
154
|
+
padding: 24px;
|
|
155
|
+
|
|
156
|
+
p {
|
|
157
|
+
color: $grayscale-30;
|
|
158
|
+
margin: 8px 0;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
audio {
|
|
162
|
+
margin: 16px 0;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
&.hidden {
|
|
166
|
+
display: none;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
h3,
|
|
172
|
+
h4 {
|
|
173
|
+
color: $tgo-white;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.bold {
|
|
177
|
+
font-weight: 700;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
ui-button.review-button ::ng-deep button {
|
|
181
|
+
border: 1px solid $tgo-white;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
ui-button.white-btn ::ng-deep button {
|
|
185
|
+
background-color: $tgo-white;
|
|
186
|
+
border-color: $tgo-white;
|
|
187
|
+
color: $tgo-black;
|
|
188
|
+
|
|
189
|
+
&:hover {
|
|
190
|
+
background-color: $grayscale-50 !important;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.overlay {
|
|
195
|
+
top: 0;
|
|
196
|
+
position: absolute;
|
|
197
|
+
width: 100%;
|
|
198
|
+
height: 100%;
|
|
199
|
+
background-color: rgb(36 36 36 / 88%);
|
|
200
|
+
z-index: 2;
|
|
201
|
+
border-radius: $border-radius;
|
|
202
|
+
|
|
203
|
+
h1,
|
|
204
|
+
h3 {
|
|
205
|
+
color: $tgo-white;
|
|
206
|
+
text-align: center;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
h3 {
|
|
210
|
+
margin-bottom: 10px;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
tgo-radial-progress {
|
|
215
|
+
position: absolute;
|
|
216
|
+
top: 50%;
|
|
217
|
+
left: 50%;
|
|
218
|
+
transform: translate(-50%, -50%);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.uppercase {
|
|
222
|
+
text-transform: uppercase;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.recording-started {
|
|
226
|
+
display: flex;
|
|
227
|
+
align-items: center;
|
|
228
|
+
justify-content: center;
|
|
229
|
+
gap: 10px;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.recording-dot {
|
|
233
|
+
background-color: $error-40;
|
|
234
|
+
display: inline-block;
|
|
235
|
+
width: 20px;
|
|
236
|
+
height: 20px;
|
|
237
|
+
border-radius: 50%;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
@media screen and (max-width: 600px) {
|
|
242
|
+
.immersive-test {
|
|
243
|
+
padding: 0 24px;
|
|
244
|
+
margin-top: 16px;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|