mirror of
https://github.com/mudita/mudita-center.git
synced 2025-12-23 22:28:03 -05:00
Merge stage 3.2.0 to the main branch (#2664)
This commit is contained in:
@@ -20,8 +20,8 @@ LOCALAPPDATA=
|
||||
# [Setup Mode] URL for mudita-dev-resources repo where gt-pressura font is placed
|
||||
FONTS_DIRECTORY_URL=
|
||||
|
||||
# [Setup Mode] Access token for dummy-account that has an access to Mudita private repositories
|
||||
GITHUB_ACCESS_TOKEN=
|
||||
# [Setup Mode] Access token to fetch fonts from private Mudita repos (build-time only, not bundled)
|
||||
GH_BUILD_TOKEN=
|
||||
|
||||
# [Standard] Phrase.com
|
||||
PHRASE_API_KEY=
|
||||
@@ -57,6 +57,9 @@ ANALYTICS_API_SITE_ID=
|
||||
# [Standard] Defines current feature toggles environment
|
||||
FEATURE_TOGGLE_ENVIRONMENT=
|
||||
|
||||
# [Dev Mode] Access token used at runtime by the app for non-production update checks only
|
||||
VITE_GH_RUNTIME_TOKEN=
|
||||
|
||||
# [Dev Mode] Disable redux logger during development. Enabled by default; set "0" to disable
|
||||
DEV_REDUX_LOGGER_ENABLED=
|
||||
|
||||
|
||||
6
.github/workflows/e2e-development.yml
vendored
6
.github/workflows/e2e-development.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
||||
if: matrix.runner_label == 'linux-e2e'
|
||||
env:
|
||||
E2ECI: "true"
|
||||
TEST_BINARY_PATH: "../mudita-center/release/linux-unpacked/Mudita Center"
|
||||
TEST_BINARY_PATH: "../mudita-center/release/linux-unpacked/mudita-center"
|
||||
PHRASE_API_KEY: ${{ secrets.PHRASE_API_KEY }}
|
||||
PHRASE_API_URL: ${{ secrets.PHRASE_API_URL }}
|
||||
PHRASE_API_KEY_DEV: ${{ secrets.PHRASE_API_KEY_DEV }}
|
||||
@@ -31,7 +31,7 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
@@ -59,7 +59,7 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
|
||||
8
.github/workflows/e2e-feature-branch.yml
vendored
8
.github/workflows/e2e-feature-branch.yml
vendored
@@ -27,7 +27,7 @@ jobs:
|
||||
if: matrix.runner_label == 'linux-e2e'
|
||||
env:
|
||||
E2ECI: "true"
|
||||
TEST_BINARY_PATH: "../mudita-center/release/linux-unpacked/Mudita Center"
|
||||
TEST_BINARY_PATH: "../mudita-center/release/linux-unpacked/mudita-center"
|
||||
PHRASE_API_KEY: ${{ secrets.PHRASE_API_KEY }}
|
||||
PHRASE_API_URL: ${{ secrets.PHRASE_API_URL }}
|
||||
PHRASE_API_KEY_DEV: ${{ secrets.PHRASE_API_KEY_DEV }}
|
||||
@@ -35,7 +35,7 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
@@ -63,7 +63,7 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
@@ -91,7 +91,7 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
|
||||
8
.github/workflows/e2e-mock-development.yml
vendored
8
.github/workflows/e2e-mock-development.yml
vendored
@@ -9,7 +9,7 @@ jobs:
|
||||
runs-on: ${{ matrix.runner_label }}
|
||||
strategy:
|
||||
matrix:
|
||||
runner_label: [ linux-e2e, windows-e2e ]
|
||||
runner_label: [linux-e2e, windows-e2e]
|
||||
environment: development
|
||||
timeout-minutes: 40
|
||||
steps:
|
||||
@@ -23,7 +23,7 @@ jobs:
|
||||
if: matrix.runner_label == 'linux-e2e'
|
||||
env:
|
||||
E2ECI: "true"
|
||||
TEST_BINARY_PATH: "../mudita-center/release/linux-unpacked/Mudita Center"
|
||||
TEST_BINARY_PATH: "../mudita-center/release/linux-unpacked/mudita-center"
|
||||
PHRASE_API_KEY: ${{ secrets.PHRASE_API_KEY }}
|
||||
PHRASE_API_URL: ${{ secrets.PHRASE_API_URL }}
|
||||
PHRASE_API_KEY_DEV: ${{ secrets.PHRASE_API_KEY_DEV }}
|
||||
@@ -31,7 +31,7 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
@@ -59,7 +59,7 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
|
||||
@@ -27,7 +27,7 @@ jobs:
|
||||
if: matrix.runner_label == 'linux-e2e'
|
||||
env:
|
||||
E2ECI: "true"
|
||||
TEST_BINARY_PATH: "../mudita-center/release/linux-unpacked/Mudita Center"
|
||||
TEST_BINARY_PATH: "../mudita-center/release/linux-unpacked/mudita-center"
|
||||
PHRASE_API_KEY: ${{ secrets.PHRASE_API_KEY }}
|
||||
PHRASE_API_URL: ${{ secrets.PHRASE_API_URL }}
|
||||
PHRASE_API_KEY_DEV: ${{ secrets.PHRASE_API_KEY_DEV }}
|
||||
@@ -35,7 +35,7 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
@@ -63,7 +63,7 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
|
||||
@@ -25,7 +25,7 @@ jobs:
|
||||
if: matrix.runner_label == 'linux-e2e'
|
||||
env:
|
||||
E2ECI: "true"
|
||||
TEST_BINARY_PATH: "../mudita-center/release/linux-unpacked/Mudita Center"
|
||||
TEST_BINARY_PATH: "../mudita-center/release/linux-unpacked/mudita-center"
|
||||
PHRASE_API_KEY: ${{ secrets.PHRASE_API_KEY }}
|
||||
PHRASE_API_URL: ${{ secrets.PHRASE_API_URL }}
|
||||
PHRASE_API_KEY_DEV: ${{ secrets.PHRASE_API_KEY_DEV }}
|
||||
@@ -33,7 +33,7 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
@@ -61,7 +61,7 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
|
||||
6
.github/workflows/e2e-mock-production.yml
vendored
6
.github/workflows/e2e-mock-production.yml
vendored
@@ -25,7 +25,7 @@ jobs:
|
||||
if: matrix.runner_label == 'linux-e2e'
|
||||
env:
|
||||
E2ECI: "true"
|
||||
TEST_BINARY_PATH: "../mudita-center/release/linux-unpacked/Mudita Center"
|
||||
TEST_BINARY_PATH: "../mudita-center/release/linux-unpacked/mudita-center"
|
||||
PHRASE_API_KEY: ${{ secrets.PHRASE_API_KEY }}
|
||||
PHRASE_API_URL: ${{ secrets.PHRASE_API_URL }}
|
||||
PHRASE_API_KEY_DEV: ${{ secrets.PHRASE_API_KEY_DEV }}
|
||||
@@ -33,7 +33,7 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
@@ -61,7 +61,7 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
|
||||
8
.github/workflows/e2e-pre-production.yml
vendored
8
.github/workflows/e2e-pre-production.yml
vendored
@@ -11,7 +11,7 @@ jobs:
|
||||
runs-on: ${{ matrix.runner_label }}
|
||||
strategy:
|
||||
matrix:
|
||||
runner_label: [ linux-e2e, windows-e2e ]
|
||||
runner_label: [linux-e2e, windows-e2e]
|
||||
environment: pre-production
|
||||
timeout-minutes: 40
|
||||
steps:
|
||||
@@ -25,7 +25,7 @@ jobs:
|
||||
if: matrix.runner_label == 'linux-e2e'
|
||||
env:
|
||||
E2ECI: "true"
|
||||
TEST_BINARY_PATH: "../mudita-center/release/linux-unpacked/Mudita Center"
|
||||
TEST_BINARY_PATH: "../mudita-center/release/linux-unpacked/mudita-center"
|
||||
PHRASE_API_KEY: ${{ secrets.PHRASE_API_KEY }}
|
||||
PHRASE_API_URL: ${{ secrets.PHRASE_API_URL }}
|
||||
PHRASE_API_KEY_DEV: ${{ secrets.PHRASE_API_KEY_DEV }}
|
||||
@@ -33,7 +33,7 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
@@ -61,7 +61,7 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
|
||||
6
.github/workflows/e2e-production.yml
vendored
6
.github/workflows/e2e-production.yml
vendored
@@ -25,7 +25,7 @@ jobs:
|
||||
if: matrix.runner_label == 'linux-e2e'
|
||||
env:
|
||||
E2ECI: "true"
|
||||
TEST_BINARY_PATH: "../mudita-center/release/linux-unpacked/Mudita Center"
|
||||
TEST_BINARY_PATH: "../mudita-center/release/linux-unpacked/mudita-center"
|
||||
PHRASE_API_KEY: ${{ secrets.PHRASE_API_KEY }}
|
||||
PHRASE_API_URL: ${{ secrets.PHRASE_API_URL }}
|
||||
PHRASE_API_KEY_DEV: ${{ secrets.PHRASE_API_KEY_DEV }}
|
||||
@@ -33,7 +33,7 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
@@ -61,7 +61,7 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
|
||||
21
.github/workflows/nexus-development.yml
vendored
21
.github/workflows/nexus-development.yml
vendored
@@ -30,7 +30,8 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
VITE_GH_RUNTIME_TOKEN: ${{ secrets.VITE_GH_RUNTIME_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
@@ -59,7 +60,8 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
VITE_GH_RUNTIME_TOKEN: ${{ secrets.VITE_GH_RUNTIME_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
@@ -85,7 +87,8 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
VITE_GH_RUNTIME_TOKEN: ${{ secrets.VITE_GH_RUNTIME_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
@@ -172,7 +175,7 @@ jobs:
|
||||
Invoke-WebRequest -Uri https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$($APP_VERSION)/Mudita-Center.exe.blockmap -InFile ./apps/mudita-center/release/Mudita-Center.exe.blockmap -Method Put -Credential $AUTH
|
||||
Invoke-WebRequest -Uri https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$($APP_VERSION)/latest.yml -InFile ./apps/mudita-center/release/latest.yml -Method Put -Credential $AUTH
|
||||
Invoke-WebRequest -Uri https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$($APP_VERSION)/builder-debug-win.yml -InFile ./apps/mudita-center/release/builder-debug-win.yml -Method Put -Credential $AUTH
|
||||
C:\"Program Files"\Git\cmd\git.exe clone https://${{ secrets.MC_GITHUB_ACCESS_TOKEN }}@github.com/mudita/mudita-center-development.git
|
||||
C:\"Program Files"\Git\cmd\git.exe clone https://${{ secrets.GH_BUILD_TOKEN }}@github.com/mudita/mudita-center-development.git
|
||||
cd mudita-center-development
|
||||
C:\"Program Files"\Git\cmd\git.exe tag "$GITTAG"
|
||||
C:\"Program Files"\Git\cmd\git.exe push origin "$GITTAG"
|
||||
@@ -193,7 +196,7 @@ jobs:
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/Mudita-Center.AppImage https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/Mudita-Center.AppImage
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/latest-linux.yml https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/latest-linux.yml
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/builder-debug-linux.yml https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/builder-debug-linux.yml
|
||||
git clone https://${{ secrets.MC_GITHUB_ACCESS_TOKEN }}@github.com/mudita/mudita-center-development.git
|
||||
git clone https://${{ secrets.GH_BUILD_TOKEN }}@github.com/mudita/mudita-center-development.git
|
||||
cd mudita-center-development
|
||||
git tag "$GITTAG" 2>&1 || true
|
||||
git push origin "$GITTAG"
|
||||
@@ -217,7 +220,7 @@ jobs:
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/Mudita-Center.dmg.blockmap https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/Mudita-Center.dmg.blockmap
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/latest-mac.yml https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/latest-mac.yml
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/builder-debug-mac.yml https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/builder-debug-mac.yml
|
||||
git clone https://${{ secrets.MC_GITHUB_ACCESS_TOKEN }}@github.com/mudita/mudita-center-development.git
|
||||
git clone https://${{ secrets.GH_BUILD_TOKEN }}@github.com/mudita/mudita-center-development.git
|
||||
cd mudita-center-development
|
||||
git tag "$GITTAG" 2>&1 || true
|
||||
git push origin "$GITTAG"
|
||||
@@ -229,7 +232,7 @@ jobs:
|
||||
tag_name: ${{ env.GITTAG }}
|
||||
name: Mudita Center v${{ env.GITTAG }}
|
||||
repository: mudita/mudita-center-development
|
||||
token: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
token: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
files: |
|
||||
./apps/mudita-center/release/Mudita-Center.exe
|
||||
./apps/mudita-center/release/Mudita-Center.exe.blockmap
|
||||
@@ -243,7 +246,7 @@ jobs:
|
||||
tag_name: ${{ env.GITTAG }}
|
||||
name: Mudita Center v${{ env.GITTAG }}
|
||||
repository: mudita/mudita-center-development
|
||||
token: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
token: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
files: |
|
||||
./apps/mudita-center/release/Mudita-Center.AppImage
|
||||
./apps/mudita-center/release/latest-linux.yml
|
||||
@@ -256,7 +259,7 @@ jobs:
|
||||
tag_name: ${{ env.GITTAG }}
|
||||
name: Mudita Center v${{ env.GITTAG }}
|
||||
repository: mudita/mudita-center-development
|
||||
token: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
token: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
files: |
|
||||
./apps/mudita-center/release/Mudita-Center.dmg
|
||||
./apps/mudita-center/release/Mudita-Center.zip
|
||||
|
||||
6
.github/workflows/nexus-feature-branch.yml
vendored
6
.github/workflows/nexus-feature-branch.yml
vendored
@@ -34,7 +34,7 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
@@ -63,7 +63,7 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
@@ -89,7 +89,7 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
|
||||
21
.github/workflows/nexus-mass-update.yml
vendored
21
.github/workflows/nexus-mass-update.yml
vendored
@@ -32,7 +32,8 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
VITE_GH_RUNTIME_TOKEN: ${{ secrets.VITE_GH_RUNTIME_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
@@ -60,7 +61,8 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
VITE_GH_RUNTIME_TOKEN: ${{ secrets.VITE_GH_RUNTIME_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
@@ -85,7 +87,8 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
VITE_GH_RUNTIME_TOKEN: ${{ secrets.VITE_GH_RUNTIME_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
@@ -203,7 +206,7 @@ jobs:
|
||||
Invoke-WebRequest -Uri https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$($APP_VERSION)/Mudita-Center.exe.blockmap -InFile ./apps/mudita-center/release/Mudita-Center.exe.blockmap -Method Put -Credential $AUTH
|
||||
Invoke-WebRequest -Uri https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$($APP_VERSION)/latest.yml -InFile ./apps/mudita-center/release/latest.yml -Method Put -Credential $AUTH
|
||||
Invoke-WebRequest -Uri https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$($APP_VERSION)/builder-debug-win.yml -InFile ./apps/mudita-center/release/builder-debug-win.yml -Method Put -Credential $AUTH
|
||||
C:\"Program Files"\Git\cmd\git.exe clone https://${{ secrets.MC_GITHUB_ACCESS_TOKEN }}@github.com/mudita/mudita-center-mass-update.git
|
||||
C:\"Program Files"\Git\cmd\git.exe clone https://${{ secrets.GH_BUILD_TOKEN }}@github.com/mudita/mudita-center-mass-update.git
|
||||
cd mudita-center-mass-update
|
||||
C:\"Program Files"\Git\cmd\git.exe tag "$GITTAG"
|
||||
C:\"Program Files"\Git\cmd\git.exe push origin "$GITTAG"
|
||||
@@ -224,7 +227,7 @@ jobs:
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/Mudita-Center.AppImage https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/Mudita-Center.AppImage
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/latest-linux.yml https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/latest-linux.yml
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/builder-debug-linux.yml https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/builder-debug-linux.yml
|
||||
git clone https://${{ secrets.MC_GITHUB_ACCESS_TOKEN }}@github.com/mudita/mudita-center-mass-update.git
|
||||
git clone https://${{ secrets.GH_BUILD_TOKEN }}@github.com/mudita/mudita-center-mass-update.git
|
||||
cd mudita-center-mass-update
|
||||
git tag "$GITTAG" 2>&1 || true
|
||||
git push origin "$GITTAG"
|
||||
@@ -248,7 +251,7 @@ jobs:
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/Mudita-Center.dmg.blockmap https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/Mudita-Center.dmg.blockmap
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/latest-mac.yml https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/latest-mac.yml
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/builder-debug-mac.yml https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/builder-debug-mac.yml
|
||||
git clone https://${{ secrets.MC_GITHUB_ACCESS_TOKEN }}@github.com/mudita/mudita-center-mass-update.git
|
||||
git clone https://${{ secrets.GH_BUILD_TOKEN }}@github.com/mudita/mudita-center-mass-update.git
|
||||
cd mudita-center-mass-update
|
||||
git tag "$GITTAG" 2>&1 || true
|
||||
git push origin "$GITTAG"
|
||||
@@ -260,7 +263,7 @@ jobs:
|
||||
tag_name: ${{ env.GITTAG }}
|
||||
name: Mudita Center v${{ env.GITTAG }}
|
||||
repository: mudita/mudita-center-mass-update
|
||||
token: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
token: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
files: |
|
||||
./apps/mudita-center/release/Mudita-Center.exe
|
||||
./apps/mudita-center/release/Mudita-Center.exe.blockmap
|
||||
@@ -274,7 +277,7 @@ jobs:
|
||||
tag_name: ${{ env.GITTAG }}
|
||||
name: Mudita Center v${{ env.GITTAG }}
|
||||
repository: mudita/mudita-center-mass-update
|
||||
token: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
token: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
files: |
|
||||
./apps/mudita-center/release/Mudita-Center.AppImage
|
||||
./apps/mudita-center/release/latest-linux.yml
|
||||
@@ -287,7 +290,7 @@ jobs:
|
||||
tag_name: ${{ env.GITTAG }}
|
||||
name: Mudita Center v${{ env.GITTAG }}
|
||||
repository: mudita/mudita-center-mass-update
|
||||
token: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
token: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
files: |
|
||||
./apps/mudita-center/release/Mudita-Center.dmg
|
||||
./apps/mudita-center/release/Mudita-Center.zip
|
||||
|
||||
15
.github/workflows/nexus-mock-development.yml
vendored
15
.github/workflows/nexus-mock-development.yml
vendored
@@ -30,7 +30,8 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
VITE_GH_RUNTIME_TOKEN: ${{ secrets.VITE_GH_RUNTIME_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
@@ -60,7 +61,8 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
VITE_GH_RUNTIME_TOKEN: ${{ secrets.VITE_GH_RUNTIME_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
@@ -87,7 +89,8 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
VITE_GH_RUNTIME_TOKEN: ${{ secrets.VITE_GH_RUNTIME_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
@@ -175,7 +178,7 @@ jobs:
|
||||
Invoke-WebRequest -Uri https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$($APP_VERSION)/Mudita-Center.exe.blockmap -InFile ./apps/mudita-center/release/Mudita-Center.exe.blockmap -Method Put -Credential $AUTH
|
||||
Invoke-WebRequest -Uri https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$($APP_VERSION)/latest.yml -InFile ./apps/mudita-center/release/latest.yml -Method Put -Credential $AUTH
|
||||
Invoke-WebRequest -Uri https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$($APP_VERSION)/builder-debug-win.yml -InFile ./apps/mudita-center/release/builder-debug-win.yml -Method Put -Credential $AUTH
|
||||
C:\"Program Files"\Git\cmd\git.exe clone https://${{ secrets.MC_GITHUB_ACCESS_TOKEN }}@github.com/mudita/mudita-center-development.git
|
||||
C:\"Program Files"\Git\cmd\git.exe clone https://${{ secrets.GH_BUILD_TOKEN }}@github.com/mudita/mudita-center-development.git
|
||||
cd mudita-center-development
|
||||
C:\"Program Files"\Git\cmd\git.exe tag "$GITTAG"
|
||||
C:\"Program Files"\Git\cmd\git.exe push origin "$GITTAG"
|
||||
@@ -196,7 +199,7 @@ jobs:
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/Mudita-Center.AppImage https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/Mudita-Center.AppImage
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/latest-linux.yml https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/latest-linux.yml
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/builder-debug-linux.yml https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/builder-debug-linux.yml
|
||||
git clone https://${{ secrets.MC_GITHUB_ACCESS_TOKEN }}@github.com/mudita/mudita-center-development.git
|
||||
git clone https://${{ secrets.GH_BUILD_TOKEN }}@github.com/mudita/mudita-center-development.git
|
||||
cd mudita-center-development
|
||||
git tag "$GITTAG" 2>&1 || true
|
||||
git push origin "$GITTAG"
|
||||
@@ -220,7 +223,7 @@ jobs:
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/Mudita-Center.dmg.blockmap https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/Mudita-Center.dmg.blockmap
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/latest-mac.yml https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/latest-mac.yml
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/builder-debug-mac.yml https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/builder-debug-mac.yml
|
||||
git clone https://${{ secrets.MC_GITHUB_ACCESS_TOKEN }}@github.com/mudita/mudita-center-development.git
|
||||
git clone https://${{ secrets.GH_BUILD_TOKEN }}@github.com/mudita/mudita-center-development.git
|
||||
cd mudita-center-development
|
||||
git tag "$GITTAG" 2>&1 || true
|
||||
git push origin "$GITTAG"
|
||||
|
||||
12
.github/workflows/nexus-mock-pre-production.yml
vendored
12
.github/workflows/nexus-mock-pre-production.yml
vendored
@@ -11,7 +11,7 @@ jobs:
|
||||
runs-on: ${{ matrix.runner_label }}
|
||||
strategy:
|
||||
matrix:
|
||||
runner_label: [ linux-nexus, windows-nexus, macos-nexus ]
|
||||
runner_label: [linux-nexus, windows-nexus, macos-nexus]
|
||||
environment: pre-production
|
||||
timeout-minutes: 40
|
||||
steps:
|
||||
@@ -32,7 +32,7 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
@@ -62,7 +62,7 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
@@ -143,7 +143,7 @@ jobs:
|
||||
Invoke-WebRequest -Uri https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$($APP_VERSION)/Mudita-Center.exe.blockmap -InFile ./apps/mudita-center/release/Mudita-Center.exe.blockmap -Method Put -Credential $AUTH
|
||||
Invoke-WebRequest -Uri https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$($APP_VERSION)/latest.yml -InFile ./apps/mudita-center/release/latest.yml -Method Put -Credential $AUTH
|
||||
Invoke-WebRequest -Uri https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$($APP_VERSION)/builder-debug-win.yml -InFile ./apps/mudita-center/release/builder-debug-win.yml -Method Put -Credential $AUTH
|
||||
C:\"Program Files"\Git\cmd\git.exe clone https://${{ secrets.MC_GITHUB_ACCESS_TOKEN }}@github.com/mudita/mudita-center-pre-production.git
|
||||
C:\"Program Files"\Git\cmd\git.exe clone https://${{ secrets.GH_BUILD_TOKEN }}@github.com/mudita/mudita-center-pre-production.git
|
||||
cd mudita-center-pre-production
|
||||
C:\"Program Files"\Git\cmd\git.exe tag "$GITTAG"
|
||||
C:\"Program Files"\Git\cmd\git.exe push origin "$GITTAG"
|
||||
@@ -161,7 +161,7 @@ jobs:
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/Mudita-Center.AppImage https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/Mudita-Center.AppImage
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/latest-linux.yml https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/latest-linux.yml
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/builder-debug-linux.yml https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/builder-debug-linux.yml
|
||||
git clone https://${{ secrets.MC_GITHUB_ACCESS_TOKEN }}@github.com/mudita/mudita-center-pre-production.git
|
||||
git clone https://${{ secrets.GH_BUILD_TOKEN }}@github.com/mudita/mudita-center-pre-production.git
|
||||
cd mudita-center-pre-production
|
||||
git tag "$GITTAG" 2>&1 || true
|
||||
git push origin "$GITTAG"
|
||||
@@ -182,7 +182,7 @@ jobs:
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/Mudita-Center.dmg.blockmap https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/Mudita-Center.dmg.blockmap
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/latest-mac.yml https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/latest-mac.yml
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/builder-debug-mac.yml https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/builder-debug-mac.yml
|
||||
git clone https://${{ secrets.MC_GITHUB_ACCESS_TOKEN }}@github.com/mudita/mudita-center-pre-production.git
|
||||
git clone https://${{ secrets.GH_BUILD_TOKEN }}@github.com/mudita/mudita-center-pre-production.git
|
||||
cd mudita-center-pre-production
|
||||
git tag "$GITTAG" 2>&1 || true
|
||||
git push origin "$GITTAG"
|
||||
|
||||
10
.github/workflows/nexus-mock-production.yml
vendored
10
.github/workflows/nexus-mock-production.yml
vendored
@@ -32,7 +32,7 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
@@ -62,7 +62,7 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
@@ -143,7 +143,7 @@ jobs:
|
||||
Invoke-WebRequest -Uri https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$($APP_VERSION)/Mudita-Center.exe.blockmap -InFile ./apps/mudita-center/release/Mudita-Center.exe.blockmap -Method Put -Credential $AUTH
|
||||
Invoke-WebRequest -Uri https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$($APP_VERSION)/latest.yml -InFile ./apps/mudita-center/release/latest.yml -Method Put -Credential $AUTH
|
||||
Invoke-WebRequest -Uri https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$($APP_VERSION)/builder-debug-win.yml -InFile ./apps/mudita-center/release/builder-debug-win.yml -Method Put -Credential $AUTH
|
||||
C:\"Program Files"\Git\cmd\git.exe clone https://${{ secrets.MC_GITHUB_ACCESS_TOKEN }}@github.com/mudita/mudita-center.git
|
||||
C:\"Program Files"\Git\cmd\git.exe clone https://${{ secrets.GH_BUILD_TOKEN }}@github.com/mudita/mudita-center.git
|
||||
cd mudita-center
|
||||
C:\"Program Files"\Git\cmd\git.exe tag "$GITTAG"
|
||||
C:\"Program Files"\Git\cmd\git.exe push origin "$GITTAG"
|
||||
@@ -161,7 +161,7 @@ jobs:
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/Mudita-Center.AppImage https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/Mudita-Center.AppImage
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/latest-linux.yml https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/latest-linux.yml
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/builder-debug-linux.yml https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/builder-debug-linux.yml
|
||||
git clone https://${{ secrets.MC_GITHUB_ACCESS_TOKEN }}@github.com/mudita/mudita-center.git
|
||||
git clone https://${{ secrets.GH_BUILD_TOKEN }}@github.com/mudita/mudita-center.git
|
||||
cd mudita-center
|
||||
git tag "$GITTAG" 2>&1 || true
|
||||
git push origin "$GITTAG"
|
||||
@@ -182,7 +182,7 @@ jobs:
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/Mudita-Center.dmg.blockmap https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/Mudita-Center.dmg.blockmap
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/latest-mac.yml https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/latest-mac.yml
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/builder-debug-mac.yml https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/builder-debug-mac.yml
|
||||
git clone https://${{ secrets.MC_GITHUB_ACCESS_TOKEN }}@github.com/mudita/mudita-center.git
|
||||
git clone https://${{ secrets.GH_BUILD_TOKEN }}@github.com/mudita/mudita-center.git
|
||||
cd mudita-center
|
||||
git tag "$GITTAG" 2>&1 || true
|
||||
git push origin "$GITTAG"
|
||||
|
||||
@@ -33,7 +33,8 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
VITE_GH_RUNTIME_TOKEN: ${{ secrets.VITE_GH_RUNTIME_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
@@ -61,7 +62,8 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
VITE_GH_RUNTIME_TOKEN: ${{ secrets.VITE_GH_RUNTIME_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
@@ -86,7 +88,8 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
VITE_GH_RUNTIME_TOKEN: ${{ secrets.VITE_GH_RUNTIME_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
@@ -151,10 +154,10 @@ jobs:
|
||||
} | Set-Content -Path 'apps/mudita-center/package.json'
|
||||
- name: Setup depedencies
|
||||
run: npm run setup
|
||||
# - name: Copy electron-builder environment file for Windows
|
||||
# if: matrix.runner_label == 'windows-nexus'
|
||||
# run: |
|
||||
# copy C:\actions-runner\envs\electron-builder.env apps/mudita-center/electron-builder.env
|
||||
# - name: Copy electron-builder environment file for Windows
|
||||
# if: matrix.runner_label == 'windows-nexus'
|
||||
# run: |
|
||||
# copy C:\actions-runner\envs\electron-builder.env apps/mudita-center/electron-builder.env
|
||||
- name: Copy electron-builder environment file for Linux/Mac
|
||||
if: matrix.runner_label != 'windows-nexus'
|
||||
run: |
|
||||
@@ -225,7 +228,7 @@ jobs:
|
||||
Invoke-WebRequest -Uri https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$($APP_VERSION)/Mudita-Center.exe.blockmap -InFile ./apps/mudita-center/release/Mudita-Center.exe.blockmap -Method Put -Credential $AUTH
|
||||
Invoke-WebRequest -Uri https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$($APP_VERSION)/latest.yml -InFile ./apps/mudita-center/release/latest.yml -Method Put -Credential $AUTH
|
||||
Invoke-WebRequest -Uri https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$($APP_VERSION)/builder-debug-win.yml -InFile ./apps/mudita-center/release/builder-debug-win.yml -Method Put -Credential $AUTH
|
||||
C:\"Program Files"\Git\cmd\git.exe clone https://${{ secrets.MC_GITHUB_ACCESS_TOKEN }}@github.com/mudita/mudita-center-pre-production.git
|
||||
C:\"Program Files"\Git\cmd\git.exe clone https://${{ secrets.GH_BUILD_TOKEN }}@github.com/mudita/mudita-center-pre-production.git
|
||||
cd mudita-center-pre-production
|
||||
C:\"Program Files"\Git\cmd\git.exe tag "$GITTAG"
|
||||
C:\"Program Files"\Git\cmd\git.exe push origin "$GITTAG"
|
||||
@@ -243,7 +246,7 @@ jobs:
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/Mudita-Center.AppImage https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/Mudita-Center.AppImage
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/latest-linux.yml https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/latest-linux.yml
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/builder-debug-linux.yml https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/builder-debug-linux.yml
|
||||
git clone https://${{ secrets.MC_GITHUB_ACCESS_TOKEN }}@github.com/mudita/mudita-center-pre-production.git
|
||||
git clone https://${{ secrets.GH_BUILD_TOKEN }}@github.com/mudita/mudita-center-pre-production.git
|
||||
cd mudita-center-pre-production
|
||||
git tag "$GITTAG" 2>&1 || true
|
||||
git push origin "$GITTAG"
|
||||
@@ -264,7 +267,7 @@ jobs:
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/Mudita-Center.dmg.blockmap https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/Mudita-Center.dmg.blockmap
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/latest-mac.yml https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/latest-mac.yml
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/builder-debug-mac.yml https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/builder-debug-mac.yml
|
||||
git clone https://${{ secrets.MC_GITHUB_ACCESS_TOKEN }}@github.com/mudita/mudita-center-pre-production.git
|
||||
git clone https://${{ secrets.GH_BUILD_TOKEN }}@github.com/mudita/mudita-center-pre-production.git
|
||||
cd mudita-center-pre-production
|
||||
git tag "$GITTAG" 2>&1 || true
|
||||
git push origin "$GITTAG"
|
||||
@@ -276,7 +279,7 @@ jobs:
|
||||
tag_name: ${{ env.GITTAG }}
|
||||
name: Mudita Center v${{ env.GITTAG }}
|
||||
repository: mudita/mudita-center-pre-production
|
||||
token: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
token: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
files: |
|
||||
./apps/mudita-center/release/Mudita-Center.exe
|
||||
./apps/mudita-center/release/Mudita-Center.exe.blockmap
|
||||
@@ -290,7 +293,7 @@ jobs:
|
||||
tag_name: ${{ env.GITTAG }}
|
||||
name: Mudita Center v${{ env.GITTAG }}
|
||||
repository: mudita/mudita-center-pre-production
|
||||
token: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
token: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
files: |
|
||||
./apps/mudita-center/release/Mudita-Center.AppImage
|
||||
./apps/mudita-center/release/latest-linux.yml
|
||||
@@ -303,7 +306,7 @@ jobs:
|
||||
tag_name: ${{ env.GITTAG }}
|
||||
name: Mudita Center v${{ env.GITTAG }}
|
||||
repository: mudita/mudita-center-pre-production
|
||||
token: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
token: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
files: |
|
||||
./apps/mudita-center/release/Mudita-Center.dmg
|
||||
./apps/mudita-center/release/Mudita-Center.zip
|
||||
|
||||
18
.github/workflows/nexus-pre-production.yml
vendored
18
.github/workflows/nexus-pre-production.yml
vendored
@@ -32,7 +32,8 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
VITE_GH_RUNTIME_TOKEN: ${{ secrets.VITE_GH_RUNTIME_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
@@ -60,7 +61,8 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
VITE_GH_RUNTIME_TOKEN: ${{ secrets.VITE_GH_RUNTIME_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
@@ -150,7 +152,7 @@ jobs:
|
||||
Invoke-WebRequest -Uri https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$($APP_VERSION)/Mudita-Center.exe.blockmap -InFile ./apps/mudita-center/release/Mudita-Center.exe.blockmap -Method Put -Credential $AUTH
|
||||
Invoke-WebRequest -Uri https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$($APP_VERSION)/latest.yml -InFile ./apps/mudita-center/release/latest.yml -Method Put -Credential $AUTH
|
||||
Invoke-WebRequest -Uri https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$($APP_VERSION)/builder-debug-win.yml -InFile ./apps/mudita-center/release/builder-debug-win.yml -Method Put -Credential $AUTH
|
||||
C:\"Program Files"\Git\cmd\git.exe clone https://${{ secrets.MC_GITHUB_ACCESS_TOKEN }}@github.com/mudita/mudita-center-pre-production.git
|
||||
C:\"Program Files"\Git\cmd\git.exe clone https://${{ secrets.GH_BUILD_TOKEN }}@github.com/mudita/mudita-center-pre-production.git
|
||||
cd mudita-center-pre-production
|
||||
C:\"Program Files"\Git\cmd\git.exe tag "$GITTAG"
|
||||
C:\"Program Files"\Git\cmd\git.exe push origin "$GITTAG"
|
||||
@@ -168,7 +170,7 @@ jobs:
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/Mudita-Center.AppImage https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/Mudita-Center.AppImage
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/latest-linux.yml https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/latest-linux.yml
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/builder-debug-linux.yml https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/builder-debug-linux.yml
|
||||
git clone https://${{ secrets.MC_GITHUB_ACCESS_TOKEN }}@github.com/mudita/mudita-center-pre-production.git
|
||||
git clone https://${{ secrets.GH_BUILD_TOKEN }}@github.com/mudita/mudita-center-pre-production.git
|
||||
cd mudita-center-pre-production
|
||||
git tag "$GITTAG" 2>&1 || true
|
||||
git push origin "$GITTAG"
|
||||
@@ -189,7 +191,7 @@ jobs:
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/Mudita-Center.dmg.blockmap https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/Mudita-Center.dmg.blockmap
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/latest-mac.yml https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/latest-mac.yml
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/builder-debug-mac.yml https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/builder-debug-mac.yml
|
||||
git clone https://${{ secrets.MC_GITHUB_ACCESS_TOKEN }}@github.com/mudita/mudita-center-pre-production.git
|
||||
git clone https://${{ secrets.GH_BUILD_TOKEN }}@github.com/mudita/mudita-center-pre-production.git
|
||||
cd mudita-center-pre-production
|
||||
git tag "$GITTAG" 2>&1 || true
|
||||
git push origin "$GITTAG"
|
||||
@@ -201,7 +203,7 @@ jobs:
|
||||
tag_name: ${{ env.GITTAG }}
|
||||
name: Mudita Center v${{ env.GITTAG }}
|
||||
repository: mudita/mudita-center-pre-production
|
||||
token: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
token: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
files: |
|
||||
./apps/mudita-center/release/Mudita-Center.exe
|
||||
./apps/mudita-center/release/Mudita-Center.exe.blockmap
|
||||
@@ -215,7 +217,7 @@ jobs:
|
||||
tag_name: ${{ env.GITTAG }}
|
||||
name: Mudita Center v${{ env.GITTAG }}
|
||||
repository: mudita/mudita-center-pre-production
|
||||
token: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
token: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
files: |
|
||||
./apps/mudita-center/release/Mudita-Center.AppImage
|
||||
./apps/mudita-center/release/latest-linux.yml
|
||||
@@ -228,7 +230,7 @@ jobs:
|
||||
tag_name: ${{ env.GITTAG }}
|
||||
name: Mudita Center v${{ env.GITTAG }}
|
||||
repository: mudita/mudita-center-pre-production
|
||||
token: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
token: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
files: |
|
||||
./apps/mudita-center/release/Mudita-Center.dmg
|
||||
./apps/mudita-center/release/Mudita-Center.zip
|
||||
|
||||
@@ -32,7 +32,8 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
VITE_GH_RUNTIME_TOKEN: ${{ secrets.VITE_GH_RUNTIME_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
@@ -60,7 +61,8 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
VITE_GH_RUNTIME_TOKEN: ${{ secrets.VITE_GH_RUNTIME_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
@@ -85,7 +87,8 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
VITE_GH_RUNTIME_TOKEN: ${{ secrets.VITE_GH_RUNTIME_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
@@ -203,7 +206,7 @@ jobs:
|
||||
Invoke-WebRequest -Uri https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$($APP_VERSION)/Mudita-Center.exe.blockmap -InFile ./apps/mudita-center/release/Mudita-Center.exe.blockmap -Method Put -Credential $AUTH
|
||||
Invoke-WebRequest -Uri https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$($APP_VERSION)/latest.yml -InFile ./apps/mudita-center/release/latest.yml -Method Put -Credential $AUTH
|
||||
Invoke-WebRequest -Uri https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$($APP_VERSION)/builder-debug-win.yml -InFile ./apps/mudita-center/release/builder-debug-win.yml -Method Put -Credential $AUTH
|
||||
C:\"Program Files"\Git\cmd\git.exe clone https://${{ secrets.MC_GITHUB_ACCESS_TOKEN }}@github.com/mudita/mudita-center-production-with-os-rc.git
|
||||
C:\"Program Files"\Git\cmd\git.exe clone https://${{ secrets.GH_BUILD_TOKEN }}@github.com/mudita/mudita-center-production-with-os-rc.git
|
||||
cd mudita-center-production-with-os-rc
|
||||
C:\"Program Files"\Git\cmd\git.exe tag "$GITTAG"
|
||||
C:\"Program Files"\Git\cmd\git.exe push origin "$GITTAG"
|
||||
@@ -224,7 +227,7 @@ jobs:
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/Mudita-Center.AppImage https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/Mudita-Center.AppImage
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/latest-linux.yml https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/latest-linux.yml
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/builder-debug-linux.yml https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/builder-debug-linux.yml
|
||||
git clone https://${{ secrets.MC_GITHUB_ACCESS_TOKEN }}@github.com/mudita/mudita-center-production-with-os-rc.git
|
||||
git clone https://${{ secrets.GH_BUILD_TOKEN }}@github.com/mudita/mudita-center-production-with-os-rc.git
|
||||
cd mudita-center-production-with-os-rc
|
||||
git tag "$GITTAG" 2>&1 || true
|
||||
git push origin "$GITTAG"
|
||||
@@ -248,7 +251,7 @@ jobs:
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/Mudita-Center.dmg.blockmap https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/Mudita-Center.dmg.blockmap
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/latest-mac.yml https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/latest-mac.yml
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/builder-debug-mac.yml https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/builder-debug-mac.yml
|
||||
git clone https://${{ secrets.MC_GITHUB_ACCESS_TOKEN }}@github.com/mudita/mudita-center-production-with-os-rc.git
|
||||
git clone https://${{ secrets.GH_BUILD_TOKEN }}@github.com/mudita/mudita-center-production-with-os-rc.git
|
||||
cd mudita-center-production-with-os-rc
|
||||
git tag "$GITTAG" 2>&1 || true
|
||||
git push origin "$GITTAG"
|
||||
@@ -260,7 +263,7 @@ jobs:
|
||||
tag_name: ${{ env.GITTAG }}
|
||||
name: Mudita Center v${{ env.GITTAG }}
|
||||
repository: mudita/mudita-center-production-with-os-rc
|
||||
token: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
token: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
files: |
|
||||
./apps/mudita-center/release/Mudita-Center.exe
|
||||
./apps/mudita-center/release/Mudita-Center.exe.blockmap
|
||||
@@ -274,7 +277,7 @@ jobs:
|
||||
tag_name: ${{ env.GITTAG }}
|
||||
name: Mudita Center v${{ env.GITTAG }}
|
||||
repository: mudita/mudita-center-production-with-os-rc
|
||||
token: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
token: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
files: |
|
||||
./apps/mudita-center/release/Mudita-Center.AppImage
|
||||
./apps/mudita-center/release/latest-linux.yml
|
||||
@@ -287,7 +290,7 @@ jobs:
|
||||
tag_name: ${{ env.GITTAG }}
|
||||
name: Mudita Center v${{ env.GITTAG }}
|
||||
repository: mudita/mudita-center-production-with-os-rc
|
||||
token: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
token: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
files: |
|
||||
./apps/mudita-center/release/Mudita-Center.dmg
|
||||
./apps/mudita-center/release/Mudita-Center.zip
|
||||
|
||||
16
.github/workflows/nexus-production.yml
vendored
16
.github/workflows/nexus-production.yml
vendored
@@ -32,7 +32,7 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
@@ -60,7 +60,7 @@ jobs:
|
||||
ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }}
|
||||
RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }}
|
||||
PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }}
|
||||
GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
GH_BUILD_TOKEN: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }}
|
||||
FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }}
|
||||
FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }}
|
||||
@@ -150,7 +150,7 @@ jobs:
|
||||
Invoke-WebRequest -Uri https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$($APP_VERSION)/Mudita-Center.exe.blockmap -InFile ./apps/mudita-center/release/Mudita-Center.exe.blockmap -Method Put -Credential $AUTH
|
||||
Invoke-WebRequest -Uri https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$($APP_VERSION)/latest.yml -InFile ./apps/mudita-center/release/latest.yml -Method Put -Credential $AUTH
|
||||
Invoke-WebRequest -Uri https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$($APP_VERSION)/builder-debug-win.yml -InFile ./apps/mudita-center/release/builder-debug-win.yml -Method Put -Credential $AUTH
|
||||
C:\"Program Files"\Git\cmd\git.exe clone https://${{ secrets.MC_GITHUB_ACCESS_TOKEN }}@github.com/mudita/mudita-center.git
|
||||
C:\"Program Files"\Git\cmd\git.exe clone https://${{ secrets.GH_BUILD_TOKEN }}@github.com/mudita/mudita-center.git
|
||||
cd mudita-center
|
||||
C:\"Program Files"\Git\cmd\git.exe tag "$GITTAG"
|
||||
C:\"Program Files"\Git\cmd\git.exe push origin "$GITTAG"
|
||||
@@ -168,7 +168,7 @@ jobs:
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/Mudita-Center.AppImage https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/Mudita-Center.AppImage
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/latest-linux.yml https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/latest-linux.yml
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/builder-debug-linux.yml https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/builder-debug-linux.yml
|
||||
git clone https://${{ secrets.MC_GITHUB_ACCESS_TOKEN }}@github.com/mudita/mudita-center.git
|
||||
git clone https://${{ secrets.GH_BUILD_TOKEN }}@github.com/mudita/mudita-center.git
|
||||
cd mudita-center
|
||||
git tag "$GITTAG" 2>&1 || true
|
||||
git push origin "$GITTAG"
|
||||
@@ -189,7 +189,7 @@ jobs:
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/Mudita-Center.dmg.blockmap https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/Mudita-Center.dmg.blockmap
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/latest-mac.yml https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/latest-mac.yml
|
||||
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./apps/mudita-center/release/builder-debug-mac.yml https://nexus.mudita.com/repository/mudita-center/releases/$ENVIRONMENT_CATALOG_NAME/$APP_VERSION/builder-debug-mac.yml
|
||||
git clone https://${{ secrets.MC_GITHUB_ACCESS_TOKEN }}@github.com/mudita/mudita-center.git
|
||||
git clone https://${{ secrets.GH_BUILD_TOKEN }}@github.com/mudita/mudita-center.git
|
||||
cd mudita-center
|
||||
git tag "$GITTAG" 2>&1 || true
|
||||
git push origin "$GITTAG"
|
||||
@@ -201,7 +201,7 @@ jobs:
|
||||
tag_name: ${{ env.GITTAG }}
|
||||
name: Mudita Center v${{ env.GITTAG }}
|
||||
repository: mudita/mudita-center
|
||||
token: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
token: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
draft: true
|
||||
files: |
|
||||
./apps/mudita-center/release/Mudita-Center.exe
|
||||
@@ -216,7 +216,7 @@ jobs:
|
||||
tag_name: ${{ env.GITTAG }}
|
||||
name: Mudita Center v${{ env.GITTAG }}
|
||||
repository: mudita/mudita-center
|
||||
token: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
token: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
draft: true
|
||||
files: |
|
||||
./apps/mudita-center/release/Mudita-Center.AppImage
|
||||
@@ -230,7 +230,7 @@ jobs:
|
||||
tag_name: ${{ env.GITTAG }}
|
||||
name: Mudita Center v${{ env.GITTAG }}
|
||||
repository: mudita/mudita-center
|
||||
token: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
|
||||
token: ${{ secrets.GH_BUILD_TOKEN }}
|
||||
draft: true
|
||||
files: |
|
||||
./apps/mudita-center/release/Mudita-Center.dmg
|
||||
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -69,4 +69,6 @@ scripts/manage-test-files/file-manager-test-files/*
|
||||
|
||||
libs/app-mtp/**/*.js
|
||||
|
||||
*.orig
|
||||
*.orig
|
||||
|
||||
.github/copilot-instructions.md
|
||||
|
||||
14
README.md
14
README.md
@@ -19,15 +19,17 @@ If you would like to help us create Mudita Center as a full-time job - **[we're
|
||||
- managing contacts and messages from your desktop
|
||||
- enabling using Mudita Pure as a mobile hotspot
|
||||
- Windows, macOS, Linux support
|
||||
- managing music, photos, ebooks, and APK files
|
||||
- migrating data from Pure to Kompakt
|
||||
- Windows, macOS, and Linux support
|
||||
- recovery mode
|
||||
|
||||
### Coming soon
|
||||
|
||||
- recovery mode
|
||||
- synchronizing calendar and contacts with Google and Apple
|
||||
- managing notes and events from your desktop
|
||||
- uploading audio files
|
||||
- managing files
|
||||
- viewing meditation stats
|
||||
- synchronizing contacts with Google and Apple
|
||||
- managing duplicated contacts
|
||||
- exporting photos from Kompakt
|
||||
|
||||
|
||||
## Table of contents
|
||||
|
||||
|
||||
@@ -4,17 +4,17 @@
|
||||
*/
|
||||
|
||||
import { E2EMockClient } from "../../../../libs/e2e-mock/client/src"
|
||||
import { generateUniqueNumber } from "./utils/generate-unique-number-id.helper"
|
||||
import { generateBase64Info } from "./utils/generate-base-64-info.helper"
|
||||
import { prepareMockForFileTransfer } from "./prepare-mock-for-file-transfer.helper"
|
||||
import * as fs from "fs"
|
||||
import * as path from "path"
|
||||
import * as os from "node:os"
|
||||
import { existsSync, mkdirSync } from "fs"
|
||||
|
||||
export function mockBackupResponses(path: string, shouldFail = false) {
|
||||
const data = "1234567890"
|
||||
|
||||
// mockBackupResponses("path-1", true) // use in test to force backup error
|
||||
//
|
||||
|
||||
// mockBackupResponses("path-1") // default -> success backup
|
||||
// mockBackupResponses("path-1", true) // use in test to force backup error
|
||||
// mockBackupResponses("path-1") // default -> success backup
|
||||
|
||||
if (shouldFail) {
|
||||
// Simulate backup failure due to full storage
|
||||
@@ -32,7 +32,6 @@ export function mockBackupResponses(path: string, shouldFail = false) {
|
||||
return
|
||||
}
|
||||
|
||||
// Default successful backup mocks
|
||||
E2EMockClient.mockResponses([
|
||||
{
|
||||
path,
|
||||
@@ -100,3 +99,96 @@ export function mockBackupResponses(path: string, shouldFail = false) {
|
||||
prepareMockForFileTransfer(path, data, "path/to/backup/APP_SETTINGS")
|
||||
)
|
||||
}
|
||||
|
||||
function getUserConfigDir() {
|
||||
const home = os.homedir()
|
||||
|
||||
let userConfigDir = ""
|
||||
switch (process.platform) {
|
||||
case "win32":
|
||||
userConfigDir =
|
||||
process.env.APPDATA || path.join(home, "AppData", "Roaming")
|
||||
break
|
||||
|
||||
case "darwin":
|
||||
userConfigDir = path.join(home, "Library", "Application Support")
|
||||
break
|
||||
|
||||
default:
|
||||
userConfigDir = process.env.XDG_CONFIG_HOME || path.join(home, ".config")
|
||||
break
|
||||
}
|
||||
return path.join(
|
||||
userConfigDir,
|
||||
"@mudita",
|
||||
"mudita-center-app",
|
||||
"pure",
|
||||
"phone",
|
||||
"backups"
|
||||
)
|
||||
}
|
||||
|
||||
const getBackupOutputPath = async (): Promise<string> => {
|
||||
const backupLocation = getUserConfigDir()
|
||||
console.log("backupLocation", backupLocation)
|
||||
return backupLocation
|
||||
}
|
||||
|
||||
export const createMockBackup = async (serialNumber: string): Promise<void> => {
|
||||
const osBackupLocation = await getBackupOutputPath()
|
||||
const backupLocation = path.join(osBackupLocation, "3310-2006")
|
||||
if (!existsSync(backupLocation)) {
|
||||
mkdirSync(backupLocation, { recursive: true })
|
||||
}
|
||||
|
||||
const timestamp = Date.now()
|
||||
const fileName = `${timestamp}_${serialNumber}.mcbackup`
|
||||
const filePath = path.join(backupLocation, fileName)
|
||||
|
||||
const content = {
|
||||
header: {
|
||||
vendorId: "3310",
|
||||
productId: "2006",
|
||||
serialNumber: serialNumber,
|
||||
appVersion: "3.0.1",
|
||||
},
|
||||
data: {
|
||||
CONTACT_LIST: "eyJkYXRhIjoiMTIzNDU2Nzg5MCJ9",
|
||||
CALL_LOG: "eyJkYXRhIjoiMTIzNDU2Nzg5MCJ9",
|
||||
MESSAGES: "eyJkYXRhIjoiMTIzNDU2Nzg5MCJ9",
|
||||
NOTES: "eyJkYXRhIjoiMTIzNDU2Nzg5MCJ9",
|
||||
CALENDAR_EVENTS: "eyJkYXRhIjoiMTIzNDU2Nzg5MCJ9",
|
||||
},
|
||||
}
|
||||
|
||||
fs.mkdirSync(backupLocation, { recursive: true })
|
||||
fs.writeFileSync(filePath, JSON.stringify(content, null, 2), "utf8")
|
||||
console.log(`File stored at: ${filePath}`)
|
||||
}
|
||||
|
||||
export const deleteMockBackups = async (
|
||||
serialNumber: string
|
||||
): Promise<void> => {
|
||||
const osBackupLocation = await getBackupOutputPath()
|
||||
const backupLocation = path.join(osBackupLocation, "3310-2006")
|
||||
|
||||
if (!fs.existsSync(backupLocation)) {
|
||||
return
|
||||
}
|
||||
|
||||
const files = fs.readdirSync(backupLocation)
|
||||
|
||||
const filesToDelete = files.filter((file) =>
|
||||
file.endsWith(`_${serialNumber}.mcbackup`)
|
||||
)
|
||||
|
||||
for (const file of filesToDelete) {
|
||||
const filePath = path.join(backupLocation, file)
|
||||
fs.unlinkSync(filePath)
|
||||
console.log(`Deleted backup: ${filePath}`)
|
||||
}
|
||||
|
||||
if (filesToDelete.length === 0) {
|
||||
console.log(`No backups found for serialNumber: ${serialNumber}`)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,55 +7,56 @@ import Page from "./page"
|
||||
|
||||
class AboutKompaktPage extends Page {
|
||||
public get aboutHeader() {
|
||||
return $("h3*=About your device")
|
||||
return $("//h3[contains(text(), 'About your device')]")
|
||||
}
|
||||
|
||||
public get aboutSubtitle() {
|
||||
return $("p*=Device details")
|
||||
return $("//p[contains(text(), 'Device details')]")
|
||||
}
|
||||
|
||||
public get backToOverviewIcon() {
|
||||
return $('[data-testid="icon-ArrowLongLeft"]')
|
||||
return $("//*[@data-testid='icon-ArrowLongLeft']")
|
||||
}
|
||||
|
||||
public get backToOverviewLabel() {
|
||||
return $('[data-testid="location"]')
|
||||
return $("//*[@data-testid='location']")
|
||||
}
|
||||
|
||||
public get serialNumberLabel() {
|
||||
return $('[data-testid="about-data-box-label-serial-number"]')
|
||||
return $("//*[@data-testid='about-data-box-label-serial-number']")
|
||||
}
|
||||
|
||||
public get serialNumberValue() {
|
||||
return $('[data-testid="about-data-box-value-serial-number"]')
|
||||
return $("//*[@data-testid='about-data-box-value-serial-number']")
|
||||
}
|
||||
|
||||
public get imei1Label() {
|
||||
return $('[data-testid="about-data-box-label-imei-(sim-slot-1)"]')
|
||||
return $("//*[@data-testid='about-data-box-label-imei-(sim-slot-1)']")
|
||||
}
|
||||
|
||||
public get imei1Value() {
|
||||
return $('[data-testid="about-data-box-value-imei-(sim-slot-1)"]')
|
||||
return $("//*[@data-testid='about-data-box-value-imei-(sim-slot-1)']")
|
||||
}
|
||||
|
||||
public get imei2Label() {
|
||||
return $('[data-testid="about-data-box-label-imei-(sim-slot-2)"]')
|
||||
return $("//*[@data-testid='about-data-box-label-imei-(sim-slot-2)']")
|
||||
}
|
||||
|
||||
public get imei2Value() {
|
||||
return $('[data-testid="about-data-box-value-imei-(sim-slot-2)"]')
|
||||
return $("//*[@data-testid='about-data-box-value-imei-(sim-slot-2)']")
|
||||
}
|
||||
|
||||
public get sarLabel() {
|
||||
return $('[data-testid="about-data-box-label-sar"]')
|
||||
return $("//*[@data-testid='about-data-box-label-sar']")
|
||||
}
|
||||
|
||||
public get sarButton() {
|
||||
return $('[data-testid="button-text_sarmodal-button"]')
|
||||
return $("//*[@data-testid='button-text_sarmodal-button']")
|
||||
}
|
||||
|
||||
public get sarHeader() {
|
||||
return $("h3*=SAR")
|
||||
return $("//h3[contains(text(), 'SAR')]")
|
||||
}
|
||||
}
|
||||
|
||||
export default new AboutKompaktPage()
|
||||
|
||||
@@ -7,19 +7,23 @@ import Page from "./page"
|
||||
|
||||
class ContactSupportSuccessModalPage extends Page {
|
||||
public get closeModalButton() {
|
||||
return $('[data-testid="modal-close-button-icon-button"]')
|
||||
return $('//*[@data-testid="modal-close-button-icon-button"]')
|
||||
}
|
||||
|
||||
public get successIcon() {
|
||||
return $('[data-testid="icon-success"]')
|
||||
return $('//*[@data-testid="icon-success"]')
|
||||
}
|
||||
|
||||
public get modalHeaderTitle() {
|
||||
return $('[data-testid="contact-support-modal-success-title"]')
|
||||
return $('//*[@data-testid="contact-support-modal-success-title"]')
|
||||
}
|
||||
|
||||
public get modalHeaderDescription() {
|
||||
return $('[data-testid="contact-support-modal-success-description"]')
|
||||
return $('//*[@data-testid="contact-support-modal-success-description"]')
|
||||
}
|
||||
|
||||
public get modalSuccessCloseButton() {
|
||||
return $('[data-testid="contact-support-modal-success-close-button"]')
|
||||
return $('//*[@data-testid="contact-support-modal-success-close-button"]')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -254,7 +254,7 @@ class ContactsKompaktPage extends Page {
|
||||
return $('//*[@data-testid="ui-form-search-results-empty"]//p')
|
||||
}
|
||||
public get searchResultFirst() {
|
||||
return $('//*[@data-testid=ui-form-search-results-0"]')
|
||||
return $('//*[@data-testid="ui-form-search-results-0"]')
|
||||
}
|
||||
}
|
||||
export default new ContactsKompaktPage()
|
||||
|
||||
@@ -6,237 +6,221 @@
|
||||
import Page from "./page"
|
||||
|
||||
class ContactsPage extends Page {
|
||||
/**[Selector] New contact button on Contacts screen */
|
||||
public get newContactButton() {
|
||||
return $('[data-testid="new-contact-button"]')
|
||||
return $("//*[@data-testid='new-contact-button']")
|
||||
}
|
||||
|
||||
/**Click New Contact button */
|
||||
async clickNewContactButton() {
|
||||
await this.newContactButton.waitForClickable()
|
||||
await this.newContactButton.click()
|
||||
}
|
||||
|
||||
/**[Selector] Import button on Contacts screen*/
|
||||
public get importButton() {
|
||||
return $('[data-testid="import-button"]')
|
||||
return $("//*[@data-testid='import-button']")
|
||||
}
|
||||
|
||||
/**[Selector] Search contacts input*/
|
||||
public get searchContactsInput() {
|
||||
return $('[data-testid="contact-input-select-input"]')
|
||||
return $("//*[@data-testid='contact-input-select-input']")
|
||||
}
|
||||
|
||||
/**[Selector] First name input*/
|
||||
public get firstNameInput() {
|
||||
return $('[data-testid="first-name"]')
|
||||
return $("//*[@data-testid='first-name']")
|
||||
}
|
||||
/**Insert provided text to First Name input field*/
|
||||
|
||||
async insertTextToFirstNameInput(textValue: string) {
|
||||
await this.firstNameInput.waitForDisplayed()
|
||||
await this.firstNameInput.setValue(textValue)
|
||||
}
|
||||
|
||||
/**[Selector] Last name input*/
|
||||
public get lastNameInput() {
|
||||
return $('[data-testid="second-name"]')
|
||||
return $("//*[@data-testid='second-name']")
|
||||
}
|
||||
|
||||
/**Insert provided text to Last Name input field*/
|
||||
async insertTextToLastNameInput(textValue: string) {
|
||||
await this.lastNameInput.waitForDisplayed()
|
||||
await this.lastNameInput.setValue(textValue)
|
||||
}
|
||||
|
||||
/**[Selector] Primary phone number input*/
|
||||
public get primaryPhoneNumberInput() {
|
||||
return $('[data-testid="primary-number"]')
|
||||
return $("//*[@data-testid='primary-number']")
|
||||
}
|
||||
|
||||
/**Insert provided text to Primary Phone input field*/
|
||||
async insertTextToPrimaryPhoneNumberInput(textValue: string) {
|
||||
await this.primaryPhoneNumberInput.waitForDisplayed()
|
||||
await this.primaryPhoneNumberInput.setValue(textValue)
|
||||
}
|
||||
|
||||
/**[Selector] Secondary phone number input*/
|
||||
public get secondaryPhoneNumberInput() {
|
||||
return $('[data-testid="secondary-number"]')
|
||||
return $("//*[@data-testid='secondary-number']")
|
||||
}
|
||||
|
||||
/**Insert provided text to Secondary Phone input field*/
|
||||
async insertTextToSecondaryPhoneNumberInput(textValue: string) {
|
||||
await this.secondaryPhoneNumberInput.waitForDisplayed()
|
||||
await this.secondaryPhoneNumberInput.setValue(textValue)
|
||||
}
|
||||
/**[Selector] Adress first line input*/
|
||||
|
||||
public get addressFirstLineInput() {
|
||||
return $('[data-testid="first-address-line"]')
|
||||
return $("//*[@data-testid='first-address-line']")
|
||||
}
|
||||
|
||||
/**Insert provided text to First Address line input field*/
|
||||
async insertTextToAddressFirstLineInput(textValue: string) {
|
||||
await this.addressFirstLineInput.waitForDisplayed()
|
||||
await this.addressFirstLineInput.setValue(textValue)
|
||||
}
|
||||
|
||||
/**[Selector] Adress second line input*/
|
||||
public get addressSecondLineInput() {
|
||||
return $('[data-testid="second-address-line"]')
|
||||
return $("//*[@data-testid='second-address-line']")
|
||||
}
|
||||
|
||||
/**Insert provided text to Second Address line input field*/
|
||||
async insertTextToAddressSecondLineInput(textValue: string) {
|
||||
await this.addressSecondLineInput.waitForDisplayed()
|
||||
await this.addressSecondLineInput.setValue(textValue)
|
||||
}
|
||||
|
||||
/**[Selector] Close button on contact detail screen*/
|
||||
public get closeButton() {
|
||||
return $('[data-testid="icon-Close"]')
|
||||
return $("//*[@data-testid='icon-Close']")
|
||||
}
|
||||
|
||||
/**Click Close button on contact detail screen */
|
||||
async closeButtonClick() {
|
||||
await this.closeButton.waitForClickable()
|
||||
await this.closeButton.click()
|
||||
}
|
||||
/**[Selector] add to favourites checkbox*/
|
||||
|
||||
public get addToFavouritessCheckbox() {
|
||||
return $('[name*="favourite"]')
|
||||
}
|
||||
/**[Selector] Cancel button on add/edit contact screen*/
|
||||
public get cancelButton() {
|
||||
return $("p*=Cancel")
|
||||
return $("//*[contains(@name, 'favourite')]")
|
||||
}
|
||||
|
||||
/** [Selector] Save contact button*/
|
||||
public get saveContactButton() {
|
||||
return $('[data-testid="save-button"]')
|
||||
public get cancelButton() {
|
||||
return $("//p[contains(text(), 'Cancel')]")
|
||||
}
|
||||
/** Click on Save contact button */
|
||||
|
||||
public get saveContactButton() {
|
||||
return $("//*[@data-testid='save-button']")
|
||||
}
|
||||
|
||||
async clickSaveContactButton() {
|
||||
await this.saveContactButton.waitForClickable()
|
||||
await this.saveContactButton.click()
|
||||
}
|
||||
|
||||
public get noContactsTextLabel() {
|
||||
return $('[data-testid="contact-list-no-result"]')
|
||||
return $("//*[@data-testid='contact-list-no-result']")
|
||||
}
|
||||
|
||||
public get listOfContacts() {
|
||||
return $$('[data-testid="virtualized-contact-list-item-contact-row"]')
|
||||
return $$("//*[@data-testid='virtualized-contact-list-item-contact-row']")
|
||||
}
|
||||
|
||||
public get singleContactRow() {
|
||||
return $('[data-testid="virtualized-contact-list-item-contact-row"]')
|
||||
return $("//*[@data-testid='virtualized-contact-list-item-contact-row']")
|
||||
}
|
||||
|
||||
public get phoneNumberOnContactList() {
|
||||
return $('[data-testid="virtualized-contact-phone-number"]')
|
||||
return $("//*[@data-testid='virtualized-contact-phone-number']")
|
||||
}
|
||||
|
||||
public get optionsButtonOnContactList() {
|
||||
return $('[data-testid="icon-More"]')
|
||||
return $("//*[@data-testid='icon-More']")
|
||||
}
|
||||
|
||||
async optionsButtonOnContactListClick() {
|
||||
await this.optionsButtonOnContactList.waitForDisplayed()
|
||||
await this.optionsButtonOnContactList.click()
|
||||
}
|
||||
|
||||
public get editContactOptionMenu() {
|
||||
return $('[data-testid="icon-Edit"]')
|
||||
return $("//*[@data-testid='icon-Edit']")
|
||||
}
|
||||
|
||||
public get exportAsVCardOptionMenu() {
|
||||
return $('[data-testid="icon-UploadDark"]')
|
||||
return $("//*[@data-testid='icon-UploadDark']")
|
||||
}
|
||||
|
||||
public get deleteContactOptionMenu() {
|
||||
return $('[data-testid="icon-Delete"]')
|
||||
return $("//*[@data-testid='icon-Delete']")
|
||||
}
|
||||
|
||||
public get nameOnContactDetailScreen() {
|
||||
return $('[data-testid="name"]')
|
||||
return $("//*[@data-testid='name']")
|
||||
}
|
||||
|
||||
public get phoneNumber1OnContactDetailScreen() {
|
||||
return $('[data-testid="primary-phone-input"]')
|
||||
return $("//*[@data-testid='primary-phone-input']")
|
||||
}
|
||||
|
||||
public get phoneNumber2OnContactDetailScreen() {
|
||||
return $('[data-testid="secondary-phone-input"]')
|
||||
return $("//*[@data-testid='secondary-phone-input']")
|
||||
}
|
||||
|
||||
public get addressOnContactDetailScreen() {
|
||||
return $('[data-testid="address-details"]')
|
||||
return $("//*[@data-testid='address-details']")
|
||||
}
|
||||
|
||||
public get buttonDeleteOnContactDetailScreen() {
|
||||
return $('[data-testid="icon-Delete"]')
|
||||
return $("//*[@data-testid='icon-Delete']")
|
||||
}
|
||||
|
||||
public get buttonExportOnContactDetailScreen() {
|
||||
return $('[data-testid="icon-UploadDark"]')
|
||||
return $("//*[@data-testid='icon-UploadDark']")
|
||||
}
|
||||
|
||||
public get editButtonOnContactDetailScreen() {
|
||||
return $('[data-testid="icon-Edit"]')
|
||||
return $("//*[@data-testid='icon-Edit']")
|
||||
}
|
||||
|
||||
public get checkboxSingleContact() {
|
||||
return $('[type="checkbox"]')
|
||||
return $("//*[@type='checkbox']")
|
||||
}
|
||||
|
||||
public get checkboxesList() {
|
||||
return $$('[type="checkbox"]')
|
||||
return $$("//*[@type='checkbox']")
|
||||
}
|
||||
|
||||
public get checkboxSelectAll() {
|
||||
return $('[data-testid="selection-manager"]').$('[type="checkbox"]')
|
||||
return $("//*[@data-testid='selection-manager']//*[@type='checkbox']")
|
||||
}
|
||||
|
||||
public get textSummaryOfContactsSelected() {
|
||||
return $('[data-testid="info"]')
|
||||
return $("//*[@data-testid='info']")
|
||||
}
|
||||
|
||||
public get buttonDeleteSelectionManager() {
|
||||
return $("p*=Delete")
|
||||
return $("//p[contains(text(), 'Delete')]")
|
||||
}
|
||||
|
||||
public get inputHiddenVcfFile() {
|
||||
return $('[data-testid="file-input"]')
|
||||
return $("//*[@data-testid='file-input']")
|
||||
}
|
||||
|
||||
public get buttonContinueWithGoogle() {
|
||||
return $('[data-testid="google-button"]')
|
||||
return $("//*[@data-testid='google-button']")
|
||||
}
|
||||
|
||||
public get buttonOutlookImport() {
|
||||
return $('[data-testid="outlook-button"]')
|
||||
return $("//*[@data-testid='outlook-button']")
|
||||
}
|
||||
|
||||
public get buttonImportFromVCFFileImport() {
|
||||
return $('[data-testid="icon-Upload"]')
|
||||
return $("//*[@data-testid='icon-Upload']")
|
||||
}
|
||||
|
||||
public get inputSearch() {
|
||||
return $('[data-testid="contact-input-select-input"]')
|
||||
return $("//*[@data-testid='contact-input-select-input']")
|
||||
}
|
||||
|
||||
public get dropDownSearchResultList() {
|
||||
return $('[data-testid="input-select-list"]')
|
||||
return $("//*[@data-testid='input-select-list']")
|
||||
}
|
||||
|
||||
public get dropDownSearchResultListItems() {
|
||||
this.dropDownSearchResultList.waitForDisplayed()
|
||||
return this.dropDownSearchResultList.$$(
|
||||
'[data-testid="input-select-list-item"]'
|
||||
"//*[@data-testid='input-select-list-item']"
|
||||
)
|
||||
}
|
||||
|
||||
public get contactDetailsFavouritesIcon() {
|
||||
return $('[data-testid="icon-Favourites"]')
|
||||
return $("//*[@data-testid='icon-Favourites']")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,22 +7,23 @@ import Page from "./page"
|
||||
|
||||
export class DrawerPage extends Page {
|
||||
public get deviceSelectDrawer() {
|
||||
return $('[data-testid="device-select-drawer-content"]')
|
||||
return $("//*[@data-testid='device-select-drawer-content']")
|
||||
}
|
||||
|
||||
public getDeviceOnDrawer(serialNumber: string) {
|
||||
return $(`//*[@data-testid="drawer-device-wrapper-${serialNumber}"]`)
|
||||
return $(`//*[@data-testid='drawer-device-wrapper-${serialNumber}']`)
|
||||
}
|
||||
|
||||
public get deviceImageOnDrawer() {
|
||||
return $('[data-testid="drawer-device-image"]')
|
||||
return $("//*[@data-testid='drawer-device-image']")
|
||||
}
|
||||
|
||||
public get drawerDeviceSerialNumber() {
|
||||
return $$('[data-testid="drawer-device-serial-number-value"]')
|
||||
return $$("//*[@data-testid='drawer-device-serial-number-value']")
|
||||
}
|
||||
|
||||
public get drawerDeviceName() {
|
||||
return $$('[data-testid="drawer-device-type"]')
|
||||
return $$("//*[@data-testid='drawer-device-type']")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,81 +8,105 @@ import Page from "./page"
|
||||
|
||||
class HelpArticlePage extends Page {
|
||||
public get helpTabTitle() {
|
||||
return $('[data-testid="location"]')
|
||||
return $("//*[@data-testid='location']")
|
||||
}
|
||||
|
||||
public get helpArticleBackButton() {
|
||||
return $('[data-testid="help-article-back-button"]')
|
||||
return $("//*[@data-testid='help-article-back-button']")
|
||||
}
|
||||
|
||||
public get helpArticleItems() {
|
||||
return $$('[data-testid="help-subcategory-articles-list-item"]')
|
||||
return $$("//*[@data-testid='help-subcategory-articles-list-item']")
|
||||
}
|
||||
|
||||
public get helpArticleTitle() {
|
||||
return $('[data-testid="help-article-title"]')
|
||||
return $("//*[@data-testid='help-article-title']")
|
||||
}
|
||||
|
||||
public get helpArticleText() {
|
||||
return $('[data-testid=" help-article-content-block-text"]')
|
||||
return $("//*[@data-testid=' help-article-content-block-text']")
|
||||
}
|
||||
|
||||
public get helpArticleWarningIcon() {
|
||||
return $('[data-testid="help-article-warning-icon"]')
|
||||
return $("//*[@data-testid='help-article-warning-icon']")
|
||||
}
|
||||
|
||||
public get helpArticleWarning() {
|
||||
return $('[data-testid="help-article-warning"]')
|
||||
return $("//*[@data-testid='help-article-warning']")
|
||||
}
|
||||
|
||||
public get helpArticleContent() {
|
||||
return $('[data-testid="help-article-content"]')
|
||||
return $("//*[@data-testid='help-article-content']")
|
||||
}
|
||||
|
||||
public get helpArticleContentBlocks() {
|
||||
return $$('[data-testid="help-article-content-block"]')
|
||||
return $$("//*[@data-testid='help-article-content-block']")
|
||||
}
|
||||
|
||||
getHelpArticleContentBlock(index: number) {
|
||||
return $$('[data-testid="help-article-content-block"]')[index]
|
||||
return $$("//*[@data-testid='help-article-content-block']")[index]
|
||||
}
|
||||
|
||||
getHelpArticleContentBlockTitle(index: number) {
|
||||
return $$('[data-testid="help-article-content-block-title"]')[index]
|
||||
return $$("//*[@data-testid='help-article-content-block-title']")[index]
|
||||
}
|
||||
|
||||
public get helpArticleContentBlockText() {
|
||||
return $$('[data-testid="help-article-content-block-text"]')
|
||||
return $$("//*[@data-testid='help-article-content-block-text']")
|
||||
}
|
||||
|
||||
getHelpArticleContentBlockText(index: number) {
|
||||
return $$('[data-testid="help-article-content-block"]')[index].$(
|
||||
'[data-testid="help-article-content-block-text"]'
|
||||
return $$("//*[@data-testid='help-article-content-block']")[index].$(
|
||||
".//*[@data-testid='help-article-content-block-text']"
|
||||
)
|
||||
}
|
||||
|
||||
public get helpArticleFeedback() {
|
||||
return $('[data-testid="help-article-feedback"]')
|
||||
return $("//*[@data-testid='help-article-feedback']")
|
||||
}
|
||||
|
||||
public get helpArticleFeedbackTitle() {
|
||||
return $('[data-testid="help-article-feedback-title"]')
|
||||
return $("//*[@data-testid='help-article-feedback-title']")
|
||||
}
|
||||
|
||||
public get helpArticleFeedbackYesButton() {
|
||||
return $('[data-testid="help-article-feedback-yes-button"]')
|
||||
return $("//*[@data-testid='help-article-feedback-yes-button']")
|
||||
}
|
||||
|
||||
public get helpArticleFeedbackNoButton() {
|
||||
return $('[data-testid="help-article-feedback-no-button"]')
|
||||
return $("//*[@data-testid='help-article-feedback-no-button']")
|
||||
}
|
||||
|
||||
public get iconNamaste() {
|
||||
return $('[data-testid="icon-namaste"]')
|
||||
return $("//*[@data-testid='icon-namaste']")
|
||||
}
|
||||
|
||||
public get feedbackThanksText() {
|
||||
return $('[data-testid="help-article-feedback-thanks"]')
|
||||
return $("//*[@data-testid='help-article-feedback-thanks']")
|
||||
}
|
||||
|
||||
public get helpArticleFooter() {
|
||||
return $('[data-testid="help-article-footer"]')
|
||||
return $("//*[@data-testid='help-article-footer']")
|
||||
}
|
||||
|
||||
public get helpArticleFooterTitle() {
|
||||
return $('[data-testid="help-article-footer-title"]')
|
||||
return $("//*[@data-testid='help-article-footer-title']")
|
||||
}
|
||||
|
||||
public get helpArticleFooterButton() {
|
||||
return $('[data-testid="help-article-footer-button"]')
|
||||
return $("//*[@data-testid='help-article-footer-button']")
|
||||
}
|
||||
|
||||
public get helpArticleFooterVisitSupportButton() {
|
||||
return $('[data-testid="help-article-footer-button"]')
|
||||
return $("//*[@data-testid='help-article-footer-button']")
|
||||
}
|
||||
|
||||
public get helpCategories() {
|
||||
return $$('[data-testid="help-categories-list-item"]')
|
||||
return $$("//*[@data-testid='help-categories-list-item']")
|
||||
}
|
||||
|
||||
public get connectYourDeviceLinks() {
|
||||
return $$('[data-testid="help-article-content-block-internal-link"]')
|
||||
return $$("//*[@data-testid='help-article-content-block-internal-link']")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,89 +8,110 @@ import Page from "./page"
|
||||
class HelpModalPage extends Page {
|
||||
/**[Selector] Modal close button */
|
||||
public get closeModalButton() {
|
||||
return $('[data-testid="close-modal-button"]')
|
||||
return $("//*[@data-testid='close-modal-button']")
|
||||
}
|
||||
|
||||
/**[Selector] Modal title */
|
||||
public get modalHeader() {
|
||||
return $('[data-testid="modal-header"]')
|
||||
return $("//*[@data-testid='modal-header']")
|
||||
}
|
||||
|
||||
/**[Selector] Contact support email input */
|
||||
public get emailInput() {
|
||||
return $('[data-testid="email-input"]')
|
||||
return $("//*[@data-testid='email-input']")
|
||||
}
|
||||
|
||||
/**[Selector] Contact support message input */
|
||||
public get descriptionInput() {
|
||||
return $('[data-testid="description-input"]')
|
||||
return $("//*[@data-testid='description-input']")
|
||||
}
|
||||
|
||||
/**[Selector] Send button */
|
||||
public get sendButton() {
|
||||
return $('[data-testid="submit-button"]')
|
||||
return $("//*[@data-testid='submit-button']")
|
||||
}
|
||||
|
||||
/**[Selector] Send button label */
|
||||
public get sendButtonLabel() {
|
||||
return $('//button[@data-testid="submit-button"]//p')
|
||||
return $("//button[@data-testid='submit-button']//p")
|
||||
}
|
||||
|
||||
/** returns an Array containing list of attached files */
|
||||
async attachmentsList() {
|
||||
return $('[data-testid="file-list"]').$$('[data-testid="file-list-file"]')
|
||||
return $("//*[@data-testid='file-list']").$$(
|
||||
".//*[@data-testid='file-list-file']"
|
||||
)
|
||||
}
|
||||
|
||||
/**[Selector] single attachment element */
|
||||
public get singleAttachment() {
|
||||
return $('[data-testid="file-list-file"]')
|
||||
return $("//*[@data-testid='file-list-file']")
|
||||
}
|
||||
|
||||
/**[Selector] Success sent message modal */
|
||||
public get sentSuccessModal() {
|
||||
return $('[data-testid="contact-support-modal-success"]')
|
||||
return $("//*[@data-testid='contact-support-modal-success']")
|
||||
}
|
||||
|
||||
/**[Selector] Close bottom button */
|
||||
public get closeBottomButton() {
|
||||
return $('[data-testid="close-bottom-button"]')
|
||||
return $("//*[@data-testid='close-bottom-button']")
|
||||
}
|
||||
|
||||
/**[Selector] Invalid email text */
|
||||
public get invalidEmailTextElement() {
|
||||
return $('//input[@data-testid="email-input"]/following-sibling::*[1]')
|
||||
return $("//input[@data-testid='email-input']/following-sibling::*[1]")
|
||||
}
|
||||
|
||||
/**[Selector] Support icon */
|
||||
public get iconSupport() {
|
||||
return $('[data-testid="icon-Support"]')
|
||||
return $("//*[@data-testid='icon-Support']")
|
||||
}
|
||||
|
||||
/**[Selector] Attachment icon */
|
||||
public get iconAttachment() {
|
||||
return $('[data-testid="icon-Attachment"]')
|
||||
return $("//*[@data-testid='icon-Attachment']")
|
||||
}
|
||||
|
||||
/**[Selector] Modal title with specific text */
|
||||
public get modalTitle() {
|
||||
return $('[data-testid="contact-support-modal-title"]')
|
||||
return $("//*[@data-testid='contact-support-modal-title']")
|
||||
}
|
||||
|
||||
/**[Selector] Modal subtitle */
|
||||
public get modalSubtitle() {
|
||||
return $('[data-testid="contact-support-modal-subtitle"]')
|
||||
return $("//*[@data-testid='contact-support-modal-subtitle']")
|
||||
}
|
||||
|
||||
/**[Selector] Current date zip file */
|
||||
public get currentDateZipFile() {
|
||||
const currentDate = new Date().toISOString().split("T")[0] // Get current date in YYYY-MM-DD format
|
||||
return $(`p*=${currentDate}.zip`)
|
||||
return $(`//p[contains(text(), '${currentDate}.zip')]`)
|
||||
}
|
||||
|
||||
/**[Selector] Attached files text */
|
||||
public get attachedFilesLabel() {
|
||||
return $('[data-testid="attached-files-label"]')
|
||||
return $("//*[@data-testid='attached-files-label']")
|
||||
}
|
||||
|
||||
/**[Selector] Attached files subtext */
|
||||
public get attachedFilesSubText() {
|
||||
return $('[data-testid="attached-files-subtext"]')
|
||||
return $("//*[@data-testid='attached-files-subtext']")
|
||||
}
|
||||
|
||||
/**[Selector] Email label */
|
||||
public get emailLabel() {
|
||||
return $('[data-testid="email-label"]')
|
||||
return $("//*[@data-testid='email-label']")
|
||||
}
|
||||
|
||||
/**[Selector] Message label */
|
||||
public get messageLabel() {
|
||||
return $('[data-testid="message-label"]')
|
||||
return $("//*[@data-testid='message-label']")
|
||||
}
|
||||
|
||||
/**[Selector] Whole modal */
|
||||
public get wholeModal() {
|
||||
return $('[data-testid="contact-support-modal"]')
|
||||
return $("//*[@data-testid='contact-support-modal']")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,60 +8,60 @@ import Page from "./page"
|
||||
class HelpPage extends Page {
|
||||
//Getters
|
||||
public get helpTabTitle() {
|
||||
return $('//h4[@data-testid="location"]')
|
||||
return $("//h4[@data-testid='location']")
|
||||
}
|
||||
public get helpMainHeader() {
|
||||
return $('//h3[@data-testid="help-main-header"]')
|
||||
return $("//h3[@data-testid='help-main-header']")
|
||||
}
|
||||
public get helpMainSubHeader() {
|
||||
return $('//p[@data-testid="help-main-subheader"]')
|
||||
return $("//p[@data-testid='help-main-subheader']")
|
||||
}
|
||||
public get iconSearch() {
|
||||
return $('//div[@data-testid="icon-search"]')
|
||||
return $("//div[@data-testid='icon-search']")
|
||||
}
|
||||
public get helpSearchInput() {
|
||||
return $('//input[@data-testid="ui-form-search-input"]')
|
||||
return $("//input[@data-testid='ui-form-search-input']")
|
||||
}
|
||||
public get helpSearchResults() {
|
||||
return $('//div[@data-testid="help-search-results"]')
|
||||
return $("//div[@data-testid='help-search-results']")
|
||||
}
|
||||
public get iconSearchHelpSearchResults() {
|
||||
return $(
|
||||
'//div[@data-testid="help-search-results"]//div[@data-testid="icon-search"]'
|
||||
"//div[@data-testid='help-search-results']//div[@data-testid='icon-search']"
|
||||
)
|
||||
}
|
||||
public get helpSearchResultsParagraph() {
|
||||
return $('//div[@data-testid="help-search-results"]//p')
|
||||
return $("//div[@data-testid='help-search-results']//p")
|
||||
}
|
||||
public get helpSearchResultsList() {
|
||||
return $('//div[@data-testid="help-search-results"]//ul')
|
||||
return $("//div[@data-testid='help-search-results']//ul")
|
||||
}
|
||||
public get helpSearchResultsItems() {
|
||||
return $$('//a[@data-testid="help-search-result-item"]')
|
||||
return $$("//a[@data-testid='help-search-result-item']")
|
||||
}
|
||||
public get helpCategoriesTitle() {
|
||||
return $('//h2[@data-testid="help-categories-title"]')
|
||||
return $("//h2[@data-testid='help-categories-title']")
|
||||
}
|
||||
public get helpCategoriesList() {
|
||||
return $('//nav[@data-testid="help-categories-list"]')
|
||||
return $("//nav[@data-testid='help-categories-list']")
|
||||
}
|
||||
public get helpCategoriesListItems() {
|
||||
return $$('//a[@data-testid="help-categories-list-item"]')
|
||||
return $$("//a[@data-testid='help-categories-list-item']")
|
||||
}
|
||||
public get helpSubCategoriesList() {
|
||||
return $('//div[@data-testid="help-subcategories-list"]')
|
||||
return $("//div[@data-testid='help-subcategories-list']")
|
||||
}
|
||||
public get helpSubCategoriesListItems() {
|
||||
return $$('//div[@data-testid="help-subcategories-list-item"]')
|
||||
return $$("//div[@data-testid='help-subcategories-list-item']")
|
||||
}
|
||||
public get helpSubCategoriesArticle() {
|
||||
return $$('//div[@data-testid="help-subcategory-articles-list"]')
|
||||
return $$("//div[@data-testid='help-subcategory-articles-list']")
|
||||
}
|
||||
public getHelpSubCategoriesListItemsFromColumn(columnIndex: number) {
|
||||
return $$(
|
||||
`(//div[@data-testid="help-subcategories-list"]/div)[${
|
||||
`(//div[@data-testid='help-subcategories-list']/div)[${
|
||||
columnIndex + 1
|
||||
}]//div[@data-testid="help-subcategories-list-item"]`
|
||||
}]//div[@data-testid='help-subcategories-list-item']`
|
||||
)
|
||||
}
|
||||
public get helpSubCategoriesListItemsLeftColumn() {
|
||||
@@ -71,16 +71,16 @@ class HelpPage extends Page {
|
||||
return this.getHelpSubCategoriesListItemsFromColumn(1)
|
||||
}
|
||||
public get helpMainFooterDescription() {
|
||||
return $('//p[@data-testid="help-main-footer-description"]')
|
||||
return $("//p[@data-testid='help-main-footer-description']")
|
||||
}
|
||||
public get helpMainFooterContactSupportButton() {
|
||||
return $('//button[@data-testid="help-main-footer-contact-support-button"]')
|
||||
return $("//button[@data-testid='help-main-footer-contact-support-button']")
|
||||
}
|
||||
public get ContactSupportButton() {
|
||||
return $('[data-testid="button-text_undefined"]')
|
||||
return $("//*[@data-testid='button-text_undefined']")
|
||||
}
|
||||
public get iconContactSupport() {
|
||||
return $('[data-testid="icon-support"]')
|
||||
return $("//*[@data-testid='icon-support']")
|
||||
}
|
||||
public async searchForArticle(text: string) {
|
||||
const searchInput = await this.helpSearchInput
|
||||
|
||||
@@ -25,7 +25,9 @@ class HomePage extends Page {
|
||||
}
|
||||
|
||||
get weAreSorryPageFollowTheInstructionsParagraph() {
|
||||
return $("//p[@data-testid='onboarding-troubleshooting-subtitle-paragraph']")
|
||||
return $(
|
||||
"//p[@data-testid='onboarding-troubleshooting-subtitle-paragraph']"
|
||||
)
|
||||
}
|
||||
|
||||
get weAreSorryPageInstructionsList() {
|
||||
@@ -45,11 +47,13 @@ class HomePage extends Page {
|
||||
}
|
||||
|
||||
get contactSupportButton() {
|
||||
return $("//button[@data-testid='onboarding-troubleshooting-ui-contact-support']")
|
||||
return $(
|
||||
"//button[@data-testid='onboarding-troubleshooting-ui-contact-support']"
|
||||
)
|
||||
}
|
||||
|
||||
get muditaCenterSupportModalHeader() {
|
||||
return $("//h2[@data-testid='modal-title']")
|
||||
return $("//h1[@data-testid='contact-support-modal-title']")
|
||||
}
|
||||
|
||||
get emailField() {
|
||||
@@ -77,9 +81,9 @@ class HomePage extends Page {
|
||||
}
|
||||
|
||||
public async clickNotNowButton() {
|
||||
const button = await this.notNowButton;
|
||||
await button.waitForDisplayed();
|
||||
await button.click();
|
||||
const button = await this.notNowButton
|
||||
await button.waitForDisplayed()
|
||||
await button.click()
|
||||
}
|
||||
}
|
||||
export default new HomePage()
|
||||
|
||||
@@ -7,299 +7,578 @@ import { OverviewPage } from "./overview.page"
|
||||
|
||||
class ManageFiles extends OverviewPage {
|
||||
public get phoneStorageButton() {
|
||||
return $('//a[p[text()="Phone storage"]]')
|
||||
return $("//a[p[text()='Phone storage']]")
|
||||
}
|
||||
|
||||
public get sdCardButton() {
|
||||
return $('//a[p[text()="SD card"]]')
|
||||
return $("//a[p[text()='SD card']]")
|
||||
}
|
||||
|
||||
public get phoneStorageHeader() {
|
||||
return $(
|
||||
'[data-testid="ui-typography-h3-mcFileManagerInternalstorageSummaryHeader"]'
|
||||
"//*[@data-testid='ui-typography-h3-mcFileManagerInternalstorageSummaryHeader']"
|
||||
)
|
||||
}
|
||||
|
||||
public get sdCardHeader() {
|
||||
return $(
|
||||
'[data-testid="ui-typography-h3-mcFileManagerExternalstorageSummaryHeader"]'
|
||||
"//*[@data-testid='ui-typography-h3-mcFileManagerExternalstorageSummaryHeader']"
|
||||
)
|
||||
}
|
||||
|
||||
public get iconExclamation() {
|
||||
return $("//*[@data-testid='icon-exclamation']")
|
||||
}
|
||||
|
||||
public get musicCategoryHeader() {
|
||||
return $(
|
||||
'[data-testid="ui-typography-h3-mcFileManagerInternal0fileListPanelHeaderWrapper"]'
|
||||
"//*[@data-testid='ui-typography-h3-mcFileManagerInternal0fileListPanelHeaderWrapper']"
|
||||
)
|
||||
}
|
||||
|
||||
public get musicCategoryAddFilesButton() {
|
||||
return $(
|
||||
'[data-testid="primary-button-mcFileManagerInternal0filesUploadButton"]'
|
||||
"//*[@data-testid='primary-button-mcFileManagerInternal0filesUploadButton']"
|
||||
)
|
||||
}
|
||||
|
||||
public get firstFileInTheMusicCategory() {
|
||||
return $(
|
||||
'[data-testid="ui-typography-p1-mcFileManagerInternal0columnNameText"]'
|
||||
"//*[@data-testid='ui-typography-p1-mcFileManagerInternal0columnNameText']"
|
||||
)
|
||||
}
|
||||
|
||||
public get checkboxFirstFileMusic() {
|
||||
return $(
|
||||
"//*[@data-testid='ui-checkbox-mcFileManagerInternal0contactCheckbox']"
|
||||
)
|
||||
}
|
||||
|
||||
public get firstFileInTheMusicCategoryDeleteButton() {
|
||||
return $(
|
||||
"//*[@data-testid='button-text_mcFileManagerInternal0deleteButton']"
|
||||
)
|
||||
}
|
||||
|
||||
public get firstFileInTheMusicCategoryDeleteModal() {
|
||||
return $(
|
||||
"//*[@data-testid='modal-content-mcFileManagerInternal0deleteModal']"
|
||||
)
|
||||
}
|
||||
|
||||
public get firstFileInTheMusicCategoryDeleteModalCancelButton() {
|
||||
return $(
|
||||
"//*[@data-testid='primary-button-mcFileManagerInternal0deleteModalCancelButton']"
|
||||
)
|
||||
}
|
||||
|
||||
public get firstFileInTheMusicCategoryDeleteModalDeleteFileButton() {
|
||||
return $(
|
||||
"//*[@data-testid='primary-button-mcFileManagerInternal0deleteModalConfirmButton']"
|
||||
)
|
||||
}
|
||||
|
||||
public get musicCategoryEmptyTitle() {
|
||||
return $(
|
||||
'[data-testid="ui-typography-h4-mcFileManagerInternal0fileListEmptyStateHeader"]'
|
||||
"//*[@data-testid='ui-typography-h4-mcFileManagerInternal0fileListEmptyStateHeader']"
|
||||
)
|
||||
}
|
||||
|
||||
public get musicCategoryEmptySubtext() {
|
||||
return $(
|
||||
'[data-testid="ui-typography-p3-mcFileManagerInternal0fileListEmptyStateDescription"]'
|
||||
"//*[@data-testid='ui-typography-p3-mcFileManagerInternal0fileListEmptyStateDescription']"
|
||||
)
|
||||
}
|
||||
|
||||
public get photosCategoryButton() {
|
||||
return $(
|
||||
'[data-testid="ui-typography-h4-mcFileManagerInternal1categoryListItemNameText"]'
|
||||
"//*[@data-testid='ui-typography-h4-mcFileManagerInternal1categoryListItemNameText']"
|
||||
)
|
||||
}
|
||||
|
||||
public get photosCategoryHeader() {
|
||||
return $(
|
||||
'[data-testid="ui-typography-h3-mcFileManagerInternal1fileListPanelHeaderWrapper"]'
|
||||
"//*[@data-testid='ui-typography-h3-mcFileManagerInternal1fileListPanelHeaderWrapper']"
|
||||
)
|
||||
}
|
||||
|
||||
public get photosCategoryAddFilesButton() {
|
||||
return $(
|
||||
'[data-testid="primary-button-mcFileManagerInternal1filesUploadButton"]'
|
||||
"//*[@data-testid='primary-button-mcFileManagerInternal1filesUploadButton']"
|
||||
)
|
||||
}
|
||||
|
||||
public get firstFileInThePhotosCategory() {
|
||||
return $(
|
||||
'[data-testid="ui-typography-p1-mcFileManagerInternal1columnNameText"]'
|
||||
"//*[@data-testid='ui-typography-p1-mcFileManagerInternal1columnNameText']"
|
||||
)
|
||||
}
|
||||
|
||||
public get checkboxFirstFilePhotos() {
|
||||
return $(
|
||||
"//*[@data-testid='ui-checkbox-mcFileManagerInternal1contactCheckbox']"
|
||||
)
|
||||
}
|
||||
|
||||
public get firstFileInThePhotosCategoryDeleteButton() {
|
||||
return $("//button[contains(text(), 'Delete')]")
|
||||
}
|
||||
|
||||
public get firstFileInThePhotosCategoryDeleteModal() {
|
||||
return $(
|
||||
"//*[@data-testid='modal-content-mcFileManagerInternal1deleteModal']"
|
||||
)
|
||||
}
|
||||
|
||||
public get firstFileInThePhotosCategoryDeleteModalCancelButton() {
|
||||
return $(
|
||||
"//*[@data-testid='primary-button-mcFileManagerInternal1deleteModalCancelButton']"
|
||||
)
|
||||
}
|
||||
|
||||
public get firstFileInThePhotosCategoryDeleteModalDeleteFileButton() {
|
||||
return $(
|
||||
"//*[@data-testid='primary-button-mcFileManagerInternal1deleteModalConfirmButton']"
|
||||
)
|
||||
}
|
||||
|
||||
public get photosCategoryEmptyTitle() {
|
||||
return $(
|
||||
'[data-testid="ui-typography-h4-mcFileManagerInternal1fileListEmptyStateHeader"]'
|
||||
"//*[@data-testid='ui-typography-h4-mcFileManagerInternal1fileListEmptyStateHeader']"
|
||||
)
|
||||
}
|
||||
|
||||
public get photosCategoryEmptySubtext() {
|
||||
return $(
|
||||
'[data-testid="ui-typography-p3-mcFileManagerInternal1fileListEmptyStateDescription"]'
|
||||
"//*[@data-testid='ui-typography-p3-mcFileManagerInternal1fileListEmptyStateDescription']"
|
||||
)
|
||||
}
|
||||
|
||||
public get ebooksCategoryButton() {
|
||||
return $(
|
||||
'[data-testid="ui-typography-h4-mcFileManagerInternal2categoryListItemNameText"]'
|
||||
"//*[@data-testid='ui-typography-h4-mcFileManagerInternal2categoryListItemNameText']"
|
||||
)
|
||||
}
|
||||
|
||||
public get ebooksCategoryHeader() {
|
||||
return $(
|
||||
'[data-testid="ui-typography-h3-mcFileManagerInternal2fileListPanelHeaderWrapper"]'
|
||||
"//*[@data-testid='ui-typography-h3-mcFileManagerInternal2fileListPanelHeaderWrapper']"
|
||||
)
|
||||
}
|
||||
|
||||
public get ebooksCategoryAddFilesButton() {
|
||||
return $(
|
||||
'[data-testid="primary-button-mcFileManagerInternal2filesUploadButton"]'
|
||||
"//*[@data-testid='primary-button-mcFileManagerInternal2filesUploadButton']"
|
||||
)
|
||||
}
|
||||
|
||||
public get firstFileInTheEbooksCategory() {
|
||||
return $(
|
||||
'[data-testid="ui-typography-p1-mcFileManagerInternal2columnNameText"]'
|
||||
"//*[@data-testid='ui-typography-p1-mcFileManagerInternal2columnNameText']"
|
||||
)
|
||||
}
|
||||
|
||||
public get checkboxFirstFileEbooks() {
|
||||
return $(
|
||||
"//*[@data-testid='ui-checkbox-mcFileManagerInternal2contactCheckbox']"
|
||||
)
|
||||
}
|
||||
|
||||
public get firstFileInTheEbooksCategoryDeleteButton() {
|
||||
return $(
|
||||
"//*[@data-testid='button-text_mcFileManagerInternal2deleteButton']"
|
||||
)
|
||||
}
|
||||
|
||||
public get firstFileInTheEbooksCategoryDeleteModal() {
|
||||
return $(
|
||||
"//*[@data-testid='modal-content-mcFileManagerInternal2deleteModal']"
|
||||
)
|
||||
}
|
||||
|
||||
public get firstFileInTheEbooksCategoryDeleteModalCancelButton() {
|
||||
return $(
|
||||
"//*[@data-testid='primary-button-mcFileManagerInternal2deleteModalCancelButton']"
|
||||
)
|
||||
}
|
||||
|
||||
public get firstFileInTheEbooksCategoryDeleteModalDeleteFileButton() {
|
||||
return $(
|
||||
"//*[@data-testid='primary-button-mcFileManagerInternal2deleteModalConfirmButton']"
|
||||
)
|
||||
}
|
||||
|
||||
public get ebooksCategoryEmptyTitle() {
|
||||
return $(
|
||||
'[data-testid="ui-typography-h4-mcFileManagerInternal2fileListEmptyStateHeader"]'
|
||||
"//*[@data-testid='ui-typography-h4-mcFileManagerInternal2fileListEmptyStateHeader']"
|
||||
)
|
||||
}
|
||||
|
||||
public get ebooksCategoryEmptySubtext() {
|
||||
return $(
|
||||
'[data-testid="ui-typography-p3-mcFileManagerInternal2fileListEmptyStateDescription"]'
|
||||
"//*[@data-testid='ui-typography-p3-mcFileManagerInternal2fileListEmptyStateDescription']"
|
||||
)
|
||||
}
|
||||
|
||||
public get appsCategoryButton() {
|
||||
return $(
|
||||
'[data-testid="ui-typography-h4-mcFileManagerInternal3categoryListItemNameText"]'
|
||||
"//*[@data-testid='ui-typography-h4-mcFileManagerInternal3categoryListItemNameText']"
|
||||
)
|
||||
}
|
||||
|
||||
public get appsCategoryHeader() {
|
||||
return $(
|
||||
'[data-testid="ui-typography-h3-mcFileManagerInternal3fileListPanelHeaderWrapper"]'
|
||||
"//*[@data-testid='ui-typography-h3-mcFileManagerInternal3fileListPanelHeaderWrapper']"
|
||||
)
|
||||
}
|
||||
|
||||
public get appsCategoryAddFilesButton() {
|
||||
return $(
|
||||
'[data-testid="primary-button-mcFileManagerInternal3filesUploadButton"]'
|
||||
"//*[@data-testid='primary-button-mcFileManagerInternal3filesUploadButton']"
|
||||
)
|
||||
}
|
||||
|
||||
public get firstFileInTheAppsCategory() {
|
||||
return $(
|
||||
'[data-testid="ui-typography-p1-mcFileManagerInternal3columnNameText"]'
|
||||
"//*[@data-testid='ui-typography-p1-mcFileManagerInternal3columnNameText']"
|
||||
)
|
||||
}
|
||||
|
||||
public get firstFileInTheAppsCategoryInstallModal() {
|
||||
return $(
|
||||
"//*[@data-testid='modal-content-mcFileManagerInternal3startAppInstallationModal']"
|
||||
)
|
||||
}
|
||||
|
||||
public get firstFileInTheAppsCategoryInstallModalBackButton() {
|
||||
return $(
|
||||
"//*[@data-testid='primary-button-mcFileManagerInternal3startAppInstallationModalCancelButton']"
|
||||
)
|
||||
}
|
||||
|
||||
public get firstFileInTheAppsCategoryInstallModalTitle() {
|
||||
return $("//h1[contains(text(), 'Continue install of third party app?')]")
|
||||
}
|
||||
|
||||
public get firstFileInTheAppsCategoryInstallModalBody() {
|
||||
return $(
|
||||
"//*[@data-testid='ui-typography-p1-mcFileManagerInternal3startAppInstallationModalContentText']"
|
||||
)
|
||||
}
|
||||
|
||||
public get checkboxFirstFileApps() {
|
||||
return $(
|
||||
"//*[@data-testid='ui-checkbox-mcFileManagerInternal3contactCheckbox']"
|
||||
)
|
||||
}
|
||||
|
||||
public get firstFileInTheAppsCategoryDeleteButton() {
|
||||
return $(
|
||||
"//*[@data-testid='button-text_mcFileManagerInternal3deleteButton']"
|
||||
)
|
||||
}
|
||||
|
||||
public get firstFileInTheAppsCategoryDeleteModal() {
|
||||
return $(
|
||||
"//*[@data-testid='modal-content-mcFileManagerInternal3deleteModal']"
|
||||
)
|
||||
}
|
||||
|
||||
public get firstFileInTheAppsCategoryDeleteModalCancelButton() {
|
||||
return $(
|
||||
"//*[@data-testid='primary-button-mcFileManagerInternal3deleteModalCancelButton']"
|
||||
)
|
||||
}
|
||||
|
||||
public get firstFileInTheAppsCategoryDeleteModalDeleteFileButton() {
|
||||
return $(
|
||||
"//*[@data-testid='primary-button-mcFileManagerInternal3deleteModalConfirmButton']"
|
||||
)
|
||||
}
|
||||
|
||||
public get appsCategoryEmptyTitle() {
|
||||
return $(
|
||||
'[data-testid="ui-typography-h4-mcFileManagerInternal3fileListEmptyStateHeader"]'
|
||||
"//*[@data-testid='ui-typography-h4-mcFileManagerInternal3fileListEmptyStateHeader']"
|
||||
)
|
||||
}
|
||||
|
||||
public get appsCategoryEmptySubtext() {
|
||||
return $(
|
||||
'[data-testid="ui-typography-p3-mcFileManagerInternal3fileListEmptyStateDescription"]'
|
||||
"//*[@data-testid='ui-typography-p3-mcFileManagerInternal3fileListEmptyStateDescription']"
|
||||
)
|
||||
}
|
||||
|
||||
public get musicCategoryHeaderSD() {
|
||||
return $(
|
||||
'[data-testid="ui-typography-h3-mcFileManagerExternal0fileListPanelHeaderWrapper"]'
|
||||
"//*[@data-testid='ui-typography-h3-mcFileManagerExternal0fileListPanelHeaderWrapper']"
|
||||
)
|
||||
}
|
||||
|
||||
public get musicCategoryAddFilesButtonSD() {
|
||||
return $(
|
||||
'[data-testid="primary-button-mcFileManagerExternal0filesUploadButton"]'
|
||||
"//*[@data-testid='primary-button-mcFileManagerExternal0filesUploadButton']"
|
||||
)
|
||||
}
|
||||
|
||||
public get firstFileInTheMusicCategorySD() {
|
||||
return $(
|
||||
'[data-testid="ui-typography-p1-mcFileManagerExternal0columnNameText"]'
|
||||
"//*[@data-testid='ui-typography-p1-mcFileManagerExternal0columnNameText']"
|
||||
)
|
||||
}
|
||||
|
||||
public get checkboxFirstFileMusicSD() {
|
||||
return $(
|
||||
"//*[@data-testid='ui-checkbox-mcFileManagerExternal0contactCheckbox']"
|
||||
)
|
||||
}
|
||||
|
||||
public get firstFileInTheMusicCategoryDeleteButtonSD() {
|
||||
return $("//button[contains(text(), 'Delete')]")
|
||||
}
|
||||
|
||||
public get firstFileInTheMusicCategoryDeleteModalSD() {
|
||||
return $(
|
||||
"//*[@data-testid='modal-content-mcFileManagerExternal0deleteModal']"
|
||||
)
|
||||
}
|
||||
|
||||
public get firstFileInTheMusicCategoryDeleteModalCancelButtonSD() {
|
||||
return $(
|
||||
"//*[@data-testid='primary-button-mcFileManagerExternal0deleteModalCancelButton']"
|
||||
)
|
||||
}
|
||||
|
||||
public get firstFileInTheMusicCategoryDeleteModalDeleteFileButtonSD() {
|
||||
return $(
|
||||
"//*[@data-testid='primary-button-mcFileManagerExternal0deleteModalConfirmButton']"
|
||||
)
|
||||
}
|
||||
|
||||
public get musicCategoryEmptyTitleSD() {
|
||||
return $(
|
||||
'[data-testid="ui-typography-h4-mcFileManagerExternal0fileListEmptyStateHeader"]'
|
||||
"//*[@data-testid='ui-typography-h4-mcFileManagerExternal0fileListEmptyStateHeader']"
|
||||
)
|
||||
}
|
||||
|
||||
public get musicCategoryEmptySubtextSD() {
|
||||
return $(
|
||||
'[data-testid="ui-typography-p3-mcFileManagerExternal0fileListEmptyStateDescription"]'
|
||||
"//*[@data-testid='ui-typography-p3-mcFileManagerExternal0fileListEmptyStateDescription']"
|
||||
)
|
||||
}
|
||||
|
||||
public get photosCategoryButtonSD() {
|
||||
return $(
|
||||
'[data-testid="ui-typography-h4-mcFileManagerExternal1categoryListItemNameText"]'
|
||||
"//*[@data-testid='ui-typography-h4-mcFileManagerExternal1categoryListItemNameText']"
|
||||
)
|
||||
}
|
||||
|
||||
public get photosCategoryHeaderSD() {
|
||||
return $(
|
||||
'[data-testid="ui-typography-h3-mcFileManagerExternal1fileListPanelHeaderWrapper"]'
|
||||
"//*[@data-testid='ui-typography-h3-mcFileManagerExternal1fileListPanelHeaderWrapper']"
|
||||
)
|
||||
}
|
||||
|
||||
public get photosCategoryAddFilesButtonSD() {
|
||||
return $(
|
||||
'[data-testid="primary-button-mcFileManagerExternal1filesUploadButton"]'
|
||||
"//*[@data-testid='primary-button-mcFileManagerExternal1filesUploadButton']"
|
||||
)
|
||||
}
|
||||
|
||||
public get firstFileInThePhotosCategorySD() {
|
||||
return $(
|
||||
'[data-testid="ui-typography-p1-mcFileManagerExternal1columnNameText"]'
|
||||
"//*[@data-testid='ui-typography-p1-mcFileManagerExternal1columnNameText']"
|
||||
)
|
||||
}
|
||||
|
||||
public get checkboxFirstFilePhotosSD() {
|
||||
return $(
|
||||
"//*[@data-testid='ui-checkbox-mcFileManagerExternal1contactCheckbox']"
|
||||
)
|
||||
}
|
||||
|
||||
public get firstFileInThePhotosCategoryDeleteButtonSD() {
|
||||
return $("//button[contains(text(), 'Delete')]")
|
||||
}
|
||||
|
||||
public get firstFileInThePhotosCategoryDeleteModalSD() {
|
||||
return $(
|
||||
"//*[@data-testid='modal-content-mcFileManagerExternal1deleteModal']"
|
||||
)
|
||||
}
|
||||
|
||||
public get firstFileInThePhotosCategoryDeleteModalCancelButtonSD() {
|
||||
return $(
|
||||
"//*[@data-testid='primary-button-mcFileManagerExternal1deleteModalCancelButton']"
|
||||
)
|
||||
}
|
||||
|
||||
public get firstFileInThePhotosCategoryDeleteModalDeleteFileButtonSD() {
|
||||
return $(
|
||||
"//*[@data-testid='primary-button-mcFileManagerExternal1deleteModalConfirmButton']"
|
||||
)
|
||||
}
|
||||
|
||||
public get photosCategoryEmptyTitleSD() {
|
||||
return $(
|
||||
'[data-testid="ui-typography-h4-mcFileManagerExternal1fileListEmptyStateHeader"]'
|
||||
"//*[@data-testid='ui-typography-h4-mcFileManagerExternal1fileListEmptyStateHeader']"
|
||||
)
|
||||
}
|
||||
|
||||
public get photosCategoryEmptySubtextSD() {
|
||||
return $(
|
||||
'[data-testid="ui-typography-p3-mcFileManagerExternal1fileListEmptyStateDescription"]'
|
||||
"//*[@data-testid='ui-typography-p3-mcFileManagerExternal1fileListEmptyStateDescription']"
|
||||
)
|
||||
}
|
||||
|
||||
public get ebooksCategoryButtonSD() {
|
||||
return $(
|
||||
'[data-testid="ui-typography-h4-mcFileManagerExternal2categoryListItemNameText"]'
|
||||
"//*[@data-testid='ui-typography-h4-mcFileManagerExternal2categoryListItemNameText']"
|
||||
)
|
||||
}
|
||||
|
||||
public get ebooksCategoryHeaderSD() {
|
||||
return $(
|
||||
'[data-testid="ui-typography-h3-mcFileManagerExternal2fileListPanelHeaderWrapper"]'
|
||||
"//*[@data-testid='ui-typography-h3-mcFileManagerExternal2fileListPanelHeaderWrapper']"
|
||||
)
|
||||
}
|
||||
|
||||
public get ebooksCategoryAddFilesButtonSD() {
|
||||
return $(
|
||||
'[data-testid="primary-button-mcFileManagerExternal2filesUploadButton"]'
|
||||
"//*[@data-testid='primary-button-mcFileManagerExternal2filesUploadButton']"
|
||||
)
|
||||
}
|
||||
|
||||
public get firstFileInTheEbooksCategorySD() {
|
||||
return $(
|
||||
'[data-testid="ui-typography-p1-mcFileManagerExternal2columnNameText"]'
|
||||
"//*[@data-testid='ui-typography-p1-mcFileManagerExternal2columnNameText']"
|
||||
)
|
||||
}
|
||||
|
||||
public get checkboxFirstFileEbooksSD() {
|
||||
return $(
|
||||
"//*[@data-testid='ui-checkbox-mcFileManagerExternal2contactCheckbox']"
|
||||
)
|
||||
}
|
||||
|
||||
public get firstFileInTheEbooksCategoryDeleteButtonSD() {
|
||||
return $("//button[contains(text(), 'Delete')]")
|
||||
}
|
||||
|
||||
public get firstFileInTheEbooksCategoryDeleteModalSD() {
|
||||
return $(
|
||||
"//*[@data-testid='modal-content-mcFileManagerExternal2deleteModal']"
|
||||
)
|
||||
}
|
||||
|
||||
public get firstFileInTheEbooksCategoryDeleteModalCancelButtonSD() {
|
||||
return $(
|
||||
"//*[@data-testid='primary-button-mcFileManagerExternal2deleteModalCancelButton']"
|
||||
)
|
||||
}
|
||||
|
||||
public get firstFileInTheEbooksCategoryDeleteModalDeleteFileButtonSD() {
|
||||
return $(
|
||||
"//*[@data-testid='primary-button-mcFileManagerExternal2deleteModalConfirmButton']"
|
||||
)
|
||||
}
|
||||
|
||||
public get ebooksCategoryEmptyTitleSD() {
|
||||
return $(
|
||||
'[data-testid="ui-typography-h4-mcFileManagerExternal2fileListEmptyStateHeader"]'
|
||||
"//*[@data-testid='ui-typography-h4-mcFileManagerExternal2fileListEmptyStateHeader']"
|
||||
)
|
||||
}
|
||||
|
||||
public get ebooksCategoryEmptySubtextSD() {
|
||||
return $(
|
||||
'[data-testid="ui-typography-p3-mcFileManagerExternal2fileListEmptyStateDescription"]'
|
||||
"//*[@data-testid='ui-typography-p3-mcFileManagerExternal2fileListEmptyStateDescription']"
|
||||
)
|
||||
}
|
||||
|
||||
public get appsCategoryButtonSD() {
|
||||
return $(
|
||||
'[data-testid="ui-typography-h4-mcFileManagerExternal3categoryListItemNameText"]'
|
||||
"//*[@data-testid='ui-typography-h4-mcFileManagerExternal3categoryListItemNameText']"
|
||||
)
|
||||
}
|
||||
|
||||
public get appsCategoryHeaderSD() {
|
||||
return $(
|
||||
'[data-testid="ui-typography-h3-mcFileManagerExternal3fileListPanelHeaderWrapper"]'
|
||||
"//*[@data-testid='ui-typography-h3-mcFileManagerExternal3fileListPanelHeaderWrapper']"
|
||||
)
|
||||
}
|
||||
|
||||
public get appsCategoryAddFilesButtonSD() {
|
||||
return $(
|
||||
'[data-testid="primary-button-mcFileManagerExternal3filesUploadButton"]'
|
||||
"//*[@data-testid='primary-button-mcFileManagerExternal3filesUploadButton']"
|
||||
)
|
||||
}
|
||||
|
||||
public get firstFileInTheAppsCategorySD() {
|
||||
return $(
|
||||
'[data-testid="ui-typography-p1-mcFileManagerExternal3columnNameText"]'
|
||||
"//*[@data-testid='ui-typography-p1-mcFileManagerExternal3columnNameText']"
|
||||
)
|
||||
}
|
||||
|
||||
public get firstFileInTheAppsCategoryInstallModalSD() {
|
||||
return $(
|
||||
"//*[@data-testid='modal-content-mcFileManagerExternal3startAppInstallationModal']"
|
||||
)
|
||||
}
|
||||
|
||||
public get firstFileInTheAppsCategoryInstallModalTitleSD() {
|
||||
return $("//h1[contains(text(), 'Continue install of third party app?')]")
|
||||
}
|
||||
|
||||
public get firstFileInTheAppsCategoryInstallModalBodySD() {
|
||||
return $(
|
||||
"//*[@data-testid='ui-typography-p1-mcFileManagerExternal3startAppInstallationModalContentText']"
|
||||
)
|
||||
}
|
||||
|
||||
public get checkboxFirstFileAppsSD() {
|
||||
return $(
|
||||
"//*[@data-testid='ui-checkbox-mcFileManagerExternal3contactCheckbox']"
|
||||
)
|
||||
}
|
||||
|
||||
public get checkboxAllFilesAppsSD() {
|
||||
return $(
|
||||
"//*[@data-testid='ui-checkbox-mcFileManagerExternal3selectAllCheckbox']"
|
||||
)
|
||||
}
|
||||
|
||||
public get firstFileInTheAppsCategoryDeleteButtonSD() {
|
||||
return $("//button[contains(text(), 'Delete')]")
|
||||
}
|
||||
|
||||
public get firstFileInTheAppsCategoryDeleteModalSD() {
|
||||
return $(
|
||||
"//*[@data-testid='modal-content-mcFileManagerExternal3deleteModal']"
|
||||
)
|
||||
}
|
||||
|
||||
public get firstFileInTheAppsCategoryDeleteModalCancelButtonSD() {
|
||||
return $(
|
||||
"//*[@data-testid='primary-button-mcFileManagerExternal3deleteModalCancelButton']"
|
||||
)
|
||||
}
|
||||
|
||||
public get firstFileInTheAppsCategoryDeleteModalDeleteFileButtonSD() {
|
||||
return $(
|
||||
"//*[@data-testid='primary-button-mcFileManagerExternal3deleteModalConfirmButton']"
|
||||
)
|
||||
}
|
||||
|
||||
public get appsCategoryEmptyTitleSD() {
|
||||
return $(
|
||||
'[data-testid="ui-typography-h4-mcFileManagerExternal3fileListEmptyStateHeader"]'
|
||||
"//*[@data-testid='ui-typography-h4-mcFileManagerExternal3fileListEmptyStateHeader']"
|
||||
)
|
||||
}
|
||||
|
||||
public get appsCategoryEmptySubtextSD() {
|
||||
return $(
|
||||
'[data-testid="ui-typography-p3-mcFileManagerExternal3fileListEmptyStateDescription"]'
|
||||
"//*[@data-testid='ui-typography-p3-mcFileManagerExternal3fileListEmptyStateDescription']"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default new ManageFiles()
|
||||
|
||||
@@ -7,27 +7,27 @@ import Page from "./page"
|
||||
|
||||
class ModalPage extends Page {
|
||||
get modalHeader() {
|
||||
return $('[data-testid="modal-title"]')
|
||||
return $("//*[@data-testid='modal-title']")
|
||||
}
|
||||
|
||||
get updateNotAvailable() {
|
||||
return $('[data-testid="app-update-not-available"]')
|
||||
return $("//*[@data-testid='app-update-not-available']")
|
||||
}
|
||||
|
||||
get updateAvailable() {
|
||||
return $('[data-testid="app-update-available"]')
|
||||
return $("//*[@data-testid='app-update-available']")
|
||||
}
|
||||
|
||||
get updateError() {
|
||||
return $('[data-testid="app-update-error"]')
|
||||
return $("//*[@data-testid='app-update-error']")
|
||||
}
|
||||
|
||||
get checkingFailedUpdateSubtitle() {
|
||||
return $("h4*=Checking failed")
|
||||
return $("//h4[contains(text(), 'Checking failed')]")
|
||||
}
|
||||
|
||||
get checkingFailedUpdateBody() {
|
||||
return $("p*=Oops, something went wrong.")
|
||||
return $("//p[contains(text(), 'Oops, something went wrong.')]")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,27 +7,27 @@ import Page from "./page"
|
||||
|
||||
export class Menu extends Page {
|
||||
public get newsLink() {
|
||||
return $(`//a[@href="#/news"]`)
|
||||
return $("//a[@href='#/news']")
|
||||
}
|
||||
|
||||
public get kompaktLabel() {
|
||||
return $('[data-testid="Kompakt"]')
|
||||
return $("//*[@data-testid='Kompakt']")
|
||||
}
|
||||
|
||||
public get overviewLink() {
|
||||
return $(`//a[@href="#/generic/mc-overview"]`)
|
||||
return $("//a[@href='#/generic/mc-overview']")
|
||||
}
|
||||
|
||||
public get muditaCenterLabel() {
|
||||
return $('[data-testid="component.menuHeaderDesktopApp"]')
|
||||
return $("//*[@data-testid='component.menuHeaderDesktopApp']")
|
||||
}
|
||||
|
||||
public get settingsLink() {
|
||||
return $(`//a[@href="#/settings"]`)
|
||||
return $("//a[@href='#/settings']")
|
||||
}
|
||||
|
||||
public get helpLink() {
|
||||
return $(`//a[@href="#/help"]`)
|
||||
return $("//a[@href='#/help']")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,19 +7,19 @@ import Page from "./page"
|
||||
|
||||
class ModalAppUpdateError extends Page {
|
||||
public get infoIcon() {
|
||||
return $('[data-testid="icon-Info"]')
|
||||
return $("//*[@data-testid='icon-Info']")
|
||||
}
|
||||
|
||||
public get errorLabel() {
|
||||
return $("h4*=Error")
|
||||
return $("//h4[contains(text(), 'Error')]")
|
||||
}
|
||||
|
||||
public get pleaseRestartParagraph() {
|
||||
return $("p*=Please restart the app")
|
||||
return $("//p[contains(text(), 'Please restart the app')]")
|
||||
}
|
||||
|
||||
public get closeButton() {
|
||||
return $('[data-testid="close-bottom-button"]')
|
||||
return $("//*[@data-testid='close-bottom-button']")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,32 +7,33 @@ import Page from "./page"
|
||||
|
||||
class ModalAppUpdateLater extends Page {
|
||||
get modalHeader() {
|
||||
return $('[data-testid="modal-title"]')
|
||||
return $("//*[@data-testid='modal-title']")
|
||||
}
|
||||
|
||||
get modalCloseButton() {
|
||||
return $('[data-testid="close-modal-button"]')
|
||||
return $("//*[@data-testid='close-modal-button']")
|
||||
}
|
||||
|
||||
get appUpdateFlowContainer() {
|
||||
return $('[data-testid="app-update-flow-container"]')
|
||||
return $("//*[@data-testid='app-update-flow-container']")
|
||||
}
|
||||
|
||||
get paragraphAvailableVersion() {
|
||||
return $("h4*=Update Mudita Center to")
|
||||
return $("//h4[contains(text(), 'Update Mudita Center to')]")
|
||||
}
|
||||
|
||||
get paragraphUpdateLaterPrivacyPolicy() {
|
||||
return $(
|
||||
"p*=To be able to fully use the application, please agree to the Privacy Policy and update Mudita Center."
|
||||
"//p[contains(text(), 'please agree to the Privacy Policy and update Mudita Center.')]"
|
||||
)
|
||||
}
|
||||
|
||||
get buttonUpdateLater() {
|
||||
return $('[data-testid="close-bottom-button"]')
|
||||
return $("//*[@data-testid='close-bottom-button']")
|
||||
}
|
||||
|
||||
get buttonUpdate() {
|
||||
return $('[data-testid="modal-action-button"]')
|
||||
return $("//*[@data-testid='modal-action-button']")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,45 +7,47 @@ import Page from "./page"
|
||||
|
||||
class ModalAppUpdate extends Page {
|
||||
get modalHeader() {
|
||||
return $('[data-testid="modal-title"]')
|
||||
return $("//*[@data-testid='modal-title']")
|
||||
}
|
||||
|
||||
public get paragraphAvailableVersion() {
|
||||
return $("h4*=Update Mudita Center to")
|
||||
return $("//h4[contains(text(), 'Update Mudita Center to')]")
|
||||
}
|
||||
|
||||
public get paragraphCurrentVersion() {
|
||||
return $("p*=Update it to use")
|
||||
return $("//p[contains(text(), 'Update it to use')]")
|
||||
}
|
||||
|
||||
public get paragraphPrivacyPolicy() {
|
||||
return $(
|
||||
"p*=Please accept the Privacy Policy to start updating Mudita Center."
|
||||
"//p[contains(text(), 'Please accept the Privacy Policy to start updating Mudita Center.')]"
|
||||
)
|
||||
}
|
||||
|
||||
public get linkPrivacyPolicy() {
|
||||
return $("a=Privacy Policy")
|
||||
return $("//a[text()='Privacy Policy']")
|
||||
}
|
||||
|
||||
public get checkboxPrivacyPolicy() {
|
||||
return $('[data-testid="privacy-policy-checkbox"]')
|
||||
return $("//*[@data-testid='privacy-policy-checkbox']")
|
||||
}
|
||||
|
||||
public get buttonUpdate() {
|
||||
return $('[data-testid="modal-action-button"]')
|
||||
return $("//*[@data-testid='modal-action-button']")
|
||||
}
|
||||
|
||||
public get paragraphUpdatingMuditaCenter() {
|
||||
return $("h4*=Updating Mudita Center")
|
||||
return $("//h4[contains(text(), 'Updating Mudita Center')]")
|
||||
}
|
||||
|
||||
public get spinnerLoader() {
|
||||
return $('[data-testid="loader-spinner"]')
|
||||
return $("//*[@data-testid='loader-spinner']")
|
||||
}
|
||||
|
||||
public get paragraphPleaseWait() {
|
||||
return $("p*=Please wait while Mudita Center is being updated.")
|
||||
return $(
|
||||
"//p[contains(text(), 'Please wait while Mudita Center is being updated.')]"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,165 +11,167 @@ import { OverviewPage } from "./overview.page"
|
||||
|
||||
class ModalBackupKompaktPage extends OverviewPage {
|
||||
public get createBackupButton() {
|
||||
return $('[data-testid="primary-button-backupcreate-backup-button"]')
|
||||
return $("//*[@data-testid='primary-button-backupcreate-backup-button']")
|
||||
}
|
||||
public get createBackupProceedNext() {
|
||||
return $('[data-testid="backup-features-modal-create-action"]')
|
||||
return $("//*[@data-testid='backup-features-modal-create-action']")
|
||||
}
|
||||
|
||||
public get contactList() {
|
||||
return $$('[data-testid="backup-features-modal-element-active"]')[0]
|
||||
return $$("//*[@data-testid='backup-features-modal-element-active']")[0]
|
||||
}
|
||||
public get callLog() {
|
||||
return $$('[data-testid="backup-features-modal-element-active"]')[1]
|
||||
return $$("//*[@data-testid='backup-features-modal-element-active']")[1]
|
||||
}
|
||||
public get backupModalTitle() {
|
||||
return $('[data-testid="backup-features-modal-title"]')
|
||||
return $("//*[@data-testid='backup-features-modal-title']")
|
||||
}
|
||||
public get backupModalDescription() {
|
||||
return $('[data-testid="backup-features-modal-description"]')
|
||||
return $("//*[@data-testid='backup-features-modal-description']")
|
||||
}
|
||||
public get backupModalCancel() {
|
||||
return $('[data-testid="backup-features-modal-cancel-action"]')
|
||||
return $("//*[@data-testid='backup-features-modal-cancel-action']")
|
||||
}
|
||||
|
||||
public get backupModalClose() {
|
||||
return $('[data-testid="modal-close-button-icon-button"]')
|
||||
return $("//*[@data-testid='modal-close-button-icon-button']")
|
||||
}
|
||||
|
||||
public get createBackupPasswordModalTitle() {
|
||||
return $('[data-testid="predefined-backup-password-title"]')
|
||||
return $("//*[@data-testid='predefined-backup-password-title']")
|
||||
}
|
||||
|
||||
public get createBackupPasswordOptionalText() {
|
||||
return $('[data-testid="predefined-backup-password-title"] span')
|
||||
return $("//*[@data-testid='predefined-backup-password-title']//span")
|
||||
}
|
||||
public get createBackupPasswordModalDescription() {
|
||||
return $('[data-testid="predefined-backup-password-description"]')
|
||||
return $("//*[@data-testid='predefined-backup-password-description']")
|
||||
}
|
||||
|
||||
public get createBackupPasswordModalDescriptionMore() {
|
||||
return $('[data-testid="predefined-backup-password-description"] span')
|
||||
return $("//*[@data-testid='predefined-backup-password-description']//span")
|
||||
}
|
||||
|
||||
public get createBackupPasswordPlaceholder() {
|
||||
return $('[data-testid="predefined-backup-password-placeholder"]')
|
||||
return $("//*[@data-testid='predefined-backup-password-placeholder']")
|
||||
}
|
||||
|
||||
public get createBackupPasswordRepeatPlaceholder() {
|
||||
return $('[data-testid="predefined-backup-password-repeat-placeholder"]')
|
||||
return $(
|
||||
"//*[@data-testid='predefined-backup-password-repeat-placeholder']"
|
||||
)
|
||||
}
|
||||
|
||||
public get createBackupPasswordConfirm() {
|
||||
return $('[data-testid="predefined-backup-password-confirm-button"]')
|
||||
return $("//*[@data-testid='predefined-backup-password-confirm-button']")
|
||||
}
|
||||
|
||||
public get createBackupPasswordSkip() {
|
||||
return $('[data-testid="predefined-backup-password-skip-button"]')
|
||||
return $("//*[@data-testid='predefined-backup-password-skip-button']")
|
||||
}
|
||||
|
||||
public get createBackupPasswordClose() {
|
||||
return $('[data-testid="modal-close-button-icon-button"]')
|
||||
return $("//*[@data-testid='modal-close-button-icon-button']")
|
||||
}
|
||||
|
||||
public get inputPassword() {
|
||||
return $$('[data-testid="interactive-text-input-input"]')[0]
|
||||
return $$("//*[@data-testid='interactive-text-input-input']")[0]
|
||||
}
|
||||
|
||||
public get repeatInputPassword() {
|
||||
return $$('[data-testid="interactive-text-input-input"]')[1]
|
||||
return $$("//*[@data-testid='interactive-text-input-input']")[1]
|
||||
}
|
||||
|
||||
public get unhidePasswordIcon() {
|
||||
return $('[data-testid="icon-password-hide"]')
|
||||
return $("//*[@data-testid='icon-password-hide']")
|
||||
}
|
||||
|
||||
public get hidePasswordIcon() {
|
||||
return $('[data-testid="icon-password-show"]')
|
||||
return $("//*[@data-testid='icon-password-show']")
|
||||
}
|
||||
|
||||
public get passwordsDoNotMatch() {
|
||||
return $('[data-testid="interactive-text-input-error-text"]')
|
||||
return $("//*[@data-testid='interactive-text-input-error-text']")
|
||||
}
|
||||
|
||||
public get backupInProgressModal() {
|
||||
return $('//*[@data-testid="modal-content-backupbackup-create"]')
|
||||
return $("//*[@data-testid='modal-content-backupbackup-create']")
|
||||
}
|
||||
|
||||
public get creatingBackupTitle() {
|
||||
return $(`//*[@data-testid="predefined-backup-progress-title"]`)
|
||||
return $("//*[@data-testid='predefined-backup-progress-title']")
|
||||
}
|
||||
|
||||
public get creatingBackupDescription() {
|
||||
return $(
|
||||
`//*[@data-testid="${PredefinedBackupProgressTestIds.Description}"]`
|
||||
`//*[@data-testid='${PredefinedBackupProgressTestIds.Description}']`
|
||||
)
|
||||
}
|
||||
|
||||
public get creatingBackupProgressBar() {
|
||||
return $(`//*[@data-testid="${ProgressBarTestIds.Progress}"]`)
|
||||
return $(`//*[@data-testid='${ProgressBarTestIds.Progress}']`)
|
||||
}
|
||||
|
||||
public get creatingBackupProgressBarDetails() {
|
||||
return $(`//*[@data-testid="${ProgressBarTestIds.Details}"]`)
|
||||
return $(`//*[@data-testid='${ProgressBarTestIds.Details}']`)
|
||||
}
|
||||
|
||||
public get backupInProgressModalSuccess() {
|
||||
return $('//*[@data-testid="modal-content-backupbackup-create"]')
|
||||
return $("//*[@data-testid='modal-content-backupbackup-create']")
|
||||
}
|
||||
|
||||
public get backupSuccessIcon() {
|
||||
return $('//*[@data-testid="icon-success"]')
|
||||
return $("//*[@data-testid='icon-success']")
|
||||
}
|
||||
|
||||
public get backupSuccessTitle() {
|
||||
return $('//h1[text()="Backup complete"]')
|
||||
return $("//h1[text()='Backup complete']")
|
||||
}
|
||||
|
||||
public get backupSuccessSubTitle() {
|
||||
return $(
|
||||
'//p[text()="Your data was successfully secured.\nOpen the backup folder to see your backup data or close this window."]'
|
||||
"//p[contains(text(), 'successfully secured') and contains(text(), 'backup folder')]"
|
||||
)
|
||||
}
|
||||
|
||||
public get backupSuccessModalCloseButton() {
|
||||
return $('//*[@data-testid="primary-button-undefined"]')
|
||||
return $("//*[@data-testid='primary-button-undefined']")
|
||||
}
|
||||
|
||||
public get backupInProgressModalCancelled() {
|
||||
return $('//*[@data-testid="modal-content-backupbackup-create"]')
|
||||
return $("//*[@data-testid='modal-content-backupbackup-create']")
|
||||
}
|
||||
|
||||
public get backupCanceledTitle() {
|
||||
return $('//h1[text()="Backup canceled"]')
|
||||
return $("//h1[text()='Backup canceled']")
|
||||
}
|
||||
|
||||
public get backupCanceledSubTitle() {
|
||||
return $('//p[text()="No changes were made."]')
|
||||
return $("//p[text()='No changes were made.']")
|
||||
}
|
||||
|
||||
public get backupFailureIcon() {
|
||||
return $('//*[@data-testid="icon-failure"]')
|
||||
return $("//*[@data-testid='icon-failure']")
|
||||
}
|
||||
|
||||
public get backupFailedModal() {
|
||||
return $('//*[@data-testid="modal-content-backup-error-modal"]')
|
||||
return $("//*[@data-testid='modal-content-backup-error-modal']")
|
||||
}
|
||||
|
||||
public get backupFailedTitle() {
|
||||
return $('//h1[text()="Backup failed"]')
|
||||
return $("//h1[text()='Backup failed']")
|
||||
}
|
||||
|
||||
public get backupFailedSubTitle() {
|
||||
return $('//p[text()="The backup process was interrupted."]')
|
||||
return $("//p[text()='The backup process was interrupted.']")
|
||||
}
|
||||
|
||||
public get backupDisconnectedSubTitle() {
|
||||
return $('//p[text()="The backup process was interrupted."]')
|
||||
return $("//p[text()='The backup process was interrupted.']")
|
||||
}
|
||||
|
||||
public get backupFailedModalCloseButton() {
|
||||
return $('//*[@data-testid="primary-button-undefined"]')
|
||||
return $("//*[@data-testid='primary-button-undefined']")
|
||||
}
|
||||
}
|
||||
export default new ModalBackupKompaktPage()
|
||||
|
||||
@@ -7,43 +7,46 @@ import Page from "./page"
|
||||
|
||||
class ModalBackupRestorePage extends Page {
|
||||
public get failModalIcon() {
|
||||
return $('[data-testid="icon-Fail"]')
|
||||
return $("//*[@data-testid='icon-Fail']")
|
||||
}
|
||||
|
||||
public get checkCircleIcon() {
|
||||
return $('[data-testid="icon-CheckCircle"]')
|
||||
return $("//*[@data-testid='icon-CheckCircle']")
|
||||
}
|
||||
|
||||
public get listOfBackups() {
|
||||
return $$('[data-testid="restore-available-backup-modal-body-row"]')
|
||||
return $$("//*[@data-testid='restore-available-backup-modal-body-row']")
|
||||
}
|
||||
|
||||
public get restoreButton() {
|
||||
return $('[data-testid="modal-action-button"]*=Restore')
|
||||
return $(
|
||||
"//button[contains(@data-testid, 'modal-action-button') and contains(., 'Restore')]"
|
||||
)
|
||||
}
|
||||
|
||||
public get restorePasswordInput() {
|
||||
return $('[name="secretKey"]')
|
||||
return $("//*[@name='secretKey']")
|
||||
}
|
||||
|
||||
public get restoreSubmitButton() {
|
||||
return $('[type="submit"]*=Confirm')
|
||||
return $("//button[@type='submit' and contains(., 'Confirm')]")
|
||||
}
|
||||
|
||||
//BACKUP modal objects
|
||||
public get createBackupModalButton() {
|
||||
return $('[data-testid="modal-action-button"]')
|
||||
return $("//*[@data-testid='modal-action-button']")
|
||||
}
|
||||
|
||||
public get backupPasswordFirstInput() {
|
||||
return $('[data-testid="backup-first-input"]')
|
||||
return $("//*[@data-testid='backup-first-input']")
|
||||
}
|
||||
|
||||
public get backupPasswordSecondInput() {
|
||||
return $('[data-testid="backup-second-input"]')
|
||||
return $("//*[@data-testid='backup-second-input']")
|
||||
}
|
||||
|
||||
public get backupSubmitButton() {
|
||||
return $('[data-testid="backup-submit-button"]')
|
||||
return $("//*[@data-testid='backup-submit-button']")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,29 +7,29 @@ import Page from "./page"
|
||||
|
||||
class ModalLicense extends Page {
|
||||
public get modalHeader() {
|
||||
return $('h2[data-testid="license-component-title"]')
|
||||
return $("//h2[@data-testid='license-component-title']")
|
||||
}
|
||||
|
||||
public get firstParagraph() {
|
||||
return $(
|
||||
"p*=Please note that we provide an open source software notice with this app. "
|
||||
"//p[contains(text(), 'we provide an open source software notice with this app')]"
|
||||
)
|
||||
}
|
||||
|
||||
public get sectionWarrantyDisclaimer() {
|
||||
return $("p*=WARRANTY DISCLAIMER")
|
||||
return $("//p[contains(text(), 'WARRANTY DISCLAIMER')]")
|
||||
}
|
||||
|
||||
public get sectionNoticeForFile() {
|
||||
return $("p*=Notice for file(s):")
|
||||
return $("//p[contains(text(), 'Notice for file(s):')]")
|
||||
}
|
||||
|
||||
public get zodLibrarySection() {
|
||||
return $(`//p[contains(., concat('"', 'zod', '": "', '^3.22.4', '"'))]`)
|
||||
return $("//p[contains(., 'zod') and contains(., '^3.22.4')]")
|
||||
}
|
||||
|
||||
public get zodLibraryCopyrightSection() {
|
||||
return $("p*=Copyright (c) 2020 Colin McDonnell")
|
||||
return $("//p[contains(text(), 'Copyright (c) 2020 Colin McDonnell')]")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,66 +7,68 @@ import Page from "./page"
|
||||
|
||||
class ModalPrivacyPolicy extends Page {
|
||||
public get modalHeader() {
|
||||
return $('[data-testid="privacy-policy-component-title"]')
|
||||
return $("//*[@data-testid='privacy-policy-component-title']")
|
||||
}
|
||||
|
||||
public get firstPoint() {
|
||||
return $("p*=The controller of personal data")
|
||||
return $("//p[contains(text(), 'The controller of personal data')]")
|
||||
}
|
||||
|
||||
public get sectionAboutDocument() {
|
||||
return $("p=1. ABOUT DOCUMENT")
|
||||
return $("//p[text()='1. ABOUT DOCUMENT']")
|
||||
}
|
||||
|
||||
public get sectionDataController() {
|
||||
return $("p=2. DATA CONTROLLER")
|
||||
return $("//p[text()='2. DATA CONTROLLER']")
|
||||
}
|
||||
|
||||
public get sectionContact() {
|
||||
return $("p=3. CONTACT")
|
||||
return $("//p[text()='3. CONTACT']")
|
||||
}
|
||||
|
||||
public get sectionPurposesAndLegalBasis() {
|
||||
return $(
|
||||
"p=4. PURPOSES AND LEGAL BASIS FOR THE PROCESSING OF YOUR PERSONAL DATA / RETENTION PERIOD"
|
||||
"//p[text()='4. PURPOSES AND LEGAL BASIS FOR THE PROCESSING OF YOUR PERSONAL DATA / RETENTION PERIOD']"
|
||||
)
|
||||
}
|
||||
|
||||
public get sectionDataRecipients() {
|
||||
return $("p=5. DATA RECIPIENTS")
|
||||
return $("//p[text()='5. DATA RECIPIENTS']")
|
||||
}
|
||||
|
||||
public get sectionAutomatedIndividual() {
|
||||
return $("p=6. AUTOMATED INDIVIDUAL DECISION-MAKING / PROFILING")
|
||||
return $(
|
||||
"//p[text()='6. AUTOMATED INDIVIDUAL DECISION-MAKING / PROFILING']"
|
||||
)
|
||||
}
|
||||
|
||||
public get sectionRightsOfTheData() {
|
||||
return $("p=7. RIGHTS OF THE DATA SUBJECTS")
|
||||
return $("//p[text()='7. RIGHTS OF THE DATA SUBJECTS']")
|
||||
}
|
||||
|
||||
public get sectionTransferOfPersonalData() {
|
||||
return $("p=8. TRANSFER OF PERSONAL DATA TO THIRD COUNTRIES")
|
||||
return $("//p[text()='8. TRANSFER OF PERSONAL DATA TO THIRD COUNTRIES']")
|
||||
}
|
||||
|
||||
public get sectionOtherInformations() {
|
||||
return $(
|
||||
"p=9. OTHER INFORMATIONS ABOUR YOUR PRIVACY / BACKUP / MANAGE MUDITA DEVICE"
|
||||
"//p[contains(text(), '9. OTHER INFORMATIONS ABOUR YOUR PRIVACY')]"
|
||||
)
|
||||
}
|
||||
|
||||
public get sectionFinalProvisions() {
|
||||
return $("p=10. FINAL PROVISIONS")
|
||||
return $("//p[text()='10. FINAL PROVISIONS']")
|
||||
}
|
||||
|
||||
public get privacyPolicyVersion() {
|
||||
return $(
|
||||
"p=This version of the Privacy Policy is effective as of 14.03.2025."
|
||||
"//p[contains(text(), 'This version of the Privacy Policy is effective as of 14.03.2025.')]"
|
||||
)
|
||||
}
|
||||
|
||||
public get rightsToAmendPrivacyPolicy() {
|
||||
return $(
|
||||
"p=In connection with the Mudita’s development and application updates,"
|
||||
"//p[contains(text(), 'In connection with the Mudita’s development and application updates')]"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,11 +7,12 @@ import Page from "./page"
|
||||
|
||||
class AboutKompaktPage extends Page {
|
||||
public get sarHeader() {
|
||||
return $("h3*=SAR")
|
||||
return $("//h3[contains(text(), 'SAR')]")
|
||||
}
|
||||
|
||||
public get modalCloseButton() {
|
||||
return $('[data-testid="icon-close"]')
|
||||
return $("//*[@data-testid='icon-close']")
|
||||
}
|
||||
}
|
||||
|
||||
export default new AboutKompaktPage()
|
||||
|
||||
@@ -7,79 +7,79 @@ import Page from "./page"
|
||||
|
||||
class ModalTermsOfService extends Page {
|
||||
public get modalHeader() {
|
||||
return $('[data-testid="terms-of-service-component-title"]')
|
||||
}
|
||||
|
||||
public get firstParagraph() {
|
||||
return $("p*=National Court Register")
|
||||
return $("//*[@data-testid='terms-of-service-component-title']")
|
||||
}
|
||||
|
||||
public get sectionGeneralProvisions() {
|
||||
return $("p=2. GENERAL PROVISIONS")
|
||||
return $("//p[text()='2. GENERAL PROVISIONS']")
|
||||
}
|
||||
|
||||
public get sectionServices() {
|
||||
return $("p=3. SERVICES / MUDITA CENTER FEATURES")
|
||||
return $("//p[text()='3. SERVICES / MUDITA CENTER FEATURES']")
|
||||
}
|
||||
|
||||
public get sectionIntellectualProperty() {
|
||||
return $("p=4. INTELLECTUAL PROPERTY / LICENSE")
|
||||
return $("//p[text()='4. INTELLECTUAL PROPERTY / LICENSE']")
|
||||
}
|
||||
|
||||
public get sectionUpdates() {
|
||||
return $("p=5. UPDATES")
|
||||
return $("//p[text()='5. UPDATES']")
|
||||
}
|
||||
|
||||
public get sectionHealthDisclaimer() {
|
||||
return $("p=6. HEALTH DISCLAIMER")
|
||||
return $("//p[text()='6. HEALTH DISCLAIMER']")
|
||||
}
|
||||
|
||||
public get sectionUserObligations() {
|
||||
return $("p=7. USER OBLIGATIONS")
|
||||
return $("//p[text()='7. USER OBLIGATIONS']")
|
||||
}
|
||||
|
||||
public get sectionLiability() {
|
||||
return $("p=8. LIABILITY")
|
||||
return $("//p[text()='8. LIABILITY']")
|
||||
}
|
||||
|
||||
public get sectionTerminationOfTheTerms() {
|
||||
return $("p=9. TERMINATION OF THE TERMS OF SERVICE")
|
||||
return $("//p[text()='9. TERMINATION OF THE TERMS OF SERVICE']")
|
||||
}
|
||||
|
||||
public get sectionComplaints() {
|
||||
return $("p=10. COMPLAINTS")
|
||||
return $("//p[text()='10. COMPLAINTS']")
|
||||
}
|
||||
|
||||
public get sectionDisputeResolution() {
|
||||
return $("p=11. DISPUTE RESOLUTION")
|
||||
return $("//p[text()='11. DISPUTE RESOLUTION']")
|
||||
}
|
||||
|
||||
public get sectionAmendments() {
|
||||
return $("p=12. AMENDMENTS")
|
||||
return $("//p[text()='12. AMENDMENTS']")
|
||||
}
|
||||
|
||||
public get sectinonApplicableLaw() {
|
||||
return $("p=13. APPLICABLE LAW / LANGUAGE VERSIONS")
|
||||
return $("//p[text()='13. APPLICABLE LAW / LANGUAGE VERSIONS']")
|
||||
}
|
||||
|
||||
public get sectionFinalProvisions() {
|
||||
return $("p=14. FINAL PROVISIONS")
|
||||
return $("//p[text()='14. FINAL PROVISIONS']")
|
||||
}
|
||||
|
||||
public get companyWebsiteLink() {
|
||||
return $("a=https://www.mudita.com/")
|
||||
return $("//a[contains(text(), 'https://www.mudita.com/')]")
|
||||
}
|
||||
|
||||
public get companyEmailLink() {
|
||||
return $("a=hello@mudita.com")
|
||||
return $("//a[contains(text(), 'hello@mudita.com')]")
|
||||
}
|
||||
|
||||
public get privacyPolicyLink() {
|
||||
return $("a=www.mudita.com/legal/privacy-policy/mudita-center/")
|
||||
return $(
|
||||
"//a[contains(text(), 'www.mudita.com/legal/privacy-policy/mudita-center/')]"
|
||||
)
|
||||
}
|
||||
|
||||
public get termsConditionsLink() {
|
||||
return $("a=https://www.mudita.com/legal/terms-conditions/mudita-center/")
|
||||
return $(
|
||||
"//a[contains(text(), 'https://www.mudita.com/legal/terms-conditions/mudita-center/')]"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,15 +10,15 @@
|
||||
|
||||
export default class ModalPage {
|
||||
public static get modalHeader() {
|
||||
return $('[data-testid="modal-header"]')
|
||||
return $("//*[@data-testid='modal-header']")
|
||||
}
|
||||
|
||||
public static get modalCloseButton() {
|
||||
return this.modalHeader.$('[data-testid="icon-Close"]')
|
||||
return this.modalHeader.$(".//*[@data-testid='icon-Close']")
|
||||
}
|
||||
|
||||
public static get modalOverlay() {
|
||||
return $("div.ReactModal__Overlay")
|
||||
return $("//div[contains(@class, 'ReactModal__Overlay')]")
|
||||
}
|
||||
|
||||
static async closeModalButtonClick() {
|
||||
|
||||
@@ -7,31 +7,31 @@ import Page from "./page"
|
||||
|
||||
class NewsPage extends Page {
|
||||
public get newsHeader() {
|
||||
return $('[data-testid="location"]')
|
||||
return $("//*[@data-testid='location']")
|
||||
}
|
||||
|
||||
public get moreNewsButton() {
|
||||
return $("p*=More news")
|
||||
return $("//p[contains(text(), 'More news')]")
|
||||
}
|
||||
|
||||
public get moreNewsButtonHref() {
|
||||
return $('a[href="https://www.mudita.com/#news"]')
|
||||
return $("//a[@href='https://www.mudita.com/community/blog/']")
|
||||
}
|
||||
|
||||
public get newsCardElements() {
|
||||
return $$('[data-testid="news-card"]')
|
||||
return $$("//*[@data-testid='news-card']")
|
||||
}
|
||||
|
||||
public get newsCardElement() {
|
||||
return $('[data-testid="news-card"]')
|
||||
return $("//*[@data-testid='news-card']")
|
||||
}
|
||||
|
||||
public get sidebarMenuActiveItem() {
|
||||
return $("[aria-current=page]")
|
||||
return $("//*[@aria-current='page']")
|
||||
}
|
||||
|
||||
public get sidebarMenuActiveItemText() {
|
||||
return $("[aria-current=page] p")
|
||||
return $("//*[@aria-current='page']//p")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,52 +7,52 @@ import { OverviewPage } from "./overview.page"
|
||||
|
||||
class OverviewKompaktPage extends OverviewPage {
|
||||
public get header() {
|
||||
return $('[data-testid="location"]')
|
||||
return $("//*[@data-testid='location']")
|
||||
}
|
||||
|
||||
public get aboutYourDevice() {
|
||||
return $('[data-testid="button-text_summary-about"]')
|
||||
return $("//*[@data-testid='button-text_summary-about']")
|
||||
}
|
||||
|
||||
public get sarInformationButtonKompakt() {
|
||||
return $('[data-testid="button-text_sarmodal-button"]')
|
||||
return $("//*[@data-testid='button-text_sarmodal-button']")
|
||||
}
|
||||
|
||||
public get sarInformationPopup() {
|
||||
return $('[data-testid="button-text_sarmodal-button"]')
|
||||
return $("//*[@data-testid='button-text_sarmodal-button']")
|
||||
}
|
||||
|
||||
public get sarInformationPopupCloseButton() {
|
||||
return $('[data-testid="icon-close"]')
|
||||
return $("//*[@data-testid='icon-close']")
|
||||
}
|
||||
|
||||
public get backArrowButton() {
|
||||
return $('[data-testid="icon-ArrowLongLeft"]')
|
||||
return $("//*[@data-testid='icon-ArrowLongLeft']")
|
||||
}
|
||||
|
||||
public get backupInfo() {
|
||||
return $('div[data-testid="block-box-backup"] p')
|
||||
return $("//div[@data-testid='block-box-backup']//p")
|
||||
}
|
||||
|
||||
public get serialNumberLabel() {
|
||||
return $(`//div[@componentkey="summary-serial-number"]/p[1]`)
|
||||
return $("//div[@componentkey='summary-serial-number']/p[1]")
|
||||
}
|
||||
|
||||
public get serialNumberValue() {
|
||||
return $(`//div[@componentkey="summary-serial-number"]/p[2]`)
|
||||
return $("//div[@componentkey='summary-serial-number']/p[2]")
|
||||
}
|
||||
|
||||
public get kompaktImage() {
|
||||
return $('[data-testid="generic-view-image"]')
|
||||
return $("//*[@data-testid='generic-view-image']")
|
||||
}
|
||||
|
||||
public get kompaktSignalIcon() {
|
||||
return $('[data-testid="icon-network-signal-2"]')
|
||||
return $("//*[@data-testid='icon-network-signal-2']")
|
||||
}
|
||||
|
||||
public getStatusRow(rowIndex: number) {
|
||||
return $(
|
||||
`(//div[@data-testid="block-box-status"]/..//h4[@data-testid="icon-text"])[${rowIndex}]`
|
||||
`(//div[@data-testid='block-box-status']/..//h4[@data-testid='icon-text'])[${rowIndex}]`
|
||||
)
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ class OverviewKompaktPage extends OverviewPage {
|
||||
}
|
||||
|
||||
public get kompaktBatteryIcon() {
|
||||
return $('//div[@data-testid="icon-battery-charging-5"]')
|
||||
return $("//div[@data-testid='icon-battery-charging-5']")
|
||||
}
|
||||
|
||||
public get kompaktBatteryLevelValue() {
|
||||
@@ -69,15 +69,94 @@ class OverviewKompaktPage extends OverviewPage {
|
||||
}
|
||||
|
||||
public get kompaktSimCard1Subtext() {
|
||||
return this.getStatusRow(2).$(`//*[@data-testid="icon-subtext"]`)
|
||||
return this.getStatusRow(2).$("//*[@data-testid='icon-subtext']")
|
||||
}
|
||||
|
||||
public get kompaktOsVersion() {
|
||||
return $('[data-testid="version"]')
|
||||
return $("//*[@data-testid='version']")
|
||||
}
|
||||
|
||||
public get kompaktOsVersionLabel() {
|
||||
return $('[data-testid="version-label"]')
|
||||
return $("//*[@data-testid='version-label']")
|
||||
}
|
||||
|
||||
public get kompaktDeviceTypeLabel() {
|
||||
return $("//p[contains(text(), 'Device type:')]")
|
||||
}
|
||||
|
||||
public get kompaktDeviceTypeLabelValue1st() {
|
||||
return $("//p[contains(text(), 'GLOBAL')]")
|
||||
}
|
||||
|
||||
public get kompaktDeviceTypeLabelValue2nd() {
|
||||
return $("//p[contains(text(), 'US')]")
|
||||
}
|
||||
|
||||
public get kompaktRestoreButton() {
|
||||
return $("//*[@data-testid='primary-button-backuprestore-backup-button']")
|
||||
}
|
||||
|
||||
public get kompaktRestoreModal() {
|
||||
return $("//*[@data-testid='modal-content-backupbackup-restore']")
|
||||
}
|
||||
|
||||
public get kompaktRestoreModalIcon() {
|
||||
return $("//*[@data-testid='icon-backup']")
|
||||
}
|
||||
|
||||
public get kompaktRestoreTitle() {
|
||||
return $("//h1[contains(text(), 'Restore from backup')]")
|
||||
}
|
||||
|
||||
public get kompaktRestoreSubtitle() {
|
||||
return $(
|
||||
"//p[contains(text(), 'Select one of the backups you want to restore.')]"
|
||||
)
|
||||
}
|
||||
|
||||
public get kompaktRestoreModalCancel() {
|
||||
return $("//*[@data-testid='primary-button-cancel-restore']")
|
||||
}
|
||||
|
||||
public get kompaktRestoreModalCloseFailedButton() {
|
||||
return $("//*[@data-testid='primary-button-close-restore-modal']")
|
||||
}
|
||||
|
||||
public get restoringFailedHeader() {
|
||||
return $("//h1[text()='Restore failed']")
|
||||
}
|
||||
|
||||
public get restoringFailedDescription() {
|
||||
return $("//p[contains(text(), 'The restore process was interrupted.')]")
|
||||
}
|
||||
|
||||
public get kompaktRestoreModalConfirm() {
|
||||
return $("//*[@data-testid='primary-button-confirm-restore']")
|
||||
}
|
||||
|
||||
public async getLatestBackupLabel() {
|
||||
const labels = await $$("//label[contains(@for, 'input-')]")
|
||||
return labels[0]
|
||||
}
|
||||
|
||||
public get restoringHeader() {
|
||||
return $("//h1[text()='Restoring']")
|
||||
}
|
||||
|
||||
public get restoringDescription() {
|
||||
return $("//p[contains(text(), 'Please wait')]")
|
||||
}
|
||||
|
||||
public get progressbarDescription() {
|
||||
return $("//*[@data-testid='progressbar-description']")
|
||||
}
|
||||
|
||||
public get progressbar() {
|
||||
return $("//*[@data-testid='progressbar-progress']")
|
||||
}
|
||||
|
||||
public get progressbarLabel() {
|
||||
return $("//*[@data-testid='progressbar-details']")
|
||||
}
|
||||
}
|
||||
export default new OverviewKompaktPage()
|
||||
|
||||
@@ -8,22 +8,22 @@ import Page from "./page"
|
||||
|
||||
class SelectDevicePage extends Page {
|
||||
public get devicesList() {
|
||||
return $("[data-testid='devices-list']")
|
||||
return $("//*[@data-testid='devices-list']")
|
||||
}
|
||||
public get availableDevices() {
|
||||
return $$('[data-testid="available-device"]')
|
||||
return $$("//*[@data-testid='available-device']")
|
||||
}
|
||||
public get selectDeviceSerialNumber() {
|
||||
return $$('[data-testid="available-device-serial-number"]')
|
||||
return $$("//*[@data-testid='available-device-serial-number']")
|
||||
}
|
||||
public get selectDeviceName() {
|
||||
return $$('[data-testid="available-device-name"]')
|
||||
return $$("//*[@data-testid='available-device-name']")
|
||||
}
|
||||
public get selectADeviceToContinueTitle() {
|
||||
return $("h1*=Select a device to continue")
|
||||
return $("//h1[contains(text(), 'Select a device to continue')]")
|
||||
}
|
||||
public getDeviceOnSelectModal(index: number) {
|
||||
return $(`(//p[@data-testid="available-device-serial-number"])[${index}]`)
|
||||
return $(`(//p[@data-testid='available-device-serial-number'])[${index}]`)
|
||||
}
|
||||
}
|
||||
export default new SelectDevicePage()
|
||||
|
||||
@@ -7,107 +7,107 @@ import Page from "./page"
|
||||
|
||||
class SettingsPage extends Page {
|
||||
public get locationTextLabel() {
|
||||
return $('[data-testid="location"]')
|
||||
return $("//*[@data-testid='location']")
|
||||
}
|
||||
|
||||
public get generalTab() {
|
||||
return $('a[href="#/settings"] [data-testid="icon-Connection"]')
|
||||
return $("//a[@href='#/settings']//*[@data-testid='icon-Connection']")
|
||||
}
|
||||
|
||||
public get backupTab() {
|
||||
return $('a[href="#/settings/backup"]')
|
||||
return $("//a[@href='#/settings/backup']")
|
||||
}
|
||||
|
||||
public get aboutTab() {
|
||||
return $('a[href="#/settings/about"]')
|
||||
return $("//a[@href='#/settings/about']")
|
||||
}
|
||||
|
||||
public get generalSendLogsTextLabel() {
|
||||
return $("p*=Send Mudita Center logs to Mudita")
|
||||
return $("//p[contains(text(), 'Send Mudita Center logs to Mudita')]")
|
||||
}
|
||||
|
||||
public get backupLocationPathTextLabel() {
|
||||
return $('[data-testid="backup-location"]')
|
||||
return $("//*[@data-testid='backup-location']")
|
||||
}
|
||||
|
||||
public get aboutInstalledVersionTextLabel() {
|
||||
return $("p*=Mudita Center - installed version:")
|
||||
return $("//p[contains(text(), 'Mudita Center - installed version:')]")
|
||||
}
|
||||
|
||||
get aboutUpToDateLabel() {
|
||||
return $("p=You’re up to date.")
|
||||
public get aboutUpToDateLabel() {
|
||||
return $("//p[contains(text(), 'You’re up to date.')]")
|
||||
}
|
||||
|
||||
get aboutCheckForUpdateFailedLabel() {
|
||||
return $("p=Checking for updates failed")
|
||||
public get aboutCheckForUpdateFailedLabel() {
|
||||
return $("//p[text()='Checking for updates failed']")
|
||||
}
|
||||
|
||||
get aboutCheckForUpdatesButton() {
|
||||
return $('[data-testid="about-update-button"]')
|
||||
public get aboutCheckForUpdatesButton() {
|
||||
return $("//*[@data-testid='about-update-button']")
|
||||
}
|
||||
|
||||
public get aboutTermsOfServiceTextLabel() {
|
||||
return $("p*=Terms of service")
|
||||
return $("//p[contains(text(), 'Terms of service')]")
|
||||
}
|
||||
|
||||
public get aboutTermsOfServiceButton() {
|
||||
return $('[data-testid="terms-of-service-button"]')
|
||||
return $("//*[@data-testid='terms-of-service-button']")
|
||||
}
|
||||
|
||||
public get aboutTermsOfServiceComponentWrapper() {
|
||||
return $('[data-testid="terms-of-service-component-wrapper"]')
|
||||
return $("//*[@data-testid='terms-of-service-component-wrapper']")
|
||||
}
|
||||
|
||||
public get aboutPrivacyPolicyTextLabel() {
|
||||
return $("p*=Privacy Policy")
|
||||
return $("//p[contains(text(), 'Privacy Policy')]")
|
||||
}
|
||||
|
||||
public get aboutPrivacyPolicyButton() {
|
||||
return $('[data-testid="about-privacy-policy-button"]')
|
||||
return $("//*[@data-testid='about-privacy-policy-button']")
|
||||
}
|
||||
|
||||
public get aboutPrivacyPolicyComponentWrapper() {
|
||||
return $('[data-testid="privacy-policy-component-wrapper"]')
|
||||
return $("//*[@data-testid='privacy-policy-component-wrapper']")
|
||||
}
|
||||
|
||||
public get aboutLicenseTextLabel() {
|
||||
return $("p*=License")
|
||||
return $("//p[contains(text(), 'License')]")
|
||||
}
|
||||
|
||||
public get aboutLicenseButton() {
|
||||
return $('[data-testid="about-license-button"]')
|
||||
return $("//*[@data-testid='about-license-button']")
|
||||
}
|
||||
|
||||
public get aboutLicenseComponentWrapper() {
|
||||
return $('[data-testid="License-component-wrapper"]')
|
||||
return $("//*[@data-testid='License-component-wrapper']")
|
||||
}
|
||||
|
||||
public get closeButton() {
|
||||
return $('[data-testid="icon-Close"]')
|
||||
return $("//*[@data-testid='icon-Close']")
|
||||
}
|
||||
|
||||
public get addToFavouritessCheckbox() {
|
||||
return $('[name="favourite"]')
|
||||
return $("//*[@name='favourite']")
|
||||
}
|
||||
|
||||
public get cancelButton() {
|
||||
return $("p*=Cancel")
|
||||
return $("//p[contains(text(), 'Cancel')]")
|
||||
}
|
||||
|
||||
public get saveButton() {
|
||||
return $('[data-testid="save-button"]')
|
||||
return $("//*[@data-testid='save-button']")
|
||||
}
|
||||
|
||||
public get noContactsText() {
|
||||
return $('[data-testid="contact-list-no-result"]')
|
||||
return $("//*[@data-testid='contact-list-no-result']")
|
||||
}
|
||||
|
||||
public get changeLocationButton() {
|
||||
return $('[data-testid="settings-backup-change-location-button"]')
|
||||
return $("//*[@data-testid='settings-backup-change-location-button']")
|
||||
}
|
||||
|
||||
public get backupLocationValue() {
|
||||
return $('[data-testid="backup-location"]')
|
||||
return $("//*[@data-testid='backup-location']")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,35 +7,35 @@ import Page from "./page"
|
||||
|
||||
class NavigationTabs extends Page {
|
||||
public get muditaNewsTab() {
|
||||
return $('[data-testid="icon-MenuNews"]')
|
||||
return $(`//*[@data-testid="icon-MenuNews"]`)
|
||||
}
|
||||
|
||||
public get overviewTab() {
|
||||
return $('[data-testid="overview-link"]')
|
||||
return $(`//*[@data-testid="overview-link"]`)
|
||||
}
|
||||
|
||||
public get overviewKompaktTab() {
|
||||
return $('[data-testid="icon-MenuOverview"]')
|
||||
return $(`//*[@data-testid="icon-MenuOverview"]`)
|
||||
}
|
||||
|
||||
public get messagesTab() {
|
||||
return $('[data-testid="overview-menu-link"]')
|
||||
return $(`//*[@data-testid="overview-menu-link"]`)
|
||||
}
|
||||
|
||||
public get contactsKompaktTab() {
|
||||
return $('[data-testid="icon-MenuContacts"]')
|
||||
return $(`//*[@data-testid="icon-MenuContacts"]`)
|
||||
}
|
||||
|
||||
public get settingsTab() {
|
||||
return $('[data-testid="icon-MenuSettings"]')
|
||||
return $(`//*[@data-testid="icon-MenuSettings"]`)
|
||||
}
|
||||
|
||||
public get helpTab() {
|
||||
return $('[data-testid="help-menu-button"]')
|
||||
return $(`//*[@data-testid="help-menu-button"]`)
|
||||
}
|
||||
|
||||
public get manageFilesButton() {
|
||||
return $('[data-testid="icon-FilesManager"]')
|
||||
return $(`//*[@data-testid="icon-FilesManager"]`)
|
||||
}
|
||||
|
||||
public async openHelpPage() {
|
||||
|
||||
@@ -26,6 +26,6 @@ describe("Check more news button", () => {
|
||||
|
||||
const moreNewsButtonHref = NewsPage.moreNewsButtonHref
|
||||
const checkHref = await moreNewsButtonHref.getAttribute("href")
|
||||
await expect(checkHref).toBe("https://www.mudita.com/#news")
|
||||
await expect(checkHref).toBe("https://www.mudita.com/community/blog/")
|
||||
})
|
||||
})
|
||||
|
||||
@@ -68,7 +68,9 @@ describe("News Page Check in Offline Mode", () => {
|
||||
|
||||
it("Check content after scroll", async () => {
|
||||
// Test if comments of second line of news are not visible on screen
|
||||
const lastNewsCardCommunityLinkText = await NewsPage.newsCardElements[5].$(
|
||||
const newsCardElements = await NewsPage.newsCardElements
|
||||
const lastIndex = newsCardElements.length - 1
|
||||
const lastNewsCardCommunityLinkText = await newsCardElements[lastIndex].$(
|
||||
'[data-testid="community-link"] p[color="primary"]'
|
||||
)
|
||||
await expect(lastNewsCardCommunityLinkText).not.toBeDisplayedInViewport()
|
||||
@@ -78,7 +80,7 @@ describe("News Page Check in Offline Mode", () => {
|
||||
|
||||
it("Verify News Cards", async () => {
|
||||
const newsCardElements = await NewsPage.newsCardElements
|
||||
await expect(newsCardElements).toHaveLength(6)
|
||||
await expect(newsCardElements.length).toBeGreaterThanOrEqual(4)
|
||||
|
||||
for (let newsCard of newsCardElements) {
|
||||
const newsCardImageLink = await newsCard.$('[data-testid="image-link"]')
|
||||
|
||||
@@ -37,7 +37,9 @@ describe("News Page Check", () => {
|
||||
})
|
||||
it("Check content after scroll", async () => {
|
||||
//Test if comments of second line of news is not visible on screen
|
||||
const lastNewsCardCommunityLinkText = await NewsPage.newsCardElements[5].$(
|
||||
const newsCardElements = await NewsPage.newsCardElements
|
||||
const lastIndex = newsCardElements.length - 1
|
||||
const lastNewsCardCommunityLinkText = await newsCardElements[lastIndex].$(
|
||||
'[data-testid="community-link"] p[color="primary"]'
|
||||
)
|
||||
await expect(lastNewsCardCommunityLinkText).not.toBeDisplayedInViewport()
|
||||
@@ -46,7 +48,7 @@ describe("News Page Check", () => {
|
||||
})
|
||||
it("Verify News Cards", async () => {
|
||||
const newsCardElements = await NewsPage.newsCardElements
|
||||
await expect(newsCardElements).toHaveLength(6)
|
||||
await expect(newsCardElements.length).toBeGreaterThanOrEqual(4)
|
||||
|
||||
for (let newsCard of newsCardElements) {
|
||||
const newsCardImageLink = await newsCard.$('[data-testid="image-link"]')
|
||||
|
||||
@@ -126,7 +126,7 @@ describe("E2E mock sample - overview view", () => {
|
||||
await expect(drawerHeader).toBeDisplayed()
|
||||
})
|
||||
|
||||
it("Remove first device", async () => {
|
||||
xit("Remove first device", async () => {
|
||||
E2EMockClient.removeDevice("path-1")
|
||||
await browser.pause(6000)
|
||||
|
||||
|
||||
@@ -46,6 +46,9 @@ describe("Home Screen Page", () => {
|
||||
await tryAgainParagraph.click()
|
||||
})
|
||||
it("Click Contact Support & Verify Contents", async () => {
|
||||
const myDevicesDoesntShowButton = await HomePage.myDevicesDoesntShowButton
|
||||
await expect(myDevicesDoesntShowButton).toBeDisplayed()
|
||||
await myDevicesDoesntShowButton.click()
|
||||
const contactSupportButton = await HomePage.contactSupportButton
|
||||
const muditaCenterSupportModalHeader =
|
||||
await HomePage.muditaCenterSupportModalHeader
|
||||
|
||||
@@ -103,8 +103,8 @@ describe("E2E mock sample - overview view", () => {
|
||||
await expect(backupSuccessTitle).toHaveText("Backup complete")
|
||||
|
||||
const backupSuccessSubTitle = ModalBackupKompaktPage.backupSuccessSubTitle
|
||||
await expect(backupSuccessSubTitle).toHaveText(
|
||||
"Your data was successfully secured.\nOpen the backup folder to see your backup data or close this window."
|
||||
await expect(backupSuccessSubTitle).toHaveTextContaining(
|
||||
"Your data was successfully secured"
|
||||
)
|
||||
})
|
||||
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
import { E2EMockClient } from "../../../../../libs/e2e-mock/client/src"
|
||||
import {
|
||||
overviewDataWithOneSimCard,
|
||||
overviewDataWithOneSimCard2nd,
|
||||
} from "../../../../../libs/e2e-mock/responses/src"
|
||||
import OverviewKompaktPage from "../../page-objects/overview-kompakt.page"
|
||||
import drawerPage from "../../page-objects/drawer.page"
|
||||
|
||||
describe("Check Device type", () => {
|
||||
const firstSerialNumber = "KOM1234567890"
|
||||
const secondSerialNumber = "KOM1234567892"
|
||||
before(async () => {
|
||||
E2EMockClient.connect()
|
||||
//wait for a connection to be established
|
||||
await browser.waitUntil(() => {
|
||||
return E2EMockClient.checkConnection()
|
||||
})
|
||||
})
|
||||
|
||||
after(() => {
|
||||
E2EMockClient.stopServer()
|
||||
E2EMockClient.disconnect()
|
||||
})
|
||||
|
||||
it("Connect device 1st - GLOBAL", async () => {
|
||||
E2EMockClient.mockResponses([
|
||||
{
|
||||
path: "path-1",
|
||||
body: overviewDataWithOneSimCard,
|
||||
endpoint: "FEATURE_DATA",
|
||||
method: "GET",
|
||||
status: 200,
|
||||
},
|
||||
])
|
||||
E2EMockClient.addDevice({
|
||||
path: "path-1",
|
||||
serialNumber: firstSerialNumber,
|
||||
})
|
||||
|
||||
await browser.pause(6000)
|
||||
const menuItem = await $(`//a[@href="#/generic/mc-overview"]`)
|
||||
|
||||
await menuItem.waitForDisplayed({ timeout: 10000 })
|
||||
await expect(menuItem).toBeDisplayed()
|
||||
})
|
||||
|
||||
it("Verify Device type - GLOBAL", async () => {
|
||||
const kompaktDeviceTypeLabel =
|
||||
await OverviewKompaktPage.kompaktDeviceTypeLabel
|
||||
await expect(kompaktDeviceTypeLabel).toBeDisplayed()
|
||||
await expect(kompaktDeviceTypeLabel).toHaveText("Device type:")
|
||||
|
||||
const kompaktDeviceTypeLabelValue1st =
|
||||
await OverviewKompaktPage.kompaktDeviceTypeLabelValue1st
|
||||
await expect(kompaktDeviceTypeLabelValue1st).toBeDisplayed()
|
||||
await expect(kompaktDeviceTypeLabelValue1st).toHaveText("GLOBAL")
|
||||
})
|
||||
|
||||
it("Connect device 2nd - US", async () => {
|
||||
E2EMockClient.mockResponses([
|
||||
{
|
||||
path: "path-2",
|
||||
body: overviewDataWithOneSimCard2nd,
|
||||
endpoint: "FEATURE_DATA",
|
||||
method: "GET",
|
||||
status: 200,
|
||||
},
|
||||
])
|
||||
E2EMockClient.addDevice({
|
||||
path: "path-2",
|
||||
serialNumber: secondSerialNumber,
|
||||
})
|
||||
|
||||
await browser.pause(6000)
|
||||
const menuItem = await $(`//a[@href="#/generic/mc-overview"]`)
|
||||
|
||||
await menuItem.waitForDisplayed({ timeout: 10000 })
|
||||
await expect(menuItem).toBeDisplayed()
|
||||
})
|
||||
|
||||
it("Switch to 2nd device and Verify Device type - US", async () => {
|
||||
const secondDeviceOnDrawer = await drawerPage.getDeviceOnDrawer(
|
||||
secondSerialNumber
|
||||
)
|
||||
await expect(secondDeviceOnDrawer).toBeDisplayed()
|
||||
await secondDeviceOnDrawer.waitForClickable()
|
||||
await secondDeviceOnDrawer.click()
|
||||
const kompaktDeviceTypeLabel =
|
||||
await OverviewKompaktPage.kompaktDeviceTypeLabel
|
||||
await expect(kompaktDeviceTypeLabel).toBeDisplayed()
|
||||
await expect(kompaktDeviceTypeLabel).toHaveText("Device type:")
|
||||
|
||||
const kompaktDeviceTypeLabelValue2nd =
|
||||
await OverviewKompaktPage.kompaktDeviceTypeLabelValue2nd
|
||||
await expect(kompaktDeviceTypeLabelValue2nd).toBeDisplayed()
|
||||
await expect(kompaktDeviceTypeLabelValue2nd).toHaveText("US")
|
||||
})
|
||||
})
|
||||
@@ -74,7 +74,12 @@ describe("Disconnect during backup", () => {
|
||||
E2EMockClient.removeDevice("path-1")
|
||||
})
|
||||
|
||||
it("Check if Home page is present", async () => {
|
||||
it("Close error and check if Home page is present", async () => {
|
||||
await browser.pause(500)
|
||||
const backupFailedModalCloseButton =
|
||||
ModalBackupKompaktPage.backupFailedModalCloseButton
|
||||
await backupFailedModalCloseButton.click()
|
||||
|
||||
const homeHeader = await HomePage.homeHeader
|
||||
await homeHeader.waitForDisplayed()
|
||||
await expect(homeHeader).toHaveText("Welcome to Mudita Center")
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
import { E2EMockClient } from "../../../../../libs/e2e-mock/client/src"
|
||||
import { expect } from "@wdio/globals"
|
||||
import NavigationTabs from "../../page-objects/tabs.page"
|
||||
import ManageFiles from "../../page-objects/manage-files"
|
||||
|
||||
describe("File manager DELETE APK text check", () => {
|
||||
before(async () => {
|
||||
E2EMockClient.connect()
|
||||
//wait for a connection to be established
|
||||
await browser.waitUntil(() => {
|
||||
return E2EMockClient.checkConnection()
|
||||
})
|
||||
})
|
||||
|
||||
after(() => {
|
||||
E2EMockClient.stopServer()
|
||||
E2EMockClient.disconnect()
|
||||
})
|
||||
|
||||
it("Connect device", async () => {
|
||||
E2EMockClient.addDevice({
|
||||
path: "path-1",
|
||||
serialNumber: "first-serial-number",
|
||||
})
|
||||
|
||||
await browser.pause(6000)
|
||||
const menuItem = await $(`//a[@href="#/generic/mc-overview"]`)
|
||||
|
||||
await menuItem.waitForDisplayed({ timeout: 10000 })
|
||||
await expect(menuItem).toBeDisplayed()
|
||||
})
|
||||
|
||||
it("Open Manage Files tab and check if Phone storage section is opened", async () => {
|
||||
//open Manage Files
|
||||
const manageFilesButton = NavigationTabs.manageFilesButton
|
||||
await manageFilesButton.waitForDisplayed()
|
||||
await manageFilesButton.click()
|
||||
|
||||
//check if Phone storage is opened
|
||||
const phoneStorageHeader = ManageFiles.phoneStorageHeader
|
||||
await expect(phoneStorageHeader).toBeDisplayed()
|
||||
await expect(phoneStorageHeader).toHaveText("Phone Storage")
|
||||
})
|
||||
|
||||
it("Phone Storage - 1 file", async () => {
|
||||
//click Apps section
|
||||
const appsCategoryButton = ManageFiles.appsCategoryButton
|
||||
await appsCategoryButton.click()
|
||||
|
||||
//select checkbox button
|
||||
const checkboxFirstFileApps = ManageFiles.checkboxFirstFileApps
|
||||
await expect(checkboxFirstFileApps).toBeDisplayed()
|
||||
await checkboxFirstFileApps.click()
|
||||
|
||||
//check Delete button
|
||||
const firstFileInTheAppsCategoryDeleteButton =
|
||||
ManageFiles.firstFileInTheAppsCategoryDeleteButton
|
||||
await expect(firstFileInTheAppsCategoryDeleteButton).toBeDisplayed()
|
||||
await expect(firstFileInTheAppsCategoryDeleteButton).toHaveText(
|
||||
"DELETE APK"
|
||||
)
|
||||
|
||||
// //check delete file modal
|
||||
// await firstFileInTheAppsCategoryDeleteButton.click()
|
||||
// const firstFileInTheAppsCategoryDeleteModal =
|
||||
// ManageFiles.firstFileInTheAppsCategoryDeleteModal
|
||||
// await expect(firstFileInTheAppsCategoryDeleteModal).toBeDisplayed()
|
||||
})
|
||||
|
||||
it("SD Card - 1 file, multiple files", async () => {
|
||||
//open SD Card
|
||||
const sdCardButton = ManageFiles.sdCardButton
|
||||
await sdCardButton.click()
|
||||
|
||||
//click Apps section
|
||||
const appsCategoryButtonSD = ManageFiles.appsCategoryButtonSD
|
||||
await appsCategoryButtonSD.click()
|
||||
|
||||
//select one file and check "Delete APK" for 1 file
|
||||
const checkboxFirstFileAppsSD = ManageFiles.checkboxFirstFileAppsSD
|
||||
await checkboxFirstFileAppsSD.click() //select first file
|
||||
|
||||
// check delete button for 1 file
|
||||
const firstFileInTheAppsCategoryDeleteButtonSD =
|
||||
ManageFiles.firstFileInTheAppsCategoryDeleteButtonSD
|
||||
await expect(firstFileInTheAppsCategoryDeleteButtonSD).toBeDisplayed()
|
||||
await expect(firstFileInTheAppsCategoryDeleteButtonSD).toHaveText(
|
||||
"DELETE APK"
|
||||
)
|
||||
|
||||
//select all files
|
||||
const checkboxAllFilesAppsSD = ManageFiles.checkboxAllFilesAppsSD
|
||||
await expect(checkboxAllFilesAppsSD).toBeDisplayed()
|
||||
await checkboxAllFilesAppsSD.click() //select all files
|
||||
|
||||
//check "Delete APK" for multiple files
|
||||
await expect(firstFileInTheAppsCategoryDeleteButtonSD).toBeDisplayed()
|
||||
await expect(firstFileInTheAppsCategoryDeleteButtonSD).toHaveText(
|
||||
"DELETE APK"
|
||||
)
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,116 @@
|
||||
import { E2EMockClient } from "../../../../../libs/e2e-mock/client/src"
|
||||
import { expect } from "@wdio/globals"
|
||||
import NavigationTabs from "../../page-objects/tabs.page"
|
||||
import ManageFiles from "../../page-objects/manage-files"
|
||||
|
||||
describe("File manager Install apk modal check", () => {
|
||||
before(async () => {
|
||||
E2EMockClient.connect()
|
||||
//wait for a connection to be established
|
||||
await browser.waitUntil(() => {
|
||||
return E2EMockClient.checkConnection()
|
||||
})
|
||||
})
|
||||
|
||||
after(() => {
|
||||
E2EMockClient.stopServer()
|
||||
E2EMockClient.disconnect()
|
||||
})
|
||||
|
||||
it("Connect device", async () => {
|
||||
E2EMockClient.addDevice({
|
||||
path: "path-1",
|
||||
serialNumber: "first-serial-number",
|
||||
})
|
||||
|
||||
await browser.pause(6000)
|
||||
const menuItem = await $(`//a[@href="#/generic/mc-overview"]`)
|
||||
|
||||
await menuItem.waitForDisplayed({ timeout: 10000 })
|
||||
await expect(menuItem).toBeDisplayed()
|
||||
})
|
||||
|
||||
it("Open Manage Files tab and check if Phone storage section is opened", async () => {
|
||||
//open Manage Files
|
||||
const manageFilesButton = NavigationTabs.manageFilesButton
|
||||
await manageFilesButton.waitForDisplayed()
|
||||
await manageFilesButton.click()
|
||||
|
||||
//check if Phone storage is opened
|
||||
const phoneStorageHeader = ManageFiles.phoneStorageHeader
|
||||
await expect(phoneStorageHeader).toBeDisplayed()
|
||||
await expect(phoneStorageHeader).toHaveText("Phone Storage")
|
||||
})
|
||||
|
||||
it("Phone Storage", async () => {
|
||||
//click Apps section
|
||||
const appsCategoryButton = ManageFiles.appsCategoryButton
|
||||
await appsCategoryButton.click()
|
||||
|
||||
//check file in Apps category
|
||||
const firstFileInTheAppsCategory = ManageFiles.firstFileInTheAppsCategory
|
||||
await expect(firstFileInTheAppsCategory).toBeDisplayed()
|
||||
await expect(firstFileInTheAppsCategory).toHaveText("app.apk")
|
||||
await firstFileInTheAppsCategory.click()
|
||||
|
||||
//check install apk modal
|
||||
const firstFileInTheAppsCategoryInstallModal =
|
||||
ManageFiles.firstFileInTheAppsCategoryInstallModal
|
||||
await expect(firstFileInTheAppsCategoryInstallModal).toBeDisplayed()
|
||||
|
||||
//check modal title
|
||||
const firstFileInTheAppsCategoryInstallModalTitle =
|
||||
ManageFiles.firstFileInTheAppsCategoryInstallModalTitle
|
||||
await expect(firstFileInTheAppsCategoryInstallModalTitle).toHaveText(
|
||||
"Continue install of third party app?"
|
||||
)
|
||||
|
||||
//check modal body
|
||||
const firstFileInTheAppsCategoryInstallModalBody =
|
||||
ManageFiles.firstFileInTheAppsCategoryInstallModalBody
|
||||
await expect(firstFileInTheAppsCategoryInstallModalBody).toHaveText(
|
||||
"We can’t guarantee that Kompakt or the third party app will work correctly if you continue the install."
|
||||
)
|
||||
|
||||
//click back button on installation modal
|
||||
const firstFileInTheAppsCategoryInstallModalBackButton =
|
||||
ManageFiles.firstFileInTheAppsCategoryInstallModalBackButton
|
||||
await firstFileInTheAppsCategoryInstallModalBackButton.click()
|
||||
})
|
||||
|
||||
it("SD Card", async () => {
|
||||
//open SD Card
|
||||
const sdCardButton = ManageFiles.sdCardButton
|
||||
await sdCardButton.click()
|
||||
|
||||
//click Apps section
|
||||
const appsCategoryButtonSD = ManageFiles.appsCategoryButtonSD
|
||||
await appsCategoryButtonSD.click()
|
||||
|
||||
//check file in Apps category
|
||||
const firstFileInTheAppsCategorySD =
|
||||
ManageFiles.firstFileInTheAppsCategorySD
|
||||
await expect(firstFileInTheAppsCategorySD).toBeDisplayed()
|
||||
await expect(firstFileInTheAppsCategorySD).toHaveText("app.apk")
|
||||
await firstFileInTheAppsCategorySD.click()
|
||||
|
||||
//check install apk modal
|
||||
const firstFileInTheAppsCategoryInstallModalSD =
|
||||
ManageFiles.firstFileInTheAppsCategoryInstallModalSD
|
||||
await expect(firstFileInTheAppsCategoryInstallModalSD).toBeDisplayed()
|
||||
|
||||
//check modal title
|
||||
const firstFileInTheAppsCategoryInstallModalTitleSD =
|
||||
ManageFiles.firstFileInTheAppsCategoryInstallModalTitleSD
|
||||
await expect(firstFileInTheAppsCategoryInstallModalTitleSD).toHaveText(
|
||||
"Continue install of third party app?"
|
||||
)
|
||||
|
||||
//check modal body
|
||||
const firstFileInTheAppsCategoryInstallModalBodySD =
|
||||
ManageFiles.firstFileInTheAppsCategoryInstallModalBodySD
|
||||
await expect(firstFileInTheAppsCategoryInstallModalBodySD).toHaveText(
|
||||
"We can’t guarantee that Kompakt or the third party app will work correctly if you continue the install."
|
||||
)
|
||||
})
|
||||
})
|
||||
@@ -1,6 +1,4 @@
|
||||
import { E2EMockClient } from "../../../../../libs/e2e-mock/client/src"
|
||||
import { mockEntityDownloadProcess } from "../../helpers"
|
||||
import { selectedContactsEntities } from "../../helpers/entity-fixtures"
|
||||
import { expect } from "@wdio/globals"
|
||||
import NavigationTabs from "../../page-objects/tabs.page"
|
||||
import ManageFiles from "../../page-objects/manage-files"
|
||||
@@ -96,7 +94,7 @@ describe("File manager overall check", () => {
|
||||
await expect(photosCategoryEmptySubtext).not.toBeDisplayed()
|
||||
})
|
||||
|
||||
xit("Phone Storage - Check E-Books section", async () => {
|
||||
it("Phone Storage - Check E-Books section", async () => {
|
||||
//click E-Books section
|
||||
const ebooksCategoryButton = ManageFiles.ebooksCategoryButton
|
||||
await ebooksCategoryButton.click()
|
||||
@@ -104,32 +102,27 @@ describe("File manager overall check", () => {
|
||||
//check E-books category header
|
||||
const ebooksCategoryHeader = ManageFiles.ebooksCategoryHeader
|
||||
await expect(ebooksCategoryHeader).toBeDisplayed()
|
||||
await expect(ebooksCategoryHeader).toHaveText("E-books")
|
||||
await expect(ebooksCategoryHeader).toHaveText("E-books (1)")
|
||||
|
||||
//check Add files button
|
||||
const ebooksCategoryAddFilesButton =
|
||||
ManageFiles.ebooksCategoryAddFilesButton
|
||||
await expect(ebooksCategoryAddFilesButton).toBeDisplayed()
|
||||
|
||||
//check if E-books category is empty - check if there is no first file on the list
|
||||
//check if E-books category is not empty - check if there is no first file on the list
|
||||
const firstFileInTheEbooksCategory =
|
||||
ManageFiles.firstFileInTheEbooksCategory
|
||||
await expect(firstFileInTheEbooksCategory).not.toBeDisplayed()
|
||||
await expect(firstFileInTheEbooksCategory).toBeDisplayed()
|
||||
|
||||
//check if text about no files is present
|
||||
//check if text about no files is not present
|
||||
const ebooksCategoryEmptyTitle = ManageFiles.ebooksCategoryEmptyTitle
|
||||
await expect(ebooksCategoryEmptyTitle).toBeDisplayed()
|
||||
await expect(ebooksCategoryEmptyTitle).toHaveText(
|
||||
"We couldn't find any files"
|
||||
)
|
||||
await expect(ebooksCategoryEmptyTitle).not.toBeDisplayed()
|
||||
|
||||
const ebooksCategoryEmptySubtext = ManageFiles.ebooksCategoryEmptySubtext
|
||||
await expect(ebooksCategoryEmptySubtext).toBeDisplayed()
|
||||
await expect(ebooksCategoryEmptySubtext).toHaveText(
|
||||
"Add E-book or PDF files from your computer and they'll transfer to your device automatically."
|
||||
)
|
||||
await expect(ebooksCategoryEmptySubtext).not.toBeDisplayed()
|
||||
})
|
||||
|
||||
xit("Phone Storage - Check Apps section", async () => {
|
||||
it("Phone Storage - Check Apps section", async () => {
|
||||
//click Apps section
|
||||
const appsCategoryButton = ManageFiles.appsCategoryButton
|
||||
await appsCategoryButton.click()
|
||||
@@ -137,27 +130,22 @@ describe("File manager overall check", () => {
|
||||
//check Apps category header
|
||||
const appsCategoryHeader = ManageFiles.appsCategoryHeader
|
||||
await expect(appsCategoryHeader).toBeDisplayed()
|
||||
await expect(appsCategoryHeader).toHaveText("Apps")
|
||||
await expect(appsCategoryHeader).toHaveText("Apps (1)")
|
||||
|
||||
//check Add files button
|
||||
const appsCategoryAddFilesButton = ManageFiles.appsCategoryAddFilesButton
|
||||
await expect(appsCategoryAddFilesButton).toBeDisplayed()
|
||||
|
||||
//check if Apps category is empty - check if there is no first file on the list
|
||||
//check if Apps category is not empty - check if there is no first file on the list
|
||||
const firstFileInTheAppsCategory = ManageFiles.firstFileInTheAppsCategory
|
||||
await expect(firstFileInTheAppsCategory).not.toBeDisplayed()
|
||||
await expect(firstFileInTheAppsCategory).toBeDisplayed()
|
||||
|
||||
//check if text about no files is present
|
||||
const appsCategoryEmptyTitle = ManageFiles.appsCategoryEmptyTitle
|
||||
await expect(appsCategoryEmptyTitle).toBeDisplayed()
|
||||
await expect(appsCategoryEmptyTitle).toHaveText(
|
||||
"We couldn't find any files"
|
||||
)
|
||||
await expect(appsCategoryEmptyTitle).not.toBeDisplayed()
|
||||
|
||||
const appsCategoryEmptySubtext = ManageFiles.appsCategoryEmptySubtext
|
||||
await expect(appsCategoryEmptySubtext).toBeDisplayed()
|
||||
await expect(appsCategoryEmptySubtext).toHaveText(
|
||||
"Add android app (.apk) files and install them from here. As Kompakt is a minimalist E-ink device some apps may not work correctly."
|
||||
)
|
||||
await expect(appsCategoryEmptySubtext).not.toBeDisplayed()
|
||||
})
|
||||
|
||||
it("Open SD Card storage section and verify it", async () => {
|
||||
@@ -171,36 +159,31 @@ describe("File manager overall check", () => {
|
||||
await expect(sdCardHeader).toHaveText("SD card")
|
||||
})
|
||||
|
||||
xit("SD Card - Check Music section", async () => {
|
||||
it("SD Card - Check Music section", async () => {
|
||||
//check Music category header
|
||||
const musicCategoryHeaderSD = ManageFiles.musicCategoryHeaderSD
|
||||
await expect(musicCategoryHeaderSD).toBeDisplayed()
|
||||
await expect(musicCategoryHeaderSD).toHaveText("Music")
|
||||
await expect(musicCategoryHeaderSD).toHaveText("Music (1)")
|
||||
|
||||
//check Add files button
|
||||
const musicCategoryAddFilesButtonSD =
|
||||
ManageFiles.musicCategoryAddFilesButtonSD
|
||||
await expect(musicCategoryAddFilesButtonSD).toBeDisplayed()
|
||||
|
||||
//check if Music category is empty - check if there is no first file on the list
|
||||
//check if Music category is not empty - check if there is no first file on the list
|
||||
const firstFileInTheMusicCategorySD =
|
||||
ManageFiles.firstFileInTheMusicCategorySD
|
||||
await expect(firstFileInTheMusicCategorySD).not.toBeDisplayed()
|
||||
await expect(firstFileInTheMusicCategorySD).toBeDisplayed()
|
||||
|
||||
//check if text about no files is present
|
||||
//check if text about no files is not present
|
||||
const musicCategoryEmptyTitleSD = ManageFiles.musicCategoryEmptyTitleSD
|
||||
await expect(musicCategoryEmptyTitleSD).toBeDisplayed()
|
||||
await expect(musicCategoryEmptyTitleSD).toHaveText(
|
||||
"We couldn't find any files"
|
||||
)
|
||||
await expect(musicCategoryEmptyTitleSD).not.toBeDisplayed()
|
||||
|
||||
const musicCategoryEmptySubtextSD = ManageFiles.musicCategoryEmptySubtextSD
|
||||
await expect(musicCategoryEmptySubtextSD).toBeDisplayed()
|
||||
await expect(musicCategoryEmptySubtextSD).toHaveText(
|
||||
"Add music files from your computer and they'll transfer to your device automatically."
|
||||
)
|
||||
await expect(musicCategoryEmptySubtextSD).not.toBeDisplayed()
|
||||
})
|
||||
|
||||
xit("SD Card - Check Photos section", async () => {
|
||||
it("SD Card - Check Photos section", async () => {
|
||||
//click Photos section
|
||||
const photosCategoryButtonSD = ManageFiles.photosCategoryButtonSD
|
||||
await photosCategoryButtonSD.click()
|
||||
@@ -208,30 +191,25 @@ describe("File manager overall check", () => {
|
||||
//check Photos category header
|
||||
const photosCategoryHeaderSD = ManageFiles.photosCategoryHeaderSD
|
||||
await expect(photosCategoryHeaderSD).toBeDisplayed()
|
||||
await expect(photosCategoryHeaderSD).toHaveText("Photos")
|
||||
await expect(photosCategoryHeaderSD).toHaveText("Photos (1)")
|
||||
|
||||
//check Add files button
|
||||
const photosCategoryAddFilesButtonSD =
|
||||
ManageFiles.photosCategoryAddFilesButtonSD
|
||||
await expect(photosCategoryAddFilesButtonSD).toBeDisplayed()
|
||||
|
||||
//check if Photos category is empty - check if there is no first file on the list
|
||||
//check if Photos category is not empty - check if there is no first file on the list
|
||||
const firstFileInThePhotosCategorySD =
|
||||
ManageFiles.firstFileInThePhotosCategorySD
|
||||
await expect(firstFileInThePhotosCategorySD).not.toBeDisplayed()
|
||||
await expect(firstFileInThePhotosCategorySD).toBeDisplayed()
|
||||
|
||||
//check if text about no files is present
|
||||
//check if text about no files is not present
|
||||
const photosCategoryEmptyTitleSD = ManageFiles.photosCategoryEmptyTitleSD
|
||||
await expect(photosCategoryEmptyTitleSD).toBeDisplayed()
|
||||
await expect(photosCategoryEmptyTitleSD).toHaveText(
|
||||
"We couldn't find any files"
|
||||
)
|
||||
await expect(photosCategoryEmptyTitleSD).not.toBeDisplayed()
|
||||
|
||||
const photosCategoryEmptySubtextSD =
|
||||
ManageFiles.photosCategoryEmptySubtextSD
|
||||
await expect(photosCategoryEmptySubtextSD).toBeDisplayed()
|
||||
await expect(photosCategoryEmptySubtextSD).toHaveText(
|
||||
"Add image files from your computer and they'll transfer to your device automatically."
|
||||
)
|
||||
await expect(photosCategoryEmptySubtextSD).not.toBeDisplayed()
|
||||
})
|
||||
|
||||
it("SD Card - Check E-Books section", async () => {
|
||||
|
||||
@@ -0,0 +1,603 @@
|
||||
import { E2EMockClient } from "../../../../../libs/e2e-mock/client/src"
|
||||
import { expect } from "@wdio/globals"
|
||||
import NavigationTabs from "../../page-objects/tabs.page"
|
||||
import ManageFiles from "../../page-objects/manage-files"
|
||||
|
||||
describe("File manager overall check", () => {
|
||||
before(async () => {
|
||||
E2EMockClient.connect()
|
||||
//wait for a connection to be established
|
||||
await browser.waitUntil(() => {
|
||||
return E2EMockClient.checkConnection()
|
||||
})
|
||||
})
|
||||
|
||||
after(() => {
|
||||
E2EMockClient.stopServer()
|
||||
E2EMockClient.disconnect()
|
||||
})
|
||||
|
||||
it("Connect device", async () => {
|
||||
E2EMockClient.addDevice({
|
||||
path: "path-1",
|
||||
serialNumber: "first-serial-number",
|
||||
})
|
||||
|
||||
await browser.pause(6000)
|
||||
const menuItem = await $(`//a[@href="#/generic/mc-overview"]`)
|
||||
|
||||
await menuItem.waitForDisplayed({ timeout: 10000 })
|
||||
await expect(menuItem).toBeDisplayed()
|
||||
})
|
||||
|
||||
it("Open Manage Files tab and check if Phone storage section is opened", async () => {
|
||||
//open Manage Files
|
||||
const manageFilesButton = NavigationTabs.manageFilesButton
|
||||
await manageFilesButton.waitForDisplayed()
|
||||
await manageFilesButton.click()
|
||||
|
||||
//check if Phone storage is opened
|
||||
const phoneStorageHeader = ManageFiles.phoneStorageHeader
|
||||
await expect(phoneStorageHeader).toBeDisplayed()
|
||||
await expect(phoneStorageHeader).toHaveText("Phone Storage")
|
||||
})
|
||||
|
||||
it("Phone Storage - Music section", async () => {
|
||||
//check Music category header
|
||||
const musicCategoryHeader = ManageFiles.musicCategoryHeader
|
||||
await expect(musicCategoryHeader).toBeDisplayed()
|
||||
await expect(musicCategoryHeader).toHaveText("Music (1)")
|
||||
|
||||
//check file in Music category
|
||||
const firstFileInTheMusicCategory = ManageFiles.firstFileInTheMusicCategory
|
||||
await expect(firstFileInTheMusicCategory).toBeDisplayed()
|
||||
await expect(firstFileInTheMusicCategory).toHaveText("test.mp3")
|
||||
|
||||
//remove the file
|
||||
const checkboxFirstFileMusic = ManageFiles.checkboxFirstFileMusic
|
||||
await expect(checkboxFirstFileMusic).toBeDisplayed()
|
||||
await checkboxFirstFileMusic.click()
|
||||
|
||||
//click delete file button
|
||||
const firstFileInTheMusicCategoryDeleteButton =
|
||||
ManageFiles.firstFileInTheMusicCategoryDeleteButton
|
||||
await expect(firstFileInTheMusicCategoryDeleteButton).toBeDisplayed()
|
||||
await firstFileInTheMusicCategoryDeleteButton.click()
|
||||
|
||||
//check delete file modal
|
||||
const firstFileInTheMusicCategoryDeleteModal =
|
||||
ManageFiles.firstFileInTheMusicCategoryDeleteModal
|
||||
await expect(firstFileInTheMusicCategoryDeleteModal).toBeDisplayed()
|
||||
|
||||
const iconExclamation = ManageFiles.iconExclamation
|
||||
await expect(iconExclamation).toBeDisplayed()
|
||||
|
||||
//cancel deletion
|
||||
const firstFileInTheMusicCategoryDeleteModalCancelButton =
|
||||
ManageFiles.firstFileInTheMusicCategoryDeleteModalCancelButton
|
||||
await expect(
|
||||
firstFileInTheMusicCategoryDeleteModalCancelButton
|
||||
).toBeDisplayed()
|
||||
await firstFileInTheMusicCategoryDeleteModalCancelButton.click()
|
||||
|
||||
//click delete file button again
|
||||
await firstFileInTheMusicCategoryDeleteButton.click()
|
||||
|
||||
const firstFileInTheMusicCategoryDeleteModalDeleteFileButton =
|
||||
ManageFiles.firstFileInTheMusicCategoryDeleteModalDeleteFileButton
|
||||
await expect(
|
||||
firstFileInTheMusicCategoryDeleteModalDeleteFileButton
|
||||
).toBeDisplayed()
|
||||
await firstFileInTheMusicCategoryDeleteModalDeleteFileButton.click()
|
||||
|
||||
// to check after deletion of the file/files
|
||||
|
||||
//check no files available text and subtext
|
||||
const musicCategoryEmptyTitle = ManageFiles.musicCategoryEmptyTitle
|
||||
await expect(musicCategoryEmptyTitle).toBeDisplayed()
|
||||
await expect(musicCategoryEmptyTitle).toHaveText(
|
||||
"We couldn't find any files"
|
||||
)
|
||||
|
||||
const musicCategoryEmptySubtext = ManageFiles.musicCategoryEmptySubtext
|
||||
await expect(musicCategoryEmptySubtext).toBeDisplayed()
|
||||
await expect(musicCategoryEmptySubtext).toHaveText(
|
||||
"Add music files from your computer and they'll transfer to your device automatically."
|
||||
)
|
||||
})
|
||||
|
||||
it("Phone Storage - Photos section", async () => {
|
||||
//click Photos section
|
||||
const photosCategoryButton = ManageFiles.photosCategoryButton
|
||||
await photosCategoryButton.click()
|
||||
|
||||
//check Photos category header
|
||||
const photosCategoryHeader = ManageFiles.photosCategoryHeader
|
||||
await expect(photosCategoryHeader).toBeDisplayed()
|
||||
await expect(photosCategoryHeader).toHaveText("Photos (1)")
|
||||
|
||||
//check file in Photos category
|
||||
const firstFileInThePhotosCategory =
|
||||
ManageFiles.firstFileInThePhotosCategory
|
||||
await expect(firstFileInThePhotosCategory).toBeDisplayed()
|
||||
await expect(firstFileInThePhotosCategory).toHaveText("image.png")
|
||||
|
||||
//remove the file
|
||||
const checkboxFirstFilePhotos = ManageFiles.checkboxFirstFilePhotos
|
||||
await expect(checkboxFirstFilePhotos).toBeDisplayed()
|
||||
await checkboxFirstFilePhotos.click()
|
||||
|
||||
//click delete file button
|
||||
const firstFileInThePhotosCategoryDeleteButton =
|
||||
ManageFiles.firstFileInThePhotosCategoryDeleteButton
|
||||
await expect(firstFileInThePhotosCategoryDeleteButton).toBeDisplayed()
|
||||
await firstFileInThePhotosCategoryDeleteButton.click()
|
||||
|
||||
//check delete file modal
|
||||
const firstFileInThePhotosCategoryDeleteModal =
|
||||
ManageFiles.firstFileInThePhotosCategoryDeleteModal
|
||||
await expect(firstFileInThePhotosCategoryDeleteModal).toBeDisplayed()
|
||||
|
||||
const iconExclamation = ManageFiles.iconExclamation
|
||||
await expect(iconExclamation).toBeDisplayed()
|
||||
|
||||
//cancel deletion
|
||||
const firstFileInThePhotosCategoryDeleteModalCancelButton =
|
||||
ManageFiles.firstFileInThePhotosCategoryDeleteModalCancelButton
|
||||
await expect(
|
||||
firstFileInThePhotosCategoryDeleteModalCancelButton
|
||||
).toBeDisplayed()
|
||||
await firstFileInThePhotosCategoryDeleteModalCancelButton.click()
|
||||
|
||||
//click delete file button again
|
||||
await firstFileInThePhotosCategoryDeleteButton.click()
|
||||
|
||||
const firstFileInThePhotosCategoryDeleteModalDeleteFileButton =
|
||||
ManageFiles.firstFileInThePhotosCategoryDeleteModalDeleteFileButton
|
||||
await expect(
|
||||
firstFileInThePhotosCategoryDeleteModalDeleteFileButton
|
||||
).toBeDisplayed()
|
||||
await firstFileInThePhotosCategoryDeleteModalDeleteFileButton.click()
|
||||
|
||||
// to check after deletion of the file/files
|
||||
|
||||
//check no files available text and subtext
|
||||
const photosCategoryEmptyTitle = ManageFiles.photosCategoryEmptyTitle
|
||||
await expect(photosCategoryEmptyTitle).toBeDisplayed()
|
||||
await expect(photosCategoryEmptyTitle).toHaveText(
|
||||
"We couldn't find any files"
|
||||
)
|
||||
|
||||
const photosCategoryEmptySubtext = ManageFiles.photosCategoryEmptySubtext
|
||||
await expect(photosCategoryEmptySubtext).toBeDisplayed()
|
||||
await expect(photosCategoryEmptySubtext).toHaveText(
|
||||
"Add image files from your computer and they'll transfer to your device automatically."
|
||||
)
|
||||
})
|
||||
|
||||
it("Phone Storage - E-Books section", async () => {
|
||||
//click E-Books section
|
||||
const ebooksCategoryButton = ManageFiles.ebooksCategoryButton
|
||||
await ebooksCategoryButton.click()
|
||||
|
||||
//check E-books category header
|
||||
const ebooksCategoryHeader = ManageFiles.ebooksCategoryHeader
|
||||
await expect(ebooksCategoryHeader).toBeDisplayed()
|
||||
await expect(ebooksCategoryHeader).toHaveText("E-books (1)")
|
||||
|
||||
//check file in E-books category
|
||||
const firstFileInTheEbooksCategory =
|
||||
ManageFiles.firstFileInTheEbooksCategory
|
||||
await expect(firstFileInTheEbooksCategory).toBeDisplayed()
|
||||
await expect(firstFileInTheEbooksCategory).toHaveText("ebook.pdf")
|
||||
|
||||
//remove the file
|
||||
const checkboxFirstFileEbooks = ManageFiles.checkboxFirstFileEbooks
|
||||
await expect(checkboxFirstFileEbooks).toBeDisplayed()
|
||||
await checkboxFirstFileEbooks.click()
|
||||
|
||||
//click delete file button
|
||||
const firstFileInTheEbooksCategoryDeleteButton =
|
||||
ManageFiles.firstFileInTheEbooksCategoryDeleteButton
|
||||
await expect(firstFileInTheEbooksCategoryDeleteButton).toBeDisplayed()
|
||||
await firstFileInTheEbooksCategoryDeleteButton.click()
|
||||
|
||||
//check delete file modal
|
||||
const firstFileInTheEbooksCategoryDeleteModal =
|
||||
ManageFiles.firstFileInTheEbooksCategoryDeleteModal
|
||||
await expect(firstFileInTheEbooksCategoryDeleteModal).toBeDisplayed()
|
||||
|
||||
const iconExclamation = ManageFiles.iconExclamation
|
||||
await expect(iconExclamation).toBeDisplayed()
|
||||
|
||||
//cancel deletion
|
||||
const firstFileInTheEbooksCategoryDeleteModalCancelButton =
|
||||
ManageFiles.firstFileInTheEbooksCategoryDeleteModalCancelButton
|
||||
await expect(
|
||||
firstFileInTheEbooksCategoryDeleteModalCancelButton
|
||||
).toBeDisplayed()
|
||||
await firstFileInTheEbooksCategoryDeleteModalCancelButton.click()
|
||||
|
||||
//click delete file button again
|
||||
await firstFileInTheEbooksCategoryDeleteButton.click()
|
||||
|
||||
const firstFileInTheEbooksCategoryDeleteModalDeleteFileButton =
|
||||
ManageFiles.firstFileInTheEbooksCategoryDeleteModalDeleteFileButton
|
||||
await expect(
|
||||
firstFileInTheEbooksCategoryDeleteModalDeleteFileButton
|
||||
).toBeDisplayed()
|
||||
await firstFileInTheEbooksCategoryDeleteModalDeleteFileButton.click()
|
||||
|
||||
// to check after deletion of the file/files
|
||||
|
||||
//check no files available text and subtext
|
||||
const ebooksCategoryEmptyTitle = ManageFiles.ebooksCategoryEmptyTitle
|
||||
await expect(ebooksCategoryEmptyTitle).toBeDisplayed()
|
||||
await expect(ebooksCategoryEmptyTitle).toHaveText(
|
||||
"We couldn't find any files"
|
||||
)
|
||||
|
||||
const ebooksCategoryEmptySubtext = ManageFiles.ebooksCategoryEmptySubtext
|
||||
await expect(ebooksCategoryEmptySubtext).toBeDisplayed()
|
||||
await expect(ebooksCategoryEmptySubtext).toHaveText(
|
||||
"Add E-book or PDF files from your computer and they'll transfer to your device automatically."
|
||||
)
|
||||
})
|
||||
|
||||
it("Phone Storage - Apps section", async () => {
|
||||
//click Apps section
|
||||
const appsCategoryButton = ManageFiles.appsCategoryButton
|
||||
await appsCategoryButton.click()
|
||||
|
||||
//check Apps category header
|
||||
const appsCategoryHeader = ManageFiles.appsCategoryHeader
|
||||
await expect(appsCategoryHeader).toBeDisplayed()
|
||||
await expect(appsCategoryHeader).toHaveText("Apps (1)")
|
||||
|
||||
//check Add files button
|
||||
const appsCategoryAddFilesButton = ManageFiles.appsCategoryAddFilesButton
|
||||
await expect(appsCategoryAddFilesButton).toBeDisplayed()
|
||||
|
||||
//check file in Apps category
|
||||
const firstFileInTheAppsCategory = ManageFiles.firstFileInTheAppsCategory
|
||||
await expect(firstFileInTheAppsCategory).toBeDisplayed()
|
||||
await expect(firstFileInTheAppsCategory).toHaveText("app.apk")
|
||||
|
||||
//remove the file
|
||||
const checkboxFirstFileApps = ManageFiles.checkboxFirstFileApps
|
||||
await expect(checkboxFirstFileApps).toBeDisplayed()
|
||||
await checkboxFirstFileApps.click()
|
||||
|
||||
//click delete file button
|
||||
const firstFileInTheAppsCategoryDeleteButton =
|
||||
ManageFiles.firstFileInTheAppsCategoryDeleteButton
|
||||
await expect(firstFileInTheAppsCategoryDeleteButton).toBeDisplayed()
|
||||
await firstFileInTheAppsCategoryDeleteButton.click()
|
||||
|
||||
//check delete file modal
|
||||
const firstFileInTheAppsCategoryDeleteModal =
|
||||
ManageFiles.firstFileInTheAppsCategoryDeleteModal
|
||||
await expect(firstFileInTheAppsCategoryDeleteModal).toBeDisplayed()
|
||||
|
||||
const iconExclamation = ManageFiles.iconExclamation
|
||||
await expect(iconExclamation).toBeDisplayed()
|
||||
|
||||
//cancel deletion
|
||||
const firstFileInTheAppsCategoryDeleteModalCancelButton =
|
||||
ManageFiles.firstFileInTheAppsCategoryDeleteModalCancelButton
|
||||
await expect(
|
||||
firstFileInTheAppsCategoryDeleteModalCancelButton
|
||||
).toBeDisplayed()
|
||||
await firstFileInTheAppsCategoryDeleteModalCancelButton.click()
|
||||
|
||||
//click delete file button again
|
||||
await firstFileInTheAppsCategoryDeleteButton.click()
|
||||
|
||||
const firstFileInTheAppsCategoryDeleteModalDeleteFileButton =
|
||||
ManageFiles.firstFileInTheAppsCategoryDeleteModalDeleteFileButton
|
||||
await expect(
|
||||
firstFileInTheAppsCategoryDeleteModalDeleteFileButton
|
||||
).toBeDisplayed()
|
||||
await firstFileInTheAppsCategoryDeleteModalDeleteFileButton.click()
|
||||
|
||||
// to check after deletion of the file/files
|
||||
|
||||
//check no files available text and subtext
|
||||
const appsCategoryEmptyTitle = ManageFiles.appsCategoryEmptyTitle
|
||||
await expect(appsCategoryEmptyTitle).toBeDisplayed()
|
||||
await expect(appsCategoryEmptyTitle).toHaveText(
|
||||
"We couldn't find any files"
|
||||
)
|
||||
|
||||
const appsCategoryEmptySubtext = ManageFiles.appsCategoryEmptySubtext
|
||||
await expect(appsCategoryEmptySubtext).toBeDisplayed()
|
||||
await expect(appsCategoryEmptySubtext).toHaveText(
|
||||
"Add app (.apk) files and install them from here. As Kompakt is a minimalist E-ink device some apps may not work correctly. This may happen due to the google services."
|
||||
)
|
||||
})
|
||||
|
||||
it("SD Card - Music section", async () => {
|
||||
//open SD Card
|
||||
const sdCardButton = ManageFiles.sdCardButton
|
||||
await sdCardButton.click()
|
||||
|
||||
//check Music category header
|
||||
const musicCategoryHeaderSD = ManageFiles.musicCategoryHeaderSD
|
||||
await expect(musicCategoryHeaderSD).toBeDisplayed()
|
||||
await expect(musicCategoryHeaderSD).toHaveText("Music (1)")
|
||||
|
||||
//check file in Music category
|
||||
const firstFileInTheMusicCategorySD =
|
||||
ManageFiles.firstFileInTheMusicCategorySD
|
||||
await expect(firstFileInTheMusicCategorySD).toBeDisplayed()
|
||||
await expect(firstFileInTheMusicCategorySD).toHaveText("test.mp3")
|
||||
|
||||
//remove the file
|
||||
const checkboxFirstFileMusicSD = ManageFiles.checkboxFirstFileMusicSD
|
||||
await expect(checkboxFirstFileMusicSD).toBeDisplayed()
|
||||
await checkboxFirstFileMusicSD.click()
|
||||
|
||||
//click delete file button
|
||||
const firstFileInTheMusicCategoryDeleteButtonSD =
|
||||
ManageFiles.firstFileInTheMusicCategoryDeleteButtonSD
|
||||
await expect(firstFileInTheMusicCategoryDeleteButtonSD).toBeDisplayed()
|
||||
await firstFileInTheMusicCategoryDeleteButtonSD.click()
|
||||
|
||||
//check delete file modal
|
||||
const firstFileInTheMusicCategoryDeleteModalSD =
|
||||
ManageFiles.firstFileInTheMusicCategoryDeleteModalSD
|
||||
await expect(firstFileInTheMusicCategoryDeleteModalSD).toBeDisplayed()
|
||||
|
||||
const iconExclamation = ManageFiles.iconExclamation
|
||||
await expect(iconExclamation).toBeDisplayed()
|
||||
|
||||
//cancel deletion
|
||||
const firstFileInTheMusicCategoryDeleteModalCancelButtonSD =
|
||||
ManageFiles.firstFileInTheMusicCategoryDeleteModalCancelButtonSD
|
||||
await expect(
|
||||
firstFileInTheMusicCategoryDeleteModalCancelButtonSD
|
||||
).toBeDisplayed()
|
||||
await firstFileInTheMusicCategoryDeleteModalCancelButtonSD.click()
|
||||
|
||||
//click delete file button again
|
||||
await firstFileInTheMusicCategoryDeleteButtonSD.click()
|
||||
|
||||
const firstFileInTheMusicCategoryDeleteModalDeleteFileButtonSD =
|
||||
ManageFiles.firstFileInTheMusicCategoryDeleteModalDeleteFileButtonSD
|
||||
await expect(
|
||||
firstFileInTheMusicCategoryDeleteModalDeleteFileButtonSD
|
||||
).toBeDisplayed()
|
||||
await firstFileInTheMusicCategoryDeleteModalDeleteFileButtonSD.click()
|
||||
|
||||
// to check after deletion of the file/files
|
||||
|
||||
//check no files available text and subtext
|
||||
const musicCategoryEmptyTitleSD = ManageFiles.musicCategoryEmptyTitleSD
|
||||
await expect(musicCategoryEmptyTitleSD).toBeDisplayed()
|
||||
await expect(musicCategoryEmptyTitleSD).toHaveText(
|
||||
"We couldn't find any files"
|
||||
)
|
||||
|
||||
const musicCategoryEmptySubtextSD = ManageFiles.musicCategoryEmptySubtextSD
|
||||
await expect(musicCategoryEmptySubtextSD).toBeDisplayed()
|
||||
await expect(musicCategoryEmptySubtextSD).toHaveText(
|
||||
"Add music files from your computer and they'll transfer to your device automatically."
|
||||
)
|
||||
})
|
||||
|
||||
it("SD Card - Photos section", async () => {
|
||||
//click Photos section
|
||||
const photosCategoryButtonSD = ManageFiles.photosCategoryButtonSD
|
||||
await photosCategoryButtonSD.click()
|
||||
|
||||
//check Photos category header
|
||||
const photosCategoryHeaderSD = ManageFiles.photosCategoryHeaderSD
|
||||
await expect(photosCategoryHeaderSD).toBeDisplayed()
|
||||
await expect(photosCategoryHeaderSD).toHaveText("Photos (1)")
|
||||
|
||||
//check file in Photos category
|
||||
const firstFileInThePhotosCategorySD =
|
||||
ManageFiles.firstFileInThePhotosCategorySD
|
||||
await expect(firstFileInThePhotosCategorySD).toBeDisplayed()
|
||||
await expect(firstFileInThePhotosCategorySD).toHaveText("image.png")
|
||||
|
||||
//remove the file
|
||||
const checkboxFirstFilePhotosSD = ManageFiles.checkboxFirstFilePhotosSD
|
||||
await expect(checkboxFirstFilePhotosSD).toBeDisplayed()
|
||||
await checkboxFirstFilePhotosSD.click()
|
||||
|
||||
//click delete file button
|
||||
const firstFileInThePhotosCategoryDeleteButtonSD =
|
||||
ManageFiles.firstFileInThePhotosCategoryDeleteButtonSD
|
||||
await expect(firstFileInThePhotosCategoryDeleteButtonSD).toBeDisplayed()
|
||||
await firstFileInThePhotosCategoryDeleteButtonSD.click()
|
||||
|
||||
//check delete file modal
|
||||
const firstFileInThePhotosCategoryDeleteModalSD =
|
||||
ManageFiles.firstFileInThePhotosCategoryDeleteModalSD
|
||||
await expect(firstFileInThePhotosCategoryDeleteModalSD).toBeDisplayed()
|
||||
|
||||
const iconExclamation = ManageFiles.iconExclamation
|
||||
await expect(iconExclamation).toBeDisplayed()
|
||||
|
||||
//cancel deletion
|
||||
const firstFileInThePhotosCategoryDeleteModalCancelButtonSD =
|
||||
ManageFiles.firstFileInThePhotosCategoryDeleteModalCancelButtonSD
|
||||
await expect(
|
||||
firstFileInThePhotosCategoryDeleteModalCancelButtonSD
|
||||
).toBeDisplayed()
|
||||
await firstFileInThePhotosCategoryDeleteModalCancelButtonSD.click()
|
||||
|
||||
//click delete file button again
|
||||
await firstFileInThePhotosCategoryDeleteButtonSD.click()
|
||||
|
||||
const firstFileInThePhotosCategoryDeleteModalDeleteFileButtonSD =
|
||||
ManageFiles.firstFileInThePhotosCategoryDeleteModalDeleteFileButtonSD
|
||||
await expect(
|
||||
firstFileInThePhotosCategoryDeleteModalDeleteFileButtonSD
|
||||
).toBeDisplayed()
|
||||
await firstFileInThePhotosCategoryDeleteModalDeleteFileButtonSD.click()
|
||||
|
||||
// to check after deletion of the file/files
|
||||
|
||||
//check no files available text and subtext
|
||||
const photosCategoryEmptyTitleSD = ManageFiles.photosCategoryEmptyTitleSD
|
||||
await expect(photosCategoryEmptyTitleSD).toBeDisplayed()
|
||||
await expect(photosCategoryEmptyTitleSD).toHaveText(
|
||||
"We couldn't find any files"
|
||||
)
|
||||
|
||||
const photosCategoryEmptySubtextSD =
|
||||
ManageFiles.photosCategoryEmptySubtextSD
|
||||
await expect(photosCategoryEmptySubtextSD).toBeDisplayed()
|
||||
await expect(photosCategoryEmptySubtextSD).toHaveText(
|
||||
"Add image files from your computer and they'll transfer to your device automatically."
|
||||
)
|
||||
})
|
||||
|
||||
it("SD Card - E-Books section", async () => {
|
||||
//click E-Books section
|
||||
const ebooksCategoryButtonSD = ManageFiles.ebooksCategoryButtonSD
|
||||
await ebooksCategoryButtonSD.click()
|
||||
|
||||
//check E-books category header
|
||||
const ebooksCategoryHeaderSD = ManageFiles.ebooksCategoryHeaderSD
|
||||
await expect(ebooksCategoryHeaderSD).toBeDisplayed()
|
||||
await expect(ebooksCategoryHeaderSD).toHaveText("E-books (1)")
|
||||
|
||||
//check file in E-books category
|
||||
const firstFileInTheEbooksCategorySD =
|
||||
ManageFiles.firstFileInTheEbooksCategorySD
|
||||
await expect(firstFileInTheEbooksCategorySD).toBeDisplayed()
|
||||
await expect(firstFileInTheEbooksCategorySD).toHaveText("ebook.pdf")
|
||||
|
||||
//remove the file
|
||||
const checkboxFirstFileEbooksSD = ManageFiles.checkboxFirstFileEbooksSD
|
||||
await expect(checkboxFirstFileEbooksSD).toBeDisplayed()
|
||||
await checkboxFirstFileEbooksSD.click()
|
||||
|
||||
//click delete file button
|
||||
const firstFileInTheEbooksCategoryDeleteButtonSD =
|
||||
ManageFiles.firstFileInTheEbooksCategoryDeleteButtonSD
|
||||
await expect(firstFileInTheEbooksCategoryDeleteButtonSD).toBeDisplayed()
|
||||
await firstFileInTheEbooksCategoryDeleteButtonSD.click()
|
||||
|
||||
//check delete file modal
|
||||
const firstFileInTheEbooksCategoryDeleteModalSD =
|
||||
ManageFiles.firstFileInTheEbooksCategoryDeleteModalSD
|
||||
await expect(firstFileInTheEbooksCategoryDeleteModalSD).toBeDisplayed()
|
||||
|
||||
const iconExclamation = ManageFiles.iconExclamation
|
||||
await expect(iconExclamation).toBeDisplayed()
|
||||
|
||||
//cancel deletion
|
||||
const firstFileInTheEbooksCategoryDeleteModalCancelButtonSD =
|
||||
ManageFiles.firstFileInTheEbooksCategoryDeleteModalCancelButtonSD
|
||||
await expect(
|
||||
firstFileInTheEbooksCategoryDeleteModalCancelButtonSD
|
||||
).toBeDisplayed()
|
||||
await firstFileInTheEbooksCategoryDeleteModalCancelButtonSD.click()
|
||||
|
||||
//click delete file button again
|
||||
await firstFileInTheEbooksCategoryDeleteButtonSD.click()
|
||||
|
||||
const firstFileInTheEbooksCategoryDeleteModalDeleteFileButtonSD =
|
||||
ManageFiles.firstFileInTheEbooksCategoryDeleteModalDeleteFileButtonSD
|
||||
await expect(
|
||||
firstFileInTheEbooksCategoryDeleteModalDeleteFileButtonSD
|
||||
).toBeDisplayed()
|
||||
await firstFileInTheEbooksCategoryDeleteModalDeleteFileButtonSD.click()
|
||||
|
||||
// to check after deletion of the file/files
|
||||
|
||||
//check no files available text and subtext
|
||||
const ebooksCategoryEmptyTitleSD = ManageFiles.ebooksCategoryEmptyTitleSD
|
||||
await expect(ebooksCategoryEmptyTitleSD).toBeDisplayed()
|
||||
await expect(ebooksCategoryEmptyTitleSD).toHaveText(
|
||||
"We couldn't find any files"
|
||||
)
|
||||
|
||||
const ebooksCategoryEmptySubtextSD =
|
||||
ManageFiles.ebooksCategoryEmptySubtextSD
|
||||
await expect(ebooksCategoryEmptySubtextSD).toBeDisplayed()
|
||||
await expect(ebooksCategoryEmptySubtextSD).toHaveText(
|
||||
"Add E-book or PDF files from your computer and they'll transfer to your device automatically."
|
||||
)
|
||||
})
|
||||
|
||||
it("SD Card - Apps section", async () => {
|
||||
//click Apps section
|
||||
const appsCategoryButtonSD = ManageFiles.appsCategoryButtonSD
|
||||
await appsCategoryButtonSD.click()
|
||||
|
||||
//check Apps category header
|
||||
const appsCategoryHeaderSD = ManageFiles.appsCategoryHeaderSD
|
||||
await expect(appsCategoryHeaderSD).toBeDisplayed()
|
||||
await expect(appsCategoryHeaderSD).toHaveText("Apps (2)")
|
||||
|
||||
//check Add files button
|
||||
const appsCategoryAddFilesButtonSD =
|
||||
ManageFiles.appsCategoryAddFilesButtonSD
|
||||
await expect(appsCategoryAddFilesButtonSD).toBeDisplayed()
|
||||
|
||||
//check file in Apps category
|
||||
const firstFileInTheAppsCategorySD =
|
||||
ManageFiles.firstFileInTheAppsCategorySD
|
||||
await expect(firstFileInTheAppsCategorySD).toBeDisplayed()
|
||||
await expect(firstFileInTheAppsCategorySD).toHaveText("app.apk")
|
||||
|
||||
//remove ALL files
|
||||
const checkboxFirstFileAppsSD = ManageFiles.checkboxFirstFileAppsSD
|
||||
await checkboxFirstFileAppsSD.click() //select first file
|
||||
const checkboxAllFilesAppsSD = ManageFiles.checkboxAllFilesAppsSD
|
||||
await expect(checkboxAllFilesAppsSD).toBeDisplayed()
|
||||
await checkboxAllFilesAppsSD.click() //select all files
|
||||
|
||||
//click delete file button
|
||||
const firstFileInTheAppsCategoryDeleteButtonSD =
|
||||
ManageFiles.firstFileInTheAppsCategoryDeleteButtonSD
|
||||
await expect(firstFileInTheAppsCategoryDeleteButtonSD).toBeDisplayed()
|
||||
await firstFileInTheAppsCategoryDeleteButtonSD.click()
|
||||
|
||||
//check delete file modal
|
||||
const firstFileInTheAppsCategoryDeleteModalSD =
|
||||
ManageFiles.firstFileInTheAppsCategoryDeleteModalSD
|
||||
await expect(firstFileInTheAppsCategoryDeleteModalSD).toBeDisplayed()
|
||||
|
||||
const iconExclamation = ManageFiles.iconExclamation
|
||||
await expect(iconExclamation).toBeDisplayed()
|
||||
|
||||
//cancel deletion
|
||||
const firstFileInTheAppsCategoryDeleteModalCancelButtonSD =
|
||||
ManageFiles.firstFileInTheAppsCategoryDeleteModalCancelButtonSD
|
||||
await expect(
|
||||
firstFileInTheAppsCategoryDeleteModalCancelButtonSD
|
||||
).toBeDisplayed()
|
||||
await firstFileInTheAppsCategoryDeleteModalCancelButtonSD.click()
|
||||
|
||||
//click delete file button again
|
||||
await firstFileInTheAppsCategoryDeleteButtonSD.click()
|
||||
|
||||
const firstFileInTheAppsCategoryDeleteModalDeleteFileButtonSD =
|
||||
ManageFiles.firstFileInTheAppsCategoryDeleteModalDeleteFileButtonSD
|
||||
await expect(
|
||||
firstFileInTheAppsCategoryDeleteModalDeleteFileButtonSD
|
||||
).toBeDisplayed()
|
||||
await firstFileInTheAppsCategoryDeleteModalDeleteFileButtonSD.click()
|
||||
|
||||
// to check after deletion of the file/files
|
||||
|
||||
//check no files available text and subtext
|
||||
const appsCategoryEmptyTitleSD = ManageFiles.appsCategoryEmptyTitleSD
|
||||
await expect(appsCategoryEmptyTitleSD).toBeDisplayed()
|
||||
await expect(appsCategoryEmptyTitleSD).toHaveText(
|
||||
"We couldn't find any files"
|
||||
)
|
||||
|
||||
const appsCategoryEmptySubtextSD = ManageFiles.appsCategoryEmptySubtextSD
|
||||
await expect(appsCategoryEmptySubtextSD).toBeDisplayed()
|
||||
await expect(appsCategoryEmptySubtextSD).toHaveText(
|
||||
"Add app (.apk) files and install them from here. As Kompakt is a minimalist E-ink device some apps may not work correctly. This may happen due to the google services."
|
||||
)
|
||||
})
|
||||
})
|
||||
@@ -58,7 +58,7 @@ describe("E2E mock sample - overview view", () => {
|
||||
|
||||
const serialNumberLabel = await OverviewKompaktPage.serialNumberLabel
|
||||
const serialNumberValue = await OverviewKompaktPage.serialNumberValue
|
||||
await expect(serialNumberLabel).toHaveText("Serial number")
|
||||
await expect(serialNumberLabel).toHaveText("Serial number:")
|
||||
await expect(serialNumberValue).toHaveText(
|
||||
overviewDataWithOneSimCard.summary.about.serialNumber.text.toString()
|
||||
)
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
import exp from "constants"
|
||||
import { E2EMockClient } from "../../../../../libs/e2e-mock/client/src"
|
||||
import { overviewDataWithOneSimCard } from "../../../../../libs/e2e-mock/responses/src"
|
||||
import { createMockBackup } from "../../helpers/mock-backup"
|
||||
import OverviewKompaktPage from "../../page-objects/overview-kompakt.page"
|
||||
|
||||
describe("Check restore - interrupted", () => {
|
||||
const firstSerialNumber = "0123456789ABCDEF"
|
||||
|
||||
before(async () => {
|
||||
// Arrange – setup backup and connect mock
|
||||
await createMockBackup(firstSerialNumber)
|
||||
|
||||
E2EMockClient.connect()
|
||||
await browser.waitUntil(() => E2EMockClient.checkConnection())
|
||||
})
|
||||
|
||||
after(() => {
|
||||
// Clean up
|
||||
E2EMockClient.stopServer()
|
||||
E2EMockClient.disconnect()
|
||||
})
|
||||
|
||||
it("Connect device", async () => {
|
||||
// Arrange – setup mocked device response
|
||||
E2EMockClient.mockResponses([
|
||||
{
|
||||
path: "path-1",
|
||||
endpoint: "FEATURE_DATA",
|
||||
method: "GET",
|
||||
status: 200,
|
||||
body: {
|
||||
...overviewDataWithOneSimCard,
|
||||
sections: {
|
||||
...overviewDataWithOneSimCard.sections,
|
||||
backup: {
|
||||
...overviewDataWithOneSimCard.sections.backup,
|
||||
show: true,
|
||||
details: [
|
||||
{
|
||||
fileName: "1752426740400_0123456789ABCDEF.mcbackup",
|
||||
serialNumber: firstSerialNumber,
|
||||
vendorId: "3310",
|
||||
productId: "2006",
|
||||
timestamp: 1752426740400,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
])
|
||||
|
||||
E2EMockClient.addDevice({ path: "path-1", serialNumber: firstSerialNumber })
|
||||
|
||||
// Act – wait for overview menu to load
|
||||
await browser.pause(6000)
|
||||
const menuItem = await $(`//a[@href="#/generic/mc-overview"]`)
|
||||
await menuItem.waitForDisplayed({ timeout: 10000 })
|
||||
|
||||
// Assert
|
||||
await expect(menuItem).toBeDisplayed()
|
||||
await browser.pause(7000)
|
||||
})
|
||||
|
||||
it("Click Restore button", async () => {
|
||||
// Arrange
|
||||
const restoreButton = OverviewKompaktPage.kompaktRestoreButton
|
||||
const timeout = 100000
|
||||
const interval = 500
|
||||
const startTime = Date.now()
|
||||
|
||||
// Act – wait for the button to become clickable
|
||||
let isDisplayed = false
|
||||
while (Date.now() - startTime < timeout) {
|
||||
try {
|
||||
isDisplayed = await restoreButton.isDisplayed()
|
||||
if (isDisplayed && (await restoreButton.isClickable())) {
|
||||
break
|
||||
}
|
||||
} catch (e) {}
|
||||
await browser.pause(interval)
|
||||
}
|
||||
|
||||
// Assert
|
||||
await expect(restoreButton).toBeDisplayed()
|
||||
await restoreButton.click()
|
||||
})
|
||||
|
||||
it("Select latest backup file and proceed next", async () => {
|
||||
// Arrange
|
||||
const label = await OverviewKompaktPage.getLatestBackupLabel()
|
||||
const confirmButton = OverviewKompaktPage.kompaktRestoreModalConfirm
|
||||
|
||||
// Act
|
||||
await label.click()
|
||||
|
||||
// Assert
|
||||
await expect(confirmButton).toBeDisplayed()
|
||||
await confirmButton.click()
|
||||
})
|
||||
|
||||
it("Verify failed Restore modal", async () => {
|
||||
// Arrange
|
||||
const failedHeader = OverviewKompaktPage.restoringFailedHeader
|
||||
const failedDescription = OverviewKompaktPage.restoringFailedDescription
|
||||
const closeButton = OverviewKompaktPage.kompaktRestoreModalCloseFailedButton
|
||||
|
||||
// Act – wait for modal to appear
|
||||
await browser.waitUntil(async () => await failedHeader.isDisplayed(), {
|
||||
timeout: 15000,
|
||||
timeoutMsg: "Restore failed header did not appear",
|
||||
})
|
||||
|
||||
// Assert
|
||||
await expect(failedHeader).toHaveText("Restore failed")
|
||||
await expect(failedDescription).toHaveText(
|
||||
"The restore process was interrupted."
|
||||
)
|
||||
await expect(closeButton).toBeDisplayed()
|
||||
await closeButton.click()
|
||||
})
|
||||
|
||||
it("Verify if overview page is displayed after Restore is failed", async () => {
|
||||
// Arrange
|
||||
const kompaktImage = OverviewKompaktPage.kompaktImage
|
||||
|
||||
// Assert
|
||||
await expect(kompaktImage).toBeDisplayed()
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,123 @@
|
||||
import { E2EMockClient } from "../../../../../libs/e2e-mock/client/src"
|
||||
import { overviewDataWithOneSimCard } from "../../../../../libs/e2e-mock/responses/src"
|
||||
import { createMockBackup } from "./../../helpers/mock-backup"
|
||||
import OverviewKompaktPage from "../../page-objects/overview-kompakt.page"
|
||||
|
||||
describe("Check restore modal", () => {
|
||||
const firstSerialNumber = "0123456789ABCDEF"
|
||||
|
||||
before(async () => {
|
||||
await createMockBackup(firstSerialNumber)
|
||||
|
||||
E2EMockClient.connect()
|
||||
//wait for a connection to be established
|
||||
await browser.waitUntil(() => {
|
||||
return E2EMockClient.checkConnection()
|
||||
})
|
||||
})
|
||||
|
||||
after(() => {
|
||||
E2EMockClient.stopServer()
|
||||
E2EMockClient.disconnect()
|
||||
})
|
||||
|
||||
it("Connect device", async () => {
|
||||
E2EMockClient.mockResponses([
|
||||
{
|
||||
path: "path-1",
|
||||
endpoint: "FEATURE_DATA",
|
||||
method: "GET",
|
||||
status: 200,
|
||||
body: {
|
||||
...overviewDataWithOneSimCard,
|
||||
sections: {
|
||||
...overviewDataWithOneSimCard.sections,
|
||||
backup: {
|
||||
...overviewDataWithOneSimCard.sections.backup,
|
||||
show: true,
|
||||
details: [
|
||||
{
|
||||
fileName: "1752426740400_0123456789ABCDEF.mcbackup",
|
||||
serialNumber: "0123456789ABCDEF",
|
||||
vendorId: "3310",
|
||||
productId: "2006",
|
||||
timestamp: 1752426740400,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
])
|
||||
|
||||
E2EMockClient.addDevice({
|
||||
path: "path-1",
|
||||
serialNumber: "0123456789ABCDEF",
|
||||
})
|
||||
|
||||
await browser.pause(6000)
|
||||
const menuItem = await $(`//a[@href="#/generic/mc-overview"]`)
|
||||
await menuItem.waitForDisplayed({ timeout: 10000 })
|
||||
await expect(menuItem).toBeDisplayed()
|
||||
await browser.pause(7000) //wait until Restore button will appear (it takes about 5-7 seconds to load)
|
||||
})
|
||||
|
||||
it("Click Restore button", async () => {
|
||||
const kompaktRestoreButton = OverviewKompaktPage.kompaktRestoreButton
|
||||
const timeout = 100000 // max 100 seconds
|
||||
const interval = 500 // check each 500ms
|
||||
const startTime = Date.now()
|
||||
|
||||
let isDisplayed = false
|
||||
|
||||
while (Date.now() - startTime < timeout) {
|
||||
try {
|
||||
isDisplayed = await kompaktRestoreButton.isDisplayed()
|
||||
if (isDisplayed && (await kompaktRestoreButton.isClickable())) {
|
||||
break
|
||||
}
|
||||
} catch (e) {
|
||||
// ignore temp missing element
|
||||
}
|
||||
await browser.pause(interval)
|
||||
}
|
||||
|
||||
// final check and click of the Restore button
|
||||
await expect(kompaktRestoreButton).toBeDisplayed()
|
||||
await kompaktRestoreButton.click()
|
||||
})
|
||||
|
||||
it("Verify Restore modal", async () => {
|
||||
const kompaktRestoreModal = OverviewKompaktPage.kompaktRestoreModal
|
||||
await expect(kompaktRestoreModal).toBeDisplayed()
|
||||
|
||||
const kompaktRestoreModalIcon = OverviewKompaktPage.kompaktRestoreModalIcon
|
||||
await expect(kompaktRestoreModalIcon).toBeDisplayed()
|
||||
|
||||
const kompaktRestoreTitle = OverviewKompaktPage.kompaktRestoreTitle
|
||||
await expect(kompaktRestoreTitle).toHaveText("Restore from backup")
|
||||
|
||||
const kompaktRestoreSubtitle = OverviewKompaktPage.kompaktRestoreSubtitle
|
||||
await expect(kompaktRestoreSubtitle).toHaveText(
|
||||
"Select one of the backups you want to restore."
|
||||
)
|
||||
|
||||
const kompaktRestoreModalConfirm =
|
||||
OverviewKompaktPage.kompaktRestoreModalConfirm
|
||||
await expect(kompaktRestoreModalConfirm).toBeDisplayed()
|
||||
|
||||
//check if latest restore file exist (radio button + label)
|
||||
const label = await OverviewKompaktPage.getLatestBackupLabel()
|
||||
await expect(label).toBeDisplayed()
|
||||
|
||||
const kompaktRestoreModalCancel =
|
||||
OverviewKompaktPage.kompaktRestoreModalCancel
|
||||
await expect(kompaktRestoreModalCancel).toBeDisplayed()
|
||||
await kompaktRestoreModalCancel.click() //close restore modal
|
||||
})
|
||||
|
||||
it("Verify if overview page is displayed after closing Restore modal", async () => {
|
||||
const kompaktImage = await OverviewKompaktPage.kompaktImage
|
||||
await expect(kompaktImage).toBeDisplayed()
|
||||
})
|
||||
})
|
||||
@@ -29,9 +29,6 @@ describe("Checking for Mudita Center updates", () => {
|
||||
await aboutTab.click()
|
||||
|
||||
const aboutUpToDateLabel = await SettingsPage.aboutUpToDateLabel
|
||||
await browser.executeAsync((done) => {
|
||||
setTimeout(done, 10000)
|
||||
})
|
||||
await expect(aboutUpToDateLabel).toBeDisplayed()
|
||||
await expect(aboutUpToDateLabel).toHaveText("You’re up to date.")
|
||||
})
|
||||
|
||||
@@ -54,19 +54,6 @@ describe("Checking Terms of service", () => {
|
||||
await expect(modalHeader).toHaveText("Mudita Center Terms of Service")
|
||||
})
|
||||
|
||||
it("Check keywords", async () => {
|
||||
const firstParagraph = ModalTermsOfServicePage.firstParagraph
|
||||
await expect(firstParagraph).toHaveTextContaining(
|
||||
"National Court Register, entry no. 0000467620"
|
||||
)
|
||||
await expect(firstParagraph).toHaveTextContaining(
|
||||
"Tax Identification Number: 5252558282"
|
||||
)
|
||||
await expect(firstParagraph).toHaveTextContaining(
|
||||
"Statistical Identification Number: 146767613"
|
||||
)
|
||||
})
|
||||
|
||||
it("Check Terms of service sections", async () => {
|
||||
const sectionGeneralProvisions =
|
||||
await ModalTermsOfServicePage.sectionGeneralProvisions
|
||||
@@ -128,7 +115,7 @@ describe("Checking Terms of service", () => {
|
||||
const companyWebsiteLink = await ModalTermsOfServicePage.companyWebsiteLink
|
||||
await expect(companyWebsiteLink).toHaveAttribute(
|
||||
"href",
|
||||
"https://www.mudita.com/"
|
||||
"https://mudita.com/legal/terms-conditions/mudita-center/"
|
||||
)
|
||||
|
||||
const emailLink = await ModalTermsOfServicePage.companyEmailLink
|
||||
|
||||
@@ -233,7 +233,7 @@ describe("Kompakt switching devices", () => {
|
||||
it("Verify 6th Kompakt with new Serial Number and click Show connected devices", async () => {
|
||||
const serialNumberLabel = await OverviewKompaktPage.serialNumberLabel
|
||||
const serialNumberValue = await OverviewKompaktPage.serialNumberValue
|
||||
await expect(serialNumberLabel).toHaveText("Serial number")
|
||||
await expect(serialNumberLabel).toHaveText("Serial number:")
|
||||
await expect(serialNumberValue).toHaveText(
|
||||
overviewDataWithOneSimCard6th.summary.about.serialNumber.text.toString()
|
||||
)
|
||||
|
||||
@@ -34,7 +34,7 @@ export enum TestFilesPaths {
|
||||
helpSectionSearchNoResults = "src/specs/help/help-section-search-noresults.e2e.ts",
|
||||
helpLinkInsideContainer = "src/specs/help/help-link-inside-container.ts",
|
||||
contactSupportHappyPath = "src/specs/help/contact-support-happy-path.ts",
|
||||
kompaktBackupApi = "src/specs/overview/kompakt-backup-api.ts",
|
||||
kompaktPrebackupApi = "src/specs/overview/kompakt-backup-api.ts",
|
||||
kompaktContactsViewing = "src/specs/overview/kompakt-contacts-viewing.ts",
|
||||
kompaktContactsViewingEmpty = "src/specs/overview/kompakt-contacts-viewing-empty.ts",
|
||||
kompaktContactsDeleteDetails = "src/specs/overview/kompakt-contacts-delete-details.ts",
|
||||
@@ -49,5 +49,11 @@ export enum TestFilesPaths {
|
||||
helpSectionKompakt = "src/specs/help/help-section-check-kompakt.ts",
|
||||
kompaktManageFilesOverall = "src/specs/overview/kompakt-manage-files-overall-check.ts",
|
||||
kompaktBackupFailedFullStorage = "src/specs/overview/kompakt-backup-error-storage-full.ts",
|
||||
kompaktManageFilesRemoveFiles = "src/specs/overview/kompakt-manage-files-remove-files.ts",
|
||||
kompaktManageFilesDeleteApkText = "src/specs/overview/kompakt-manage-files-delete-apk-text.ts",
|
||||
kompaktManageFilesInstallApkModalUpdate = "src/specs/overview/kompakt-manage-files-install-apk-modal-update.ts",
|
||||
kompaktCheckDeviceType = "src/specs/overview/kompakt-check-device-type.ts",
|
||||
kompaktRestoreModalCheck = "src/specs/overview/kompakt-restore-modal-check.ts",
|
||||
kompaktRestoreFailedModalCheck = "src/specs/overview/kompakt-restore-failed.ts",
|
||||
}
|
||||
export const toRelativePath = (path: string) => `./${path}`
|
||||
|
||||
@@ -87,7 +87,7 @@ export const config: Options.Testrunner = {
|
||||
toRelativePath(TestFilesPaths.helpSectionSearchNoResults),
|
||||
toRelativePath(TestFilesPaths.helpLinkInsideContainer),
|
||||
toRelativePath(TestFilesPaths.contactSupportHappyPath),
|
||||
//toRelativePath(TestFilesPaths.kompaktPrebackupApi),
|
||||
toRelativePath(TestFilesPaths.kompaktPrebackupApi),
|
||||
toRelativePath(TestFilesPaths.kompaktContactsViewing),
|
||||
toRelativePath(TestFilesPaths.kompaktContactsViewingEmpty),
|
||||
toRelativePath(TestFilesPaths.kompaktContactsDeleteDetails),
|
||||
@@ -102,12 +102,18 @@ export const config: Options.Testrunner = {
|
||||
toRelativePath(TestFilesPaths.helpSectionKompakt),
|
||||
toRelativePath(TestFilesPaths.kompaktManageFilesOverall),
|
||||
toRelativePath(TestFilesPaths.kompaktBackupFailedFullStorage),
|
||||
toRelativePath(TestFilesPaths.kompaktManageFilesRemoveFiles),
|
||||
toRelativePath(TestFilesPaths.kompaktManageFilesDeleteApkText),
|
||||
toRelativePath(TestFilesPaths.kompaktManageFilesInstallApkModalUpdate),
|
||||
toRelativePath(TestFilesPaths.kompaktCheckDeviceType),
|
||||
toRelativePath(TestFilesPaths.kompaktRestoreModalCheck),
|
||||
toRelativePath(TestFilesPaths.kompaktRestoreFailedModalCheck),
|
||||
],
|
||||
suites: {
|
||||
standalone: [
|
||||
toRelativePath(TestFilesPaths.helpSectionCheckTest),
|
||||
toRelativePath(TestFilesPaths.helpSectionCheckTestOffline),
|
||||
//toRelativePath(TestFilesPaths.homePageTestDeviceNotConnectedTest),
|
||||
toRelativePath(TestFilesPaths.homePageTestDeviceNotConnectedTest),
|
||||
toRelativePath(TestFilesPaths.newsPageOnlineTest),
|
||||
toRelativePath(TestFilesPaths.newsMoreNews),
|
||||
toRelativePath(TestFilesPaths.termsOfServiceTest),
|
||||
@@ -135,7 +141,7 @@ export const config: Options.Testrunner = {
|
||||
toRelativePath(TestFilesPaths.kompaktDrawerStressTest),
|
||||
toRelativePath(TestFilesPaths.kompaktBackupModalGettingInitialInfo),
|
||||
toRelativePath(TestFilesPaths.contactSupportHappyPath),
|
||||
//toRelativePath(TestFilesPaths.kompaktPrebackupApi),
|
||||
toRelativePath(TestFilesPaths.kompaktPrebackupApi),
|
||||
toRelativePath(TestFilesPaths.kompaktContactsViewing),
|
||||
toRelativePath(TestFilesPaths.kompaktContactsViewingEmpty),
|
||||
toRelativePath(TestFilesPaths.kompaktContactsDeleteDetails),
|
||||
@@ -149,6 +155,12 @@ export const config: Options.Testrunner = {
|
||||
toRelativePath(TestFilesPaths.kompaktBackupErrorDisconnect),
|
||||
toRelativePath(TestFilesPaths.kompaktManageFilesOverall),
|
||||
toRelativePath(TestFilesPaths.kompaktBackupFailedFullStorage),
|
||||
toRelativePath(TestFilesPaths.kompaktManageFilesRemoveFiles),
|
||||
toRelativePath(TestFilesPaths.kompaktManageFilesDeleteApkText),
|
||||
toRelativePath(TestFilesPaths.kompaktManageFilesInstallApkModalUpdate),
|
||||
toRelativePath(TestFilesPaths.kompaktCheckDeviceType),
|
||||
toRelativePath(TestFilesPaths.kompaktRestoreModalCheck),
|
||||
toRelativePath(TestFilesPaths.kompaktRestoreFailedModalCheck),
|
||||
],
|
||||
multidevicePureHarmony: [],
|
||||
multideviceSingleHarmony: [],
|
||||
@@ -164,9 +176,10 @@ export const config: Options.Testrunner = {
|
||||
cicdStandalone: [
|
||||
toRelativePath(TestFilesPaths.helpSectionCheckTest),
|
||||
toRelativePath(TestFilesPaths.helpSectionCheckTestOffline),
|
||||
//toRelativePath(TestFilesPaths.homePageTestDeviceNotConnectedTest),
|
||||
toRelativePath(TestFilesPaths.homePageTestDeviceNotConnectedTest),
|
||||
toRelativePath(TestFilesPaths.newsPageOnlineTest),
|
||||
toRelativePath(TestFilesPaths.termsOfServiceTest),
|
||||
toRelativePath(TestFilesPaths.privacyPolicyTest),
|
||||
toRelativePath(TestFilesPaths.contactSupportUnhappyPath),
|
||||
toRelativePath(TestFilesPaths.newsMoreNews),
|
||||
toRelativePath(TestFilesPaths.helpVerifyFeedback),
|
||||
@@ -190,7 +203,7 @@ export const config: Options.Testrunner = {
|
||||
toRelativePath(TestFilesPaths.kompaktDrawerStressTest),
|
||||
toRelativePath(TestFilesPaths.kompaktBackupModalGettingInitialInfo),
|
||||
toRelativePath(TestFilesPaths.contactSupportHappyPath),
|
||||
//toRelativePath(TestFilesPaths.kompaktPrebackupApi),
|
||||
toRelativePath(TestFilesPaths.kompaktPrebackupApi),
|
||||
toRelativePath(TestFilesPaths.kompaktContactsViewing),
|
||||
toRelativePath(TestFilesPaths.kompaktContactsViewingEmpty),
|
||||
toRelativePath(TestFilesPaths.kompaktContactsDeleteDetails),
|
||||
@@ -204,6 +217,12 @@ export const config: Options.Testrunner = {
|
||||
toRelativePath(TestFilesPaths.kompaktBackupErrorDisconnect),
|
||||
toRelativePath(TestFilesPaths.kompaktManageFilesOverall),
|
||||
toRelativePath(TestFilesPaths.kompaktBackupFailedFullStorage),
|
||||
toRelativePath(TestFilesPaths.kompaktManageFilesRemoveFiles),
|
||||
toRelativePath(TestFilesPaths.kompaktManageFilesDeleteApkText),
|
||||
toRelativePath(TestFilesPaths.kompaktManageFilesInstallApkModalUpdate),
|
||||
toRelativePath(TestFilesPaths.kompaktCheckDeviceType),
|
||||
toRelativePath(TestFilesPaths.kompaktRestoreModalCheck),
|
||||
toRelativePath(TestFilesPaths.kompaktRestoreFailedModalCheck),
|
||||
],
|
||||
},
|
||||
// Patterns to exclude.
|
||||
|
||||
Binary file not shown.
4
apps/mudita-center/package-lock.json
generated
4
apps/mudita-center/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@mudita/mudita-center-app",
|
||||
"version": "3.1.0",
|
||||
"version": "3.2.0-rc.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@mudita/mudita-center-app",
|
||||
"version": "3.1.0",
|
||||
"version": "3.2.0-rc.1",
|
||||
"license": "GPL-3.0",
|
||||
"dependencies": {
|
||||
"serialport": "10.1.0"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mudita-center",
|
||||
"version": "3.1.0",
|
||||
"version": "3.2.0",
|
||||
"description": "Mudita Center",
|
||||
"main": "./dist/main.js",
|
||||
"productName": "Mudita Center",
|
||||
@@ -74,7 +74,7 @@
|
||||
"linux": {
|
||||
"target": "AppImage",
|
||||
"category": "Utility",
|
||||
"executableName": "Mudita Center",
|
||||
"executableName": "mudita-center",
|
||||
"artifactName": "Mudita-Center.${ext}"
|
||||
},
|
||||
"appImage": {
|
||||
|
||||
Binary file not shown.
@@ -10,6 +10,8 @@ import {
|
||||
BrowserWindow,
|
||||
BrowserWindowConstructorOptions,
|
||||
shell,
|
||||
protocol,
|
||||
net,
|
||||
} from "electron"
|
||||
import { ipcMain } from "electron-better-ipc"
|
||||
import * as path from "path"
|
||||
@@ -77,6 +79,8 @@ import {
|
||||
registerShortcuts,
|
||||
} from "shared/utils"
|
||||
import { mockServiceEnabled, startServer, stopServer } from "e2e-mock-server"
|
||||
import getAppPath from "Core/__deprecated__/main/utils/get-app-path"
|
||||
import fs from "fs-extra"
|
||||
|
||||
// AUTO DISABLED - fix me if you like :)
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
|
||||
@@ -248,6 +252,33 @@ const createWindow = async () => {
|
||||
if (!gotTheLock) {
|
||||
app.quit()
|
||||
} else {
|
||||
protocol.registerSchemesAsPrivileged([
|
||||
{
|
||||
scheme: "safe-file",
|
||||
privileges: {
|
||||
standard: true,
|
||||
secure: true,
|
||||
supportFetchAPI: true,
|
||||
bypassCSP: true,
|
||||
},
|
||||
},
|
||||
])
|
||||
|
||||
app.whenReady().then(() => {
|
||||
protocol.handle("safe-file", async (request) => {
|
||||
const fileUrl = request.url.replace("safe-file://", "file:///")
|
||||
if (
|
||||
!fileUrl
|
||||
.toLowerCase()
|
||||
.startsWith(`file://${encodeURI(getAppPath())}`.toLowerCase())
|
||||
) {
|
||||
throw new Error(
|
||||
"Access to files outside of the userData directory is not allowed."
|
||||
)
|
||||
}
|
||||
return net.fetch(fileUrl)
|
||||
})
|
||||
})
|
||||
// AUTO DISABLED - fix me if you like :)
|
||||
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||
app.on("ready", createWindow)
|
||||
@@ -262,7 +293,8 @@ if (!gotTheLock) {
|
||||
stopServer()
|
||||
})
|
||||
|
||||
app.on("window-all-closed", () => {
|
||||
app.on("window-all-closed", async () => {
|
||||
await fs.remove(getAppPath("file-preview"))
|
||||
app.quit()
|
||||
})
|
||||
|
||||
@@ -553,3 +585,7 @@ ipcMain.answerRenderer(
|
||||
ipcMain.answerRenderer(OutlookAuthActions.CloseWindow, () => {
|
||||
outlookAuthWindow?.close()
|
||||
})
|
||||
|
||||
ipcMain.answerRenderer("get-downloads-path", async () => {
|
||||
return app.getPath("downloads")
|
||||
})
|
||||
|
||||
253
libs/api-devices-testing/src/lib/entities-contacts.spec.tsx
Normal file
253
libs/api-devices-testing/src/lib/entities-contacts.spec.tsx
Normal file
@@ -0,0 +1,253 @@
|
||||
/**
|
||||
* Copyright (c) Mudita sp. z o.o. All rights reserved.
|
||||
* For licensing, see https://github.com/mudita/mudita-center/blob/master/LICENSE.md
|
||||
*/
|
||||
|
||||
import { DeviceProtocol } from "device-protocol/feature"
|
||||
import { setKompaktConnection } from "./helpers/set-connection"
|
||||
import { setActiveDevice } from "./helpers/protocol-validator"
|
||||
import { APIEntitiesService, ServiceBridge } from "device/feature"
|
||||
import { EntitiesDeleteResponse, EntityData } from "device/models"
|
||||
|
||||
import {
|
||||
contactsSeedData,
|
||||
contactFullData1,
|
||||
contactWithFirstNameOnly,
|
||||
contactFullData2,
|
||||
} from "../../../generic-view/feature/src/lib/seed-data/contacts-seed-data"
|
||||
import { clearContact } from "./helpers/clear-contact-data"
|
||||
import { exec } from "child_process"
|
||||
import util from "util"
|
||||
export const execPromise = util.promisify(exec)
|
||||
|
||||
jest.mock("shared/utils", () => {
|
||||
return {
|
||||
callRenderer: () => {},
|
||||
delay: () => {
|
||||
return new Promise((resolve) => setTimeout(resolve, 500))
|
||||
},
|
||||
}
|
||||
})
|
||||
jest.mock("Core/device-manager/services/usb-devices/usb-devices.helper", () => {
|
||||
return { getUsbDevices: () => {} }
|
||||
})
|
||||
jest.mock("electron-better-ipc", () => {
|
||||
return {
|
||||
ipcMain: {
|
||||
emit: () => {},
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
describe("Contact entities", () => {
|
||||
let deviceProtocol: DeviceProtocol
|
||||
|
||||
beforeAll(async () => {
|
||||
deviceProtocol = setActiveDevice(await setKompaktConnection())
|
||||
await deviceProtocol.activeDevice?.disconnect()
|
||||
}, 10000)
|
||||
|
||||
beforeEach(async () => {
|
||||
await clearContactsDatabase()
|
||||
deviceProtocol = setActiveDevice(await setKompaktConnection())
|
||||
})
|
||||
|
||||
afterEach(async () => {
|
||||
await deviceProtocol.activeDevice?.disconnect()
|
||||
}, 10000)
|
||||
|
||||
it("should remove contact entity with valid entityId", async () => {
|
||||
const service = new APIEntitiesService(deviceProtocol, new ServiceBridge())
|
||||
|
||||
const id = await createContact(service, contactFullData1)
|
||||
|
||||
expect(id).toBeDefined()
|
||||
|
||||
if (id === undefined) {
|
||||
return
|
||||
}
|
||||
|
||||
const removeEntitiesResult = await service.deleteEntitiesData({
|
||||
entitiesType: "contacts",
|
||||
ids: [id],
|
||||
})
|
||||
|
||||
expect(removeEntitiesResult.ok).toBeTruthy()
|
||||
})
|
||||
|
||||
it("should return success with failedIds while removing valid and invalid contacts entityIds in one request", async () => {
|
||||
const service = new APIEntitiesService(deviceProtocol, new ServiceBridge())
|
||||
|
||||
const id = await createContact(service, contactFullData1)
|
||||
|
||||
expect(id).toBeDefined()
|
||||
|
||||
const removeEntitiesResult = await service.deleteEntitiesData({
|
||||
entitiesType: "contacts",
|
||||
ids: [id!, "0", "-1"],
|
||||
})
|
||||
|
||||
expect(removeEntitiesResult.ok).toBeTruthy()
|
||||
|
||||
const data = removeEntitiesResult.data as EntitiesDeleteResponse
|
||||
expect(data?.failedIds[0]).toBe("0")
|
||||
expect(data?.failedIds[1]).toBe("-1")
|
||||
})
|
||||
|
||||
it("should return error with incorrect-response type for invalid contacts entityIds", async () => {
|
||||
const service = new APIEntitiesService(deviceProtocol, new ServiceBridge())
|
||||
const removeEntitiesResult = await service.deleteEntitiesData({
|
||||
entitiesType: "contacts",
|
||||
ids: ["0", "-1"],
|
||||
})
|
||||
|
||||
expect(removeEntitiesResult.ok).toBeFalsy()
|
||||
expect(removeEntitiesResult.error?.type).toBe("incorrect-response")
|
||||
})
|
||||
|
||||
it("should correctly add contacts with complete and varied fields", async () => {
|
||||
const service = new APIEntitiesService(deviceProtocol, new ServiceBridge())
|
||||
|
||||
for (const contact of contactsSeedData) {
|
||||
const id = await createContact(service, contact)
|
||||
|
||||
expect(id).toBeDefined()
|
||||
|
||||
if (id === undefined) {
|
||||
return
|
||||
}
|
||||
|
||||
const contactResponse = await service.getEntitiesData({
|
||||
entitiesType: "contacts",
|
||||
responseType: "json",
|
||||
entityId: id,
|
||||
})
|
||||
|
||||
expect(contactResponse).toBeDefined()
|
||||
if (!contactResponse.ok == undefined) {
|
||||
return
|
||||
}
|
||||
const entityData = contactResponse.data as { data: EntityData }
|
||||
expect(clearContact(entityData.data)).toEqual(clearContact(contact))
|
||||
}
|
||||
}, 120000)
|
||||
|
||||
it("should correctly update contacts with complete and varied fields", async () => {
|
||||
const service = new APIEntitiesService(deviceProtocol, new ServiceBridge())
|
||||
|
||||
const id = await createContact(service, contactFullData2)
|
||||
expect(id).toBeDefined()
|
||||
|
||||
for (const contact of contactsSeedData) {
|
||||
if (id === undefined) {
|
||||
return
|
||||
}
|
||||
|
||||
const updateContactId = await editContact(service, id, contact)
|
||||
expect(updateContactId).toBe(id)
|
||||
|
||||
if (updateContactId === undefined) {
|
||||
return
|
||||
}
|
||||
|
||||
const updatedContactResponse = await service.getEntitiesData({
|
||||
entitiesType: "contacts",
|
||||
responseType: "json",
|
||||
entityId: id,
|
||||
})
|
||||
|
||||
expect(updatedContactResponse).toBeDefined()
|
||||
if (!updatedContactResponse.ok == undefined) {
|
||||
return
|
||||
}
|
||||
const updatedEntityData = updatedContactResponse.data as {
|
||||
data: EntityData
|
||||
}
|
||||
expect(clearContact(updatedEntityData.data)).toEqual(
|
||||
clearContact(contact)
|
||||
)
|
||||
}
|
||||
}, 120000)
|
||||
|
||||
it("should clear all contact fields except first name when only first name is provided", async () => {
|
||||
const service = new APIEntitiesService(deviceProtocol, new ServiceBridge())
|
||||
|
||||
const id = await createContact(service, contactFullData2)
|
||||
|
||||
expect(id).toBeDefined()
|
||||
|
||||
if (id === undefined) {
|
||||
return
|
||||
}
|
||||
|
||||
const updateContactId = await editContact(
|
||||
service,
|
||||
id,
|
||||
contactWithFirstNameOnly
|
||||
)
|
||||
expect(updateContactId).toBe(id)
|
||||
|
||||
if (updateContactId === undefined) {
|
||||
return
|
||||
}
|
||||
|
||||
const updatedContactResponse = await service.getEntitiesData({
|
||||
entitiesType: "contacts",
|
||||
responseType: "json",
|
||||
entityId: id,
|
||||
})
|
||||
|
||||
expect(updatedContactResponse).toBeDefined()
|
||||
if (!updatedContactResponse.ok == undefined) {
|
||||
return
|
||||
}
|
||||
const updatedEntityData = updatedContactResponse.data as {
|
||||
data: EntityData
|
||||
}
|
||||
expect(clearContact(updatedEntityData.data)).toEqual(
|
||||
clearContact(contactWithFirstNameOnly)
|
||||
)
|
||||
})
|
||||
|
||||
async function createContact(
|
||||
entitiesService: APIEntitiesService,
|
||||
data: EntityData
|
||||
): Promise<string | undefined> {
|
||||
const createEntityResult = await entitiesService.createEntityData({
|
||||
entitiesType: "contacts",
|
||||
data: data,
|
||||
})
|
||||
|
||||
if (createEntityResult.ok && createEntityResult.data) {
|
||||
const id = createEntityResult.data.data.contactId
|
||||
return id as string
|
||||
}
|
||||
return undefined
|
||||
}
|
||||
|
||||
async function editContact(
|
||||
entitiesService: APIEntitiesService,
|
||||
entityId: string,
|
||||
data: EntityData
|
||||
): Promise<string | undefined> {
|
||||
const updateEntityResult = await entitiesService.updateEntityData({
|
||||
entitiesType: "contacts",
|
||||
entityId,
|
||||
data,
|
||||
})
|
||||
if (updateEntityResult.ok && updateEntityResult.data) {
|
||||
const id = updateEntityResult.data.data.contactId
|
||||
return id as string
|
||||
}
|
||||
return undefined
|
||||
}
|
||||
|
||||
const clearContactsDatabase = async (): Promise<void> => {
|
||||
try {
|
||||
const command = `adb shell pm clear com.android.providers.contacts`
|
||||
await execPromise(command)
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -11,14 +11,8 @@ import {
|
||||
APIEntitiesService,
|
||||
ServiceBridge,
|
||||
} from "device/feature"
|
||||
import {
|
||||
ApiConfig,
|
||||
EntitiesDeleteResponse,
|
||||
EntitiesFileData,
|
||||
EntityData,
|
||||
} from "device/models"
|
||||
import { ApiConfig, EntitiesFileData } from "device/models"
|
||||
import { ResponseStatus } from "Core/device"
|
||||
import { contactsSeedData } from "../../../generic-view/feature/src/lib/seed-data/contacts-seed-data"
|
||||
|
||||
jest.mock("shared/utils", () => {
|
||||
return {
|
||||
@@ -142,69 +136,4 @@ describe("Entities configuration, metadata and data", () => {
|
||||
expect(status).toBe(ResponseStatus.Ok)
|
||||
}
|
||||
}, 30_000)
|
||||
|
||||
it("should remove contact entity with valid entityId", async () => {
|
||||
const service = new APIEntitiesService(deviceProtocol, new ServiceBridge())
|
||||
|
||||
const id = await createContact(service, contactsSeedData[0])
|
||||
|
||||
expect(id).toBeDefined()
|
||||
|
||||
if (id === undefined) {
|
||||
return
|
||||
}
|
||||
|
||||
const removeEntitiesResult = await service.deleteEntitiesData({
|
||||
entitiesType: "contacts",
|
||||
ids: [id],
|
||||
})
|
||||
|
||||
expect(removeEntitiesResult.ok).toBeTruthy()
|
||||
})
|
||||
|
||||
it("should return success with failedIds while removing valid and invalid contacts entityIds in one request", async () => {
|
||||
const service = new APIEntitiesService(deviceProtocol, new ServiceBridge())
|
||||
|
||||
const id = await createContact(service, contactsSeedData[0])
|
||||
|
||||
expect(id).toBeDefined()
|
||||
|
||||
const removeEntitiesResult = await service.deleteEntitiesData({
|
||||
entitiesType: "contacts",
|
||||
ids: [id!, "0", "-1"],
|
||||
})
|
||||
|
||||
expect(removeEntitiesResult.ok).toBeTruthy()
|
||||
|
||||
const data = removeEntitiesResult.data as EntitiesDeleteResponse
|
||||
expect(data?.failedIds[0]).toBe("0")
|
||||
expect(data?.failedIds[1]).toBe("-1")
|
||||
})
|
||||
|
||||
it("should return error with incorrect-response type for invalid contacts entityIds", async () => {
|
||||
const service = new APIEntitiesService(deviceProtocol, new ServiceBridge())
|
||||
const removeEntitiesResult = await service.deleteEntitiesData({
|
||||
entitiesType: "contacts",
|
||||
ids: ["0", "-1"],
|
||||
})
|
||||
|
||||
expect(removeEntitiesResult.ok).toBeFalsy()
|
||||
expect(removeEntitiesResult.error?.type).toBe("incorrect-response")
|
||||
})
|
||||
|
||||
async function createContact(
|
||||
entitiesService: APIEntitiesService,
|
||||
data: EntityData
|
||||
): Promise<string | undefined> {
|
||||
const createEntityResult = await entitiesService.createEntityData({
|
||||
entitiesType: "contacts",
|
||||
data: contactsSeedData[0],
|
||||
})
|
||||
|
||||
if (createEntityResult.ok && createEntityResult.data) {
|
||||
const id = createEntityResult.data.data.contactId
|
||||
return id as string
|
||||
}
|
||||
return undefined
|
||||
}
|
||||
})
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
/**
|
||||
* Copyright (c) Mudita sp. z o.o. All rights reserved.
|
||||
* For licensing, see https://github.com/mudita/mudita-center/blob/master/LICENSE.md
|
||||
*/
|
||||
|
||||
import { EntityData } from "device/models"
|
||||
|
||||
export function clearContact(entityData: EntityData): TestContact {
|
||||
const contact = entityData as unknown as TestContact
|
||||
|
||||
const cleanString = (value: unknown): string | undefined =>
|
||||
typeof value === "string" && value.trim() !== "" ? value : undefined
|
||||
|
||||
return {
|
||||
address: cleanString(contact.address),
|
||||
company: cleanString(contact.company),
|
||||
department: cleanString(contact.department),
|
||||
emailAddresses: contact.emailAddresses
|
||||
?.slice()
|
||||
.sort((a, b) => a.emailAddress.localeCompare(b.emailAddress))
|
||||
.map((email) => ({
|
||||
emailAddress: email.emailAddress,
|
||||
emailType: normalizeType(email.emailType),
|
||||
})),
|
||||
entityType: cleanString(contact.entityType),
|
||||
firstName: cleanString(contact.firstName),
|
||||
lastName: cleanString(contact.lastName),
|
||||
middleName: cleanString(contact.middleName),
|
||||
namePrefix: cleanString(contact.namePrefix),
|
||||
nameSuffix: cleanString(contact.nameSuffix),
|
||||
notes: cleanString(contact.notes),
|
||||
phoneNumbers: contact.phoneNumbers
|
||||
?.slice()
|
||||
.sort((a, b) => a.phoneNumber.localeCompare(b.phoneNumber))
|
||||
?.map((phone) => ({
|
||||
phoneNumber: phone.phoneNumber,
|
||||
phoneType: normalizeType(phone.phoneType),
|
||||
})),
|
||||
website: cleanString(contact.website),
|
||||
workTitle: cleanString(contact.workTitle),
|
||||
}
|
||||
}
|
||||
|
||||
interface TestContact {
|
||||
address?: string
|
||||
company?: string
|
||||
department?: string
|
||||
emailAddresses?: {
|
||||
emailAddress: string
|
||||
emailType: string
|
||||
}[]
|
||||
entityType?: string
|
||||
firstName?: string
|
||||
lastName?: string
|
||||
middleName?: string
|
||||
namePrefix?: string
|
||||
nameSuffix?: string
|
||||
notes?: string
|
||||
phoneNumbers?: {
|
||||
phoneNumber: string
|
||||
phoneType: string
|
||||
}[]
|
||||
website?: string
|
||||
workTitle?: string
|
||||
}
|
||||
|
||||
function normalizeType(type: string): "HOME" | "WORK" | "OTHER" {
|
||||
const allowedTypes = ["HOME", "WORK", "OTHER"]
|
||||
return allowedTypes.includes(type as string)
|
||||
? (type as "HOME" | "WORK" | "OTHER")
|
||||
: "OTHER"
|
||||
}
|
||||
109
libs/api-devices-testing/src/lib/menu-configuration.spec.tsx
Normal file
109
libs/api-devices-testing/src/lib/menu-configuration.spec.tsx
Normal file
@@ -0,0 +1,109 @@
|
||||
/**
|
||||
* Copyright (c) Mudita sp. z o.o. All rights reserved.
|
||||
* For licensing, see https://github.com/mudita/mudita-center/blob/master/LICENSE.md
|
||||
*/
|
||||
|
||||
import { DeviceProtocol } from "device-protocol/feature"
|
||||
import { setKompaktConnection } from "./helpers/set-connection"
|
||||
import { getApiFeaturesAndEntityTypes } from "./helpers/api-configuration-data"
|
||||
import { APIMenuService } from "device/feature"
|
||||
import { setActiveDevice } from "./helpers/protocol-validator"
|
||||
|
||||
jest.mock("shared/utils", () => {
|
||||
return { callRenderer: () => {} }
|
||||
})
|
||||
jest.mock("Core/device-manager/services/usb-devices/usb-devices.helper", () => {
|
||||
return { getUsbDevices: () => {} }
|
||||
})
|
||||
jest.mock("electron-better-ipc", () => {
|
||||
return {
|
||||
ipcMain: {
|
||||
emit: () => {},
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
let deviceProtocol: DeviceProtocol
|
||||
let featuresAndEntityTypes: { features: string[]; entityTypes: string[] }
|
||||
|
||||
describe("API configuration", () => {
|
||||
beforeAll(async () => {
|
||||
deviceProtocol = setActiveDevice(await setKompaktConnection())
|
||||
featuresAndEntityTypes = await getApiFeaturesAndEntityTypes(deviceProtocol)
|
||||
await deviceProtocol.activeDevice?.disconnect()
|
||||
})
|
||||
|
||||
beforeEach(async () => {
|
||||
deviceProtocol = setActiveDevice(await setKompaktConnection())
|
||||
})
|
||||
|
||||
afterEach(async () => {
|
||||
await deviceProtocol.activeDevice?.disconnect()
|
||||
}, 10000)
|
||||
|
||||
it("should receive API menu configuration", async () => {
|
||||
const service = new APIMenuService(deviceProtocol)
|
||||
const response = await service.getMenuConfig()
|
||||
|
||||
expect(response.ok).toBeTruthy()
|
||||
if (!response.ok) {
|
||||
return
|
||||
}
|
||||
|
||||
const allFeatures = response.data.menuItems.flatMap((item) => {
|
||||
const sub = item.submenu || []
|
||||
return [item, ...sub].map((entry) => entry.feature)
|
||||
})
|
||||
|
||||
featuresAndEntityTypes.features.forEach((feature) => {
|
||||
expect(allFeatures).toContain(feature)
|
||||
})
|
||||
|
||||
expect(response.data.title).toBe("Kompakt")
|
||||
const mcOverviewMenuItem = response.data.menuItems.find(
|
||||
(item) => item.feature == "mc-overview"
|
||||
)
|
||||
const mcContactsMenuItem = response.data.menuItems.find(
|
||||
(item) => item.feature == "mc-contacts"
|
||||
)
|
||||
const mcDataMigrationMenuItem = response.data.menuItems.find(
|
||||
(item) => item.feature == "mc-data-migration"
|
||||
)
|
||||
const mcFileManagerInternalMenuItem = response.data.menuItems.find(
|
||||
(item) => item.feature == "mc-file-manager-internal"
|
||||
)
|
||||
expect(mcOverviewMenuItem?.displayName).toBe("Overview")
|
||||
expect(mcOverviewMenuItem?.feature).toBe("mc-overview")
|
||||
expect(mcOverviewMenuItem?.icon).toBe("overview")
|
||||
|
||||
expect(mcContactsMenuItem?.displayName).toBe("Contacts")
|
||||
expect(mcContactsMenuItem?.feature).toBe("mc-contacts")
|
||||
expect(mcContactsMenuItem?.icon).toBe("contacts-book")
|
||||
|
||||
expect(mcDataMigrationMenuItem?.displayName).toBe("Data Migration")
|
||||
expect(mcDataMigrationMenuItem?.feature).toBe("mc-data-migration")
|
||||
expect(mcDataMigrationMenuItem?.icon).toBe("data-migration")
|
||||
|
||||
expect(mcFileManagerInternalMenuItem?.displayName).toBe("Manage Files")
|
||||
expect(mcFileManagerInternalMenuItem?.feature).toBe(
|
||||
"mc-file-manager-internal"
|
||||
)
|
||||
expect(mcFileManagerInternalMenuItem?.icon).toBe("file-manager")
|
||||
|
||||
if (featuresAndEntityTypes.features.includes("mc-file-manager-external")) {
|
||||
expect(mcFileManagerInternalMenuItem?.submenu).toBeDefined()
|
||||
expect(
|
||||
mcFileManagerInternalMenuItem?.submenu?.length
|
||||
).toBeGreaterThanOrEqual(2)
|
||||
if (mcFileManagerInternalMenuItem === undefined) {
|
||||
return
|
||||
}
|
||||
const submenuInternalMenuItem = mcFileManagerInternalMenuItem.submenu![0]
|
||||
const submenuExternalMenuItem = mcFileManagerInternalMenuItem.submenu![1]
|
||||
expect(submenuInternalMenuItem?.displayName).toBe("Phone storage")
|
||||
expect(submenuInternalMenuItem?.feature).toBe("mc-file-manager-internal")
|
||||
expect(submenuExternalMenuItem?.displayName).toBe("SD card")
|
||||
expect(submenuExternalMenuItem?.feature).toBe("mc-file-manager-external")
|
||||
}
|
||||
})
|
||||
})
|
||||
77
libs/api-devices-testing/src/lib/serial-connection.spec.tsx
Normal file
77
libs/api-devices-testing/src/lib/serial-connection.spec.tsx
Normal file
@@ -0,0 +1,77 @@
|
||||
/**
|
||||
* Copyright (c) Mudita sp. z o.o. All rights reserved.
|
||||
* For licensing, see https://github.com/mudita/mudita-center/blob/master/LICENSE.md
|
||||
*/
|
||||
|
||||
import { DeviceProtocol } from "device-protocol/feature"
|
||||
import { setKompaktConnection } from "./helpers/set-connection"
|
||||
import { ApiTestToolsService } from "device/feature"
|
||||
import { setActiveDevice } from "./helpers/protocol-validator"
|
||||
|
||||
jest.mock("shared/utils", () => {
|
||||
return {
|
||||
callRenderer: () => {},
|
||||
delay: () => {
|
||||
return new Promise((resolve) => setTimeout(resolve, 500))
|
||||
},
|
||||
}
|
||||
})
|
||||
jest.mock("Core/device-manager/services/usb-devices/usb-devices.helper", () => {
|
||||
return { getUsbDevices: () => {} }
|
||||
})
|
||||
jest.mock("electron-better-ipc", () => {
|
||||
return {
|
||||
ipcMain: {
|
||||
emit: () => {},
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
describe("Serial port test", () => {
|
||||
const SERIAL_PORT_DATA_SIZE = 14336
|
||||
const SERIAL_PORT_REQUEST_COUNTER = 100
|
||||
let deviceProtocol: DeviceProtocol
|
||||
|
||||
beforeAll(async () => {
|
||||
deviceProtocol = setActiveDevice(await setKompaktConnection())
|
||||
await deviceProtocol.activeDevice?.disconnect()
|
||||
}, 10000)
|
||||
|
||||
beforeEach(async () => {
|
||||
deviceProtocol = setActiveDevice(await setKompaktConnection())
|
||||
})
|
||||
|
||||
afterEach(async () => {
|
||||
await deviceProtocol.activeDevice?.disconnect()
|
||||
}, 10000)
|
||||
|
||||
it(`should send data via serial port and return the same data ${SERIAL_PORT_REQUEST_COUNTER} times`, async () => {
|
||||
for (let i = 1; i <= SERIAL_PORT_REQUEST_COUNTER; i++) {
|
||||
const sampleData = generateRandomAsciiString(SERIAL_PORT_DATA_SIZE)
|
||||
const service = new ApiTestToolsService(deviceProtocol)
|
||||
const response = await service.sendTestData({ data: sampleData })
|
||||
|
||||
expect(response.ok).toBeTruthy()
|
||||
if (!response.ok) {
|
||||
return
|
||||
}
|
||||
|
||||
expect(response.data.data).toBe(sampleData)
|
||||
expect(response.data.bytesCount).toEqual(sampleData.length)
|
||||
}
|
||||
}, 60000)
|
||||
})
|
||||
|
||||
function generateRandomAsciiString(length: number): string {
|
||||
const maxChunkSize = 65536
|
||||
const bytes = new Uint8Array(length)
|
||||
for (let offset = 0; offset < length; offset += maxChunkSize) {
|
||||
const chunkSize = Math.min(maxChunkSize, length - offset)
|
||||
const chunk = new Uint8Array(chunkSize)
|
||||
crypto.getRandomValues(chunk)
|
||||
bytes.set(chunk, offset)
|
||||
}
|
||||
|
||||
const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
|
||||
return Array.from(bytes, (byte) => chars[byte % chars.length]).join("")
|
||||
}
|
||||
@@ -6,7 +6,10 @@
|
||||
import yargs from "yargs"
|
||||
import { hideBin } from "yargs/helpers"
|
||||
import { AppMtp } from "../app-mtp"
|
||||
import { UploadTransactionData, MtpUploadFileData } from "../app-mtp.interface"
|
||||
import {
|
||||
TransferTransactionData,
|
||||
MtpTransferFileData,
|
||||
} from "../app-mtp.interface"
|
||||
import * as dotenv from "dotenv"
|
||||
import { DotnetCliCommandAction } from "../dotnet-mtp/dotnet-mtp.interface"
|
||||
|
||||
@@ -48,7 +51,7 @@ const handleAction = (action: DotnetCliCommandAction, parsedData: unknown) => {
|
||||
|
||||
case DotnetCliCommandAction.UPLOAD_FILE:
|
||||
appMtp
|
||||
.uploadFile(parsedData as MtpUploadFileData)
|
||||
.uploadFile(parsedData as MtpTransferFileData)
|
||||
.then(() => {
|
||||
console.log("[app-mtp-cli] output: File uploaded successfully.")
|
||||
})
|
||||
@@ -59,7 +62,7 @@ const handleAction = (action: DotnetCliCommandAction, parsedData: unknown) => {
|
||||
|
||||
case DotnetCliCommandAction.GET_UPLOAD_FILE_PROGRESS:
|
||||
appMtp
|
||||
.getUploadFileProgress(parsedData as UploadTransactionData)
|
||||
.getTransferredFileProgress(parsedData as TransferTransactionData)
|
||||
.then((progress) => {
|
||||
console.log("[app-mtp-cli] output:", progress)
|
||||
})
|
||||
|
||||
@@ -36,14 +36,20 @@ router.post("/upload-file", (req: Request, res: Response) => {
|
||||
})
|
||||
})
|
||||
|
||||
router.get("/upload-file-progress", (req: Request, res: Response) => {
|
||||
appMtp.getUploadFileProgress(req.body).then((result) => {
|
||||
router.post("/export-file", (req: Request, res: Response) => {
|
||||
appMtp.exportFile(req.body).then((result) => {
|
||||
res.json(result)
|
||||
})
|
||||
})
|
||||
|
||||
router.get("/cancel-upload", (req: Request, res: Response) => {
|
||||
appMtp.cancelUpload(req.body).then((result) => {
|
||||
router.get("/transferred-file-progress", (req: Request, res: Response) => {
|
||||
appMtp.getTransferredFileProgress(req.body).then((result) => {
|
||||
res.json(result)
|
||||
})
|
||||
})
|
||||
|
||||
router.get("/cancel-file-transfer", (req: Request, res: Response) => {
|
||||
appMtp.cancelFileTransfer(req.body).then((result) => {
|
||||
res.json(result)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -38,28 +38,29 @@ export enum MTPError {
|
||||
MTP_CANCEL_FAILED_ALREADY_TRANSFERRED = "MTP_CANCEL_FAILED_ALREADY_TRANSFERRED",
|
||||
}
|
||||
|
||||
export interface MtpUploadFileData {
|
||||
export interface MtpTransferFileData {
|
||||
deviceId: string // on Mac and Linux: Kompakt serial number; on Windows: PID
|
||||
storageId: string
|
||||
destinationPath: string
|
||||
sourcePath: string
|
||||
action?: string
|
||||
}
|
||||
|
||||
export interface UploadFileResultData {
|
||||
export interface TransferFileResultData {
|
||||
transactionId: string
|
||||
}
|
||||
|
||||
export interface UploadTransactionData {
|
||||
export interface TransferTransactionData {
|
||||
transactionId: string
|
||||
}
|
||||
|
||||
export interface GetUploadFileProgressResultData {
|
||||
export interface GetTransferFileProgressResultData {
|
||||
progress: number
|
||||
}
|
||||
|
||||
export interface CancelUploadFileResultData {}
|
||||
export interface TransferUploadFileResultData {}
|
||||
|
||||
export interface CancelUploadResultData {}
|
||||
export interface CancelTransferResultData {}
|
||||
|
||||
export interface MtpInterface {
|
||||
getDevices(): Promise<MtpDevice[]>
|
||||
@@ -67,14 +68,18 @@ export interface MtpInterface {
|
||||
getDeviceStorages(deviceId: string): Promise<ResultObject<MtpStorage[]>>
|
||||
|
||||
uploadFile(
|
||||
data: MtpUploadFileData
|
||||
): Promise<ResultObject<UploadFileResultData>>
|
||||
data: MtpTransferFileData
|
||||
): Promise<ResultObject<TransferFileResultData>>
|
||||
|
||||
getUploadFileProgress(
|
||||
data: UploadTransactionData
|
||||
): Promise<ResultObject<GetUploadFileProgressResultData>>
|
||||
exportFile(
|
||||
data: MtpTransferFileData
|
||||
): Promise<ResultObject<TransferFileResultData>>
|
||||
|
||||
cancelUpload(
|
||||
data: UploadTransactionData
|
||||
): Promise<ResultObject<CancelUploadResultData>>
|
||||
getTransferredFileProgress(
|
||||
data: TransferTransactionData
|
||||
): Promise<ResultObject<GetTransferFileProgressResultData>>
|
||||
|
||||
cancelFileTransfer(
|
||||
data: TransferTransactionData
|
||||
): Promise<ResultObject<CancelTransferResultData>>
|
||||
}
|
||||
|
||||
@@ -4,14 +4,14 @@
|
||||
*/
|
||||
|
||||
import {
|
||||
CancelUploadResultData,
|
||||
UploadTransactionData,
|
||||
GetUploadFileProgressResultData,
|
||||
CancelTransferResultData,
|
||||
TransferTransactionData,
|
||||
GetTransferFileProgressResultData,
|
||||
MtpDevice,
|
||||
MtpInterface,
|
||||
MtpStorage,
|
||||
MtpUploadFileData,
|
||||
UploadFileResultData,
|
||||
MtpTransferFileData,
|
||||
TransferFileResultData,
|
||||
} from "./app-mtp.interface"
|
||||
import { MtpFactory } from "./app-mtp.factory"
|
||||
import { ResultObject } from "../../../core/core/builder/result.builder"
|
||||
@@ -42,8 +42,8 @@ export class AppMtp implements MtpInterface {
|
||||
}
|
||||
|
||||
async uploadFile(
|
||||
data: MtpUploadFileData
|
||||
): Promise<ResultObject<UploadFileResultData>> {
|
||||
data: MtpTransferFileData
|
||||
): Promise<ResultObject<TransferFileResultData>> {
|
||||
console.log(
|
||||
`[app-mtp] starting upload file process for data: ${JSON.stringify(data)}`
|
||||
)
|
||||
@@ -54,25 +54,40 @@ export class AppMtp implements MtpInterface {
|
||||
return result
|
||||
}
|
||||
|
||||
async getUploadFileProgress(
|
||||
data: UploadTransactionData
|
||||
): Promise<ResultObject<GetUploadFileProgressResultData>> {
|
||||
async exportFile(
|
||||
data: MtpTransferFileData
|
||||
): Promise<ResultObject<TransferFileResultData>> {
|
||||
console.log(
|
||||
`[app-mtp] getting upload file progress for transaction: ${data.transactionId}`
|
||||
`[app-mtp] starting export file process for data: ${JSON.stringify(data)}`
|
||||
)
|
||||
const result = await this.mtp.getUploadFileProgress(data)
|
||||
const result = await this.mtp.exportFile(data)
|
||||
console.log(
|
||||
`[app-mtp] starting export file process result: ${JSON.stringify(result)}`
|
||||
)
|
||||
return result
|
||||
}
|
||||
|
||||
async getTransferredFileProgress(
|
||||
data: TransferTransactionData
|
||||
): Promise<ResultObject<GetTransferFileProgressResultData>> {
|
||||
console.log(
|
||||
`[app-mtp] getting file transfer progress for transaction: ${data.transactionId}`
|
||||
)
|
||||
const result = await this.mtp.getTransferredFileProgress(data)
|
||||
|
||||
console.log(
|
||||
`[app-mtp] getting upload file progress result: ${JSON.stringify(result)}`
|
||||
`[app-mtp] getting file transfer progress result: ${JSON.stringify(
|
||||
result
|
||||
)}`
|
||||
)
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
async cancelUpload(
|
||||
data: UploadTransactionData
|
||||
): Promise<ResultObject<CancelUploadResultData>> {
|
||||
const result = await this.mtp.cancelUpload(data)
|
||||
async cancelFileTransfer(
|
||||
data: TransferTransactionData
|
||||
): Promise<ResultObject<CancelTransferResultData>> {
|
||||
const result = await this.mtp.cancelFileTransfer(data)
|
||||
console.log(`[app-mtp] canceling status: ${JSON.stringify(result)}`)
|
||||
return result
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ export enum DotnetCliCommandAction {
|
||||
GET_DEVICES = "GET_DEVICES",
|
||||
GET_DEVICE_STORAGES = "GET_DEVICE_STORAGES",
|
||||
UPLOAD_FILE = "UPLOAD_FILE",
|
||||
EXPORT_FILE = "EXPORT_FILE",
|
||||
GET_UPLOAD_FILE_PROGRESS = "GET_UPLOAD_FILE_PROGRESS",
|
||||
}
|
||||
|
||||
|
||||
@@ -4,16 +4,16 @@
|
||||
*/
|
||||
|
||||
import {
|
||||
CancelUploadResultData,
|
||||
UploadTransactionData,
|
||||
GetUploadFileProgressResultData,
|
||||
CancelTransferResultData,
|
||||
TransferTransactionData,
|
||||
GetTransferFileProgressResultData,
|
||||
MtpDevice,
|
||||
MTPError,
|
||||
MtpInterface,
|
||||
MtpStorage,
|
||||
MtpUploadFileData,
|
||||
MtpTransferFileData,
|
||||
TransactionStatus,
|
||||
UploadFileResultData,
|
||||
TransferFileResultData,
|
||||
} from "../app-mtp.interface"
|
||||
import { generateId } from "../utils/generate-id"
|
||||
import {
|
||||
@@ -28,7 +28,7 @@ import { runCommand } from "./utils/handle-command"
|
||||
const PREFIX_LOG = `[app-mtp/dotnet-mtp]`
|
||||
|
||||
export class DotnetMtp implements MtpInterface {
|
||||
private uploadFileTransactionStatus: Record<string, TransactionStatus> = {}
|
||||
private fileTransferTransactionStatus: Record<string, TransactionStatus> = {}
|
||||
private abortController: AbortController | undefined
|
||||
|
||||
async getDevices(): Promise<MtpDevice[]> {
|
||||
@@ -102,19 +102,35 @@ export class DotnetMtp implements MtpInterface {
|
||||
}
|
||||
|
||||
async uploadFile(
|
||||
data: MtpUploadFileData
|
||||
): Promise<ResultObject<UploadFileResultData>> {
|
||||
data: MtpTransferFileData
|
||||
): Promise<ResultObject<TransferFileResultData>> {
|
||||
const transactionId = generateId()
|
||||
void this.processFileUpload(data, transactionId)
|
||||
void this.processFileTransfer(
|
||||
data,
|
||||
transactionId,
|
||||
DotnetCliCommandAction.UPLOAD_FILE
|
||||
)
|
||||
return Result.success({ transactionId })
|
||||
}
|
||||
|
||||
async getUploadFileProgress({
|
||||
async exportFile(
|
||||
data: MtpTransferFileData
|
||||
): Promise<ResultObject<TransferFileResultData>> {
|
||||
const transactionId = generateId()
|
||||
void this.processFileTransfer(
|
||||
data,
|
||||
transactionId,
|
||||
DotnetCliCommandAction.EXPORT_FILE
|
||||
)
|
||||
return Result.success({ transactionId })
|
||||
}
|
||||
|
||||
async getTransferredFileProgress({
|
||||
transactionId,
|
||||
}: UploadTransactionData): Promise<
|
||||
ResultObject<GetUploadFileProgressResultData>
|
||||
}: TransferTransactionData): Promise<
|
||||
ResultObject<GetTransferFileProgressResultData>
|
||||
> {
|
||||
const transactionStatus = this.uploadFileTransactionStatus[transactionId]
|
||||
const transactionStatus = this.fileTransferTransactionStatus[transactionId]
|
||||
|
||||
if (!transactionStatus) {
|
||||
return Result.failed({
|
||||
@@ -126,11 +142,12 @@ export class DotnetMtp implements MtpInterface {
|
||||
: Result.success({ progress: transactionStatus.progress })
|
||||
}
|
||||
|
||||
async cancelUpload(
|
||||
data: UploadTransactionData
|
||||
): Promise<ResultObject<CancelUploadResultData>> {
|
||||
async cancelFileTransfer(
|
||||
data: TransferTransactionData
|
||||
): Promise<ResultObject<CancelTransferResultData>> {
|
||||
const transactionStatus =
|
||||
this.uploadFileTransactionStatus[data.transactionId]
|
||||
this.fileTransferTransactionStatus[data.transactionId]
|
||||
this.abortController?.abort()
|
||||
|
||||
if (transactionStatus === undefined) {
|
||||
return Result.failed({
|
||||
@@ -141,49 +158,49 @@ export class DotnetMtp implements MtpInterface {
|
||||
type: MTPError.MTP_CANCEL_FAILED_ALREADY_TRANSFERRED,
|
||||
} as AppError)
|
||||
} else {
|
||||
this.abortController?.abort()
|
||||
console.log(
|
||||
`${PREFIX_LOG} Canceling upload for transactionId ${data.transactionId}, signal abort status: ${this.abortController?.signal.aborted}`
|
||||
`${PREFIX_LOG} Canceling file transfer for transactionId ${data.transactionId}, signal abort status: ${this.abortController?.signal.aborted}`
|
||||
)
|
||||
return Result.success({})
|
||||
}
|
||||
}
|
||||
|
||||
private async processFileUpload(
|
||||
data: MtpUploadFileData,
|
||||
transactionId: string
|
||||
private async processFileTransfer(
|
||||
data: MtpTransferFileData,
|
||||
transactionId: string,
|
||||
action: DotnetCliCommandAction
|
||||
): Promise<void> {
|
||||
this.abortController = new AbortController()
|
||||
this.uploadFileTransactionStatus[transactionId] = { progress: 0 }
|
||||
const request = { action: DotnetCliCommandAction.UPLOAD_FILE, ...data }
|
||||
this.fileTransferTransactionStatus[transactionId] = { progress: 0 }
|
||||
const request = { action, ...data }
|
||||
await runCommand(
|
||||
request,
|
||||
(line: string) => {
|
||||
console.log(
|
||||
`${PREFIX_LOG} uploadFile stdout: ${line} for file ${data.sourcePath}`
|
||||
`${PREFIX_LOG} file transfer stdout: ${line} for file ${data.sourcePath}`
|
||||
)
|
||||
const parsed = JSON.parse(line)
|
||||
this.uploadFileTransactionStatus[transactionId].progress =
|
||||
this.fileTransferTransactionStatus[transactionId].progress =
|
||||
parsed.data.progress
|
||||
},
|
||||
(line: string) => {
|
||||
const errorType = translateStatus(JSON.parse(line).status)
|
||||
const appError = { type: errorType } as AppError
|
||||
console.error(
|
||||
`${PREFIX_LOG} uploadFile stderr: ${JSON.stringify(
|
||||
`${PREFIX_LOG} file transfer stderr: ${JSON.stringify(
|
||||
appError
|
||||
)} for file ${data.sourcePath}`
|
||||
)
|
||||
this.uploadFileTransactionStatus[transactionId].error = appError
|
||||
this.fileTransferTransactionStatus[transactionId].error = appError
|
||||
},
|
||||
this.abortController.signal
|
||||
)
|
||||
.then(() => {
|
||||
console.log(`${PREFIX_LOG} uploadFile command status: finished`)
|
||||
console.log(`${PREFIX_LOG} file transfer command status: finished`)
|
||||
})
|
||||
.catch((error) => {
|
||||
const appError = { type: error } as AppError
|
||||
this.uploadFileTransactionStatus[transactionId].error = appError
|
||||
this.fileTransferTransactionStatus[transactionId].error = appError
|
||||
console.error(`${PREFIX_LOG} uploadFile command status: error`, error)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -53,9 +53,9 @@ export async function runCommand(
|
||||
})
|
||||
|
||||
const handleAbort = () => {
|
||||
const killed = child.kill()
|
||||
if (killed) {
|
||||
reject(MTPError.MTP_PROCESS_CANCELLED)
|
||||
if (child.stdin.writable) {
|
||||
child.stdin.write("cancel\n")
|
||||
child.stdin.end()
|
||||
} else {
|
||||
reject(MTPError.MTP_GENERAL_ERROR)
|
||||
}
|
||||
|
||||
@@ -253,6 +253,69 @@ export class NodeMtpDevice {
|
||||
await this.transferOut(new Uint8Array(chunk).buffer)
|
||||
}
|
||||
|
||||
public async initiateExportFile(
|
||||
sourcePath: string,
|
||||
storageId: number
|
||||
): Promise<{
|
||||
objectHandle: number
|
||||
fileName: string
|
||||
fileSize: number
|
||||
}> {
|
||||
const objectHandle = await this.findObjectHandleFromPath(
|
||||
storageId,
|
||||
sourcePath
|
||||
)
|
||||
|
||||
if (objectHandle === undefined) {
|
||||
throw new AppError(
|
||||
MTPError.MTP_SOURCE_PATH_NOT_FOUND,
|
||||
`There is no such element ${sourcePath}`
|
||||
)
|
||||
}
|
||||
|
||||
const objectInfo = await this.getObjectInfo(objectHandle)
|
||||
|
||||
return {
|
||||
objectHandle,
|
||||
fileName: objectInfo.filename,
|
||||
fileSize: objectInfo.objectCompressedSize,
|
||||
}
|
||||
}
|
||||
|
||||
public async exportFileData(
|
||||
objectHandle: number,
|
||||
offset: number,
|
||||
length: number
|
||||
): Promise<Uint8Array> {
|
||||
const transactionId = this.getTransactionId()
|
||||
|
||||
await this.write({
|
||||
transactionId,
|
||||
type: ContainerTypeCode.Command,
|
||||
code: ContainerCode.GetPartialObject,
|
||||
payload: [
|
||||
{ type: "UINT32", value: objectHandle },
|
||||
{ type: "UINT32", value: offset },
|
||||
{ type: "UINT32", value: length },
|
||||
],
|
||||
})
|
||||
|
||||
const dataResponse = await this.read(transactionId, ContainerTypeCode.Data)
|
||||
const statusResponse = await this.read(
|
||||
transactionId,
|
||||
ContainerTypeCode.Response
|
||||
)
|
||||
|
||||
if (statusResponse.code !== ContainerCode.StatusOk) {
|
||||
throw new AppError(
|
||||
MTPError.MTP_GENERAL_ERROR,
|
||||
`GetPartialObject failed at offset ${offset} with code: ${statusResponse.code}`
|
||||
)
|
||||
}
|
||||
|
||||
return new Uint8Array(dataResponse.payload)
|
||||
}
|
||||
|
||||
async cancelTransaction(): Promise<void> {
|
||||
if (!this.uploadTransactionId) {
|
||||
console.log(
|
||||
@@ -456,6 +519,32 @@ export class NodeMtpDevice {
|
||||
}
|
||||
}
|
||||
|
||||
async findObjectHandleFromPath(storageId: number, fullPath: string) {
|
||||
const parts = fullPath.split("/").filter(Boolean)
|
||||
let currentHandle = 0xffffffff
|
||||
for (const part of parts) {
|
||||
const children = await this.getObjectHandles(
|
||||
currentHandle,
|
||||
storageId,
|
||||
undefined
|
||||
)
|
||||
let found = false
|
||||
for (const handle of children) {
|
||||
const info = await this.getObjectInfo(handle)
|
||||
if (info.filename === part) {
|
||||
currentHandle = handle
|
||||
found = true
|
||||
console.log(
|
||||
`${PREFIX_LOG} current handle: ${handle} for path ${part}`
|
||||
)
|
||||
break
|
||||
}
|
||||
}
|
||||
if (!found) return
|
||||
}
|
||||
return currentHandle
|
||||
}
|
||||
|
||||
private getTransactionId(): number {
|
||||
const id = this.transactionIdCounter++
|
||||
if (this.transactionIdCounter >= 0xffffffff) {
|
||||
|
||||
@@ -7,16 +7,16 @@ import path from "node:path"
|
||||
import fs from "node:fs"
|
||||
import { NodeMtpDeviceManager } from "./node-mtp-device-manager"
|
||||
import {
|
||||
CancelUploadResultData,
|
||||
GetUploadFileProgressResultData,
|
||||
CancelTransferResultData,
|
||||
GetTransferFileProgressResultData,
|
||||
MtpDevice,
|
||||
MTPError,
|
||||
MtpInterface,
|
||||
MtpStorage,
|
||||
MtpUploadFileData,
|
||||
MtpTransferFileData,
|
||||
TransactionStatus,
|
||||
UploadFileResultData,
|
||||
UploadTransactionData,
|
||||
TransferFileResultData,
|
||||
TransferTransactionData,
|
||||
} from "../app-mtp.interface"
|
||||
import { generateId } from "../utils/generate-id"
|
||||
import {
|
||||
@@ -26,7 +26,7 @@ import {
|
||||
import { AppError } from "../../../../core/core/errors/app-error"
|
||||
import { handleMtpError, mapToMtpError } from "../utils/handle-mtp-error"
|
||||
import { StorageType } from "./utils/parse-storage-info"
|
||||
import { mtpUploadChunkSize, rootObjectHandle } from "./mtp-packet-definitions"
|
||||
import { mtpUploadChunkSize } from "./mtp-packet-definitions"
|
||||
import { ResponseObjectInfo } from "./utils/object-info.interface"
|
||||
import { getObjectFormat, isObjectCatalog } from "./utils/object-format.helpers"
|
||||
import { ObjectFormatCode } from "./utils/object-format.interface"
|
||||
@@ -34,7 +34,7 @@ import { ObjectFormatCode } from "./utils/object-format.interface"
|
||||
const PREFIX_LOG = `[app-mtp/node-mtp]`
|
||||
|
||||
export class NodeMtp implements MtpInterface {
|
||||
private uploadFileTransactionStatus: Record<string, TransactionStatus> = {}
|
||||
private transferFileTransactionStatus: Record<string, TransactionStatus> = {}
|
||||
private abortController: AbortController | undefined
|
||||
|
||||
constructor(private deviceManager: NodeMtpDeviceManager) {}
|
||||
@@ -77,8 +77,8 @@ export class NodeMtp implements MtpInterface {
|
||||
}
|
||||
|
||||
async uploadFile(
|
||||
data: MtpUploadFileData
|
||||
): Promise<ResultObject<UploadFileResultData>> {
|
||||
data: MtpTransferFileData
|
||||
): Promise<ResultObject<TransferFileResultData>> {
|
||||
const result = await this.processUploadFileInfo(data)
|
||||
|
||||
if (!result.ok) {
|
||||
@@ -90,31 +90,42 @@ export class NodeMtp implements MtpInterface {
|
||||
return Result.success({ transactionId })
|
||||
}
|
||||
|
||||
async getUploadFileProgress({
|
||||
async exportFile(
|
||||
data: MtpTransferFileData
|
||||
): Promise<ResultObject<TransferFileResultData>> {
|
||||
const transactionId = generateId()
|
||||
|
||||
void this.processExportFile(data, transactionId)
|
||||
|
||||
return Result.success({ transactionId })
|
||||
}
|
||||
|
||||
async getTransferredFileProgress({
|
||||
transactionId,
|
||||
}: UploadTransactionData): Promise<
|
||||
ResultObject<GetUploadFileProgressResultData>
|
||||
}: TransferTransactionData): Promise<
|
||||
ResultObject<GetTransferFileProgressResultData>
|
||||
> {
|
||||
if (this.uploadFileTransactionStatus[transactionId] === undefined) {
|
||||
if (this.transferFileTransactionStatus[transactionId] === undefined) {
|
||||
return Result.failed(new AppError(MTPError.MTP_TRANSACTION_NOT_FOUND))
|
||||
}
|
||||
|
||||
if (this.uploadFileTransactionStatus[transactionId].error) {
|
||||
if (this.transferFileTransactionStatus[transactionId].error) {
|
||||
return Result.failed(
|
||||
this.uploadFileTransactionStatus[transactionId].error as AppError
|
||||
this.transferFileTransactionStatus[transactionId].error as AppError
|
||||
)
|
||||
}
|
||||
|
||||
return Result.success({
|
||||
progress: this.uploadFileTransactionStatus[transactionId].progress,
|
||||
progress: this.transferFileTransactionStatus[transactionId].progress,
|
||||
})
|
||||
}
|
||||
|
||||
async cancelUpload(
|
||||
data: UploadTransactionData
|
||||
): Promise<ResultObject<CancelUploadResultData>> {
|
||||
async cancelFileTransfer(
|
||||
data: TransferTransactionData
|
||||
): Promise<ResultObject<CancelTransferResultData>> {
|
||||
const transactionStatus =
|
||||
this.uploadFileTransactionStatus[data.transactionId]
|
||||
this.transferFileTransactionStatus[data.transactionId]
|
||||
this.abortController?.abort()
|
||||
|
||||
if (transactionStatus === undefined) {
|
||||
return Result.failed({
|
||||
@@ -125,7 +136,6 @@ export class NodeMtp implements MtpInterface {
|
||||
type: MTPError.MTP_CANCEL_FAILED_ALREADY_TRANSFERRED,
|
||||
} as AppError)
|
||||
} else {
|
||||
this.abortController?.abort()
|
||||
console.log(
|
||||
`${PREFIX_LOG} Canceling upload for transactionId ${data.transactionId}, signal abort status: ${this.abortController?.signal.aborted}`
|
||||
)
|
||||
@@ -136,27 +146,37 @@ export class NodeMtp implements MtpInterface {
|
||||
private async createDirectories(
|
||||
deviceId: string,
|
||||
storageId: number,
|
||||
filePath: string,
|
||||
parentObjectHandle: number
|
||||
filePath: string
|
||||
): Promise<number> {
|
||||
const pathSegments = filePath.split("/").filter((segment) => segment !== "")
|
||||
if (pathSegments.length === 0) {
|
||||
return parentObjectHandle
|
||||
} else {
|
||||
const truncatedPath = pathSegments.slice(1).join("/")
|
||||
const objectHandle = await this.createFolder(
|
||||
const rootObjectHandle = 0xffffffff
|
||||
const pathSegments = filePath.split("/").filter(Boolean)
|
||||
|
||||
let currentParent = rootObjectHandle
|
||||
|
||||
for (const segment of pathSegments) {
|
||||
const children = await this.getChildObjectInfoList(
|
||||
currentParent,
|
||||
deviceId,
|
||||
storageId,
|
||||
pathSegments[0],
|
||||
parentObjectHandle
|
||||
storageId
|
||||
)
|
||||
return this.createDirectories(
|
||||
deviceId,
|
||||
storageId,
|
||||
truncatedPath,
|
||||
objectHandle
|
||||
|
||||
const existingFolder = children.find(
|
||||
(child) => child.filename === segment
|
||||
)
|
||||
|
||||
if (existingFolder && isObjectCatalog(existingFolder)) {
|
||||
currentParent = existingFolder.objectHandle
|
||||
} else {
|
||||
const newFolderHandle = await this.createFolder(
|
||||
deviceId,
|
||||
storageId,
|
||||
segment,
|
||||
currentParent
|
||||
)
|
||||
currentParent = newFolderHandle
|
||||
}
|
||||
}
|
||||
return currentParent
|
||||
}
|
||||
|
||||
private async createFolder(
|
||||
@@ -168,7 +188,9 @@ export class NodeMtp implements MtpInterface {
|
||||
console.log(
|
||||
`${PREFIX_LOG} createFolder... deviceId: ${deviceId}, storageId: ${storageId}, name: ${name}, parentObjectHandle: ${parentObjectHandle}`
|
||||
)
|
||||
|
||||
const device = await this.deviceManager.getNodeMtpDevice({ id: deviceId })
|
||||
|
||||
return device.uploadFileInfo({
|
||||
size: 0,
|
||||
name,
|
||||
@@ -183,7 +205,7 @@ export class NodeMtp implements MtpInterface {
|
||||
destinationPath,
|
||||
deviceId,
|
||||
storageId,
|
||||
}: MtpUploadFileData): Promise<ResultObject<number>> {
|
||||
}: MtpTransferFileData): Promise<ResultObject<number>> {
|
||||
try {
|
||||
if (!fs.existsSync(sourcePath)) {
|
||||
return Result.failed(
|
||||
@@ -194,16 +216,24 @@ export class NodeMtp implements MtpInterface {
|
||||
)
|
||||
}
|
||||
|
||||
const device = await this.deviceManager.getNodeMtpDevice({ id: deviceId })
|
||||
const storageIdNumber = Number(storageId)
|
||||
|
||||
const size = await this.getFileSize(sourcePath)
|
||||
const name = path.basename(sourcePath)
|
||||
const parentObjectHandle = await this.getObjectHandleFromLastPathSegment(
|
||||
deviceId,
|
||||
let parentObjectHandle = await device.findObjectHandleFromPath(
|
||||
storageIdNumber,
|
||||
destinationPath
|
||||
)
|
||||
|
||||
if (parentObjectHandle === undefined) {
|
||||
parentObjectHandle = await this.createDirectories(
|
||||
deviceId,
|
||||
storageIdNumber,
|
||||
destinationPath
|
||||
)
|
||||
}
|
||||
|
||||
const objectFormat = getObjectFormat(name)
|
||||
|
||||
return this.uploadFileInfo(
|
||||
@@ -222,13 +252,13 @@ export class NodeMtp implements MtpInterface {
|
||||
}
|
||||
|
||||
private async processUploadFile(
|
||||
{ sourcePath, deviceId }: MtpUploadFileData,
|
||||
{ sourcePath, deviceId }: MtpTransferFileData,
|
||||
transactionId: string
|
||||
): Promise<void> {
|
||||
try {
|
||||
this.abortController = new AbortController()
|
||||
const startTime = Date.now()
|
||||
this.uploadFileTransactionStatus[transactionId] = {
|
||||
this.transferFileTransactionStatus[transactionId] = {
|
||||
progress: 0,
|
||||
}
|
||||
const device = await this.deviceManager.getNodeMtpDevice({ id: deviceId })
|
||||
@@ -242,17 +272,18 @@ export class NodeMtp implements MtpInterface {
|
||||
for await (const chunk of fileStream) {
|
||||
if (this.abortController.signal.aborted) {
|
||||
await device.cancelTransaction()
|
||||
this.uploadFileTransactionStatus[transactionId].error = new AppError(
|
||||
MTPError.MTP_PROCESS_CANCELLED,
|
||||
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
||||
`Error uploading file in progress: ${this.uploadFileTransactionStatus[transactionId].progress}% - ${MTPError.MTP_PROCESS_CANCELLED}`
|
||||
)
|
||||
this.transferFileTransactionStatus[transactionId].error =
|
||||
new AppError(
|
||||
MTPError.MTP_PROCESS_CANCELLED,
|
||||
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
||||
`Error uploading file in progress: ${this.transferFileTransactionStatus[transactionId].progress}% - ${MTPError.MTP_PROCESS_CANCELLED}`
|
||||
)
|
||||
return
|
||||
}
|
||||
await device.uploadFileData(chunk)
|
||||
uploadedBytes += chunk.length
|
||||
const progress = (uploadedBytes / size) * 100
|
||||
this.uploadFileTransactionStatus[transactionId].progress = progress
|
||||
this.transferFileTransactionStatus[transactionId].progress = progress
|
||||
console.log(`${PREFIX_LOG} progress: ${progress}%`)
|
||||
}
|
||||
|
||||
@@ -271,13 +302,89 @@ export class NodeMtp implements MtpInterface {
|
||||
console.log(`${PREFIX_LOG} process upload file error: ${error}`)
|
||||
|
||||
const mtpError = mapToMtpError(error)
|
||||
this.uploadFileTransactionStatus[transactionId].error =
|
||||
this.transferFileTransactionStatus[transactionId].error =
|
||||
mtpError.type === MTPError.MTP_INITIALIZE_ACCESS_ERROR
|
||||
? mtpError
|
||||
: new AppError(
|
||||
MTPError.MTP_GENERAL_ERROR,
|
||||
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
||||
`Error uploading file in progress: ${this.uploadFileTransactionStatus[transactionId].progress}% - ${error}`
|
||||
`Error uploading file at progress: ${this.transferFileTransactionStatus[transactionId].progress}% - ${error}`
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private async processExportFile(
|
||||
{ sourcePath, deviceId, storageId, destinationPath }: MtpTransferFileData,
|
||||
transactionId: string
|
||||
): Promise<void> {
|
||||
try {
|
||||
this.abortController = new AbortController()
|
||||
const startTime = Date.now()
|
||||
this.transferFileTransactionStatus[transactionId] = { progress: 0 }
|
||||
|
||||
const device = await this.deviceManager.getNodeMtpDevice({ id: deviceId })
|
||||
const { objectHandle, fileName, fileSize } =
|
||||
await device.initiateExportFile(sourcePath, parseInt(storageId))
|
||||
|
||||
const outputPath = path.join(destinationPath, fileName)
|
||||
const writeStream = fs.createWriteStream(outputPath)
|
||||
|
||||
let offset = 0
|
||||
let downloadedBytes = 0
|
||||
|
||||
while (offset < fileSize) {
|
||||
if (this.abortController.signal.aborted) {
|
||||
writeStream.close()
|
||||
fs.rmSync(outputPath)
|
||||
this.transferFileTransactionStatus[transactionId].error =
|
||||
new AppError(
|
||||
MTPError.MTP_PROCESS_CANCELLED,
|
||||
`Export aborted at ${this.transferFileTransactionStatus[
|
||||
transactionId
|
||||
].progress.toFixed(2)}%`
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
const chunkSize = Math.min(mtpUploadChunkSize, fileSize - offset)
|
||||
const chunk = await device.exportFileData(
|
||||
objectHandle,
|
||||
offset,
|
||||
chunkSize
|
||||
)
|
||||
|
||||
writeStream.write(chunk)
|
||||
downloadedBytes += chunk.length
|
||||
offset += chunk.length
|
||||
|
||||
const progress = (downloadedBytes / fileSize) * 100
|
||||
this.transferFileTransactionStatus[transactionId].progress = progress
|
||||
console.log(`${PREFIX_LOG} export progress: ${progress.toFixed(2)}%`)
|
||||
}
|
||||
|
||||
writeStream.close()
|
||||
const duration = (Date.now() - startTime) / 1000
|
||||
const speed = fileSize / 1024 / 1024 / duration
|
||||
|
||||
console.log(
|
||||
`${PREFIX_LOG} File export completed in ${duration.toFixed(2)} seconds.`
|
||||
)
|
||||
console.log(`${PREFIX_LOG} Export speed: ${speed.toFixed(2)} MB/s`)
|
||||
} catch (error) {
|
||||
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
||||
console.log(`${PREFIX_LOG} export file error: ${error}`)
|
||||
const mtpError = mapToMtpError(error)
|
||||
this.transferFileTransactionStatus[transactionId].error =
|
||||
mtpError.type === MTPError.MTP_INITIALIZE_ACCESS_ERROR
|
||||
? mtpError
|
||||
: new AppError(
|
||||
MTPError.MTP_GENERAL_ERROR,
|
||||
`Error during exporting file at progress ${
|
||||
this.transferFileTransactionStatus[
|
||||
transactionId
|
||||
]?.progress?.toFixed(2) ?? 0
|
||||
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
||||
}%: ${error}`
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -287,52 +394,6 @@ export class NodeMtp implements MtpInterface {
|
||||
return stats.size
|
||||
}
|
||||
|
||||
private async getObjectHandleFromLastPathSegment(
|
||||
deviceId: string,
|
||||
storageId: number,
|
||||
filePath: string,
|
||||
objectHandle: number = rootObjectHandle
|
||||
): Promise<number> {
|
||||
console.log(
|
||||
`${PREFIX_LOG} getObjectHandleFromLastPathSegment... filePath: ${filePath}, objectHandle: ${objectHandle}`
|
||||
)
|
||||
|
||||
const pathSegments = filePath.split("/").filter((segment) => segment !== "")
|
||||
|
||||
if (pathSegments.length === 0) {
|
||||
return objectHandle
|
||||
} else {
|
||||
const truncatedPath = pathSegments.slice(1).join("/")
|
||||
|
||||
const childObjectInfoList = await this.getChildObjectInfoList(
|
||||
objectHandle,
|
||||
deviceId,
|
||||
storageId
|
||||
)
|
||||
|
||||
const childObjectInfo = childObjectInfoList.find(
|
||||
(objectInfo) =>
|
||||
objectInfo.filename === pathSegments[0] && isObjectCatalog(objectInfo)
|
||||
)
|
||||
|
||||
if (childObjectInfo) {
|
||||
return this.getObjectHandleFromLastPathSegment(
|
||||
deviceId,
|
||||
storageId,
|
||||
truncatedPath,
|
||||
childObjectInfo.objectHandle
|
||||
)
|
||||
} else {
|
||||
return this.createDirectories(
|
||||
deviceId,
|
||||
storageId,
|
||||
filePath,
|
||||
objectHandle
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private async getChildObjectInfoList(
|
||||
parentHandle: number,
|
||||
deviceId: string,
|
||||
@@ -379,7 +440,7 @@ export class NodeMtp implements MtpInterface {
|
||||
} catch (error) {
|
||||
const mtpError = mapToMtpError(error)
|
||||
|
||||
if(mtpError.type !== MTPError.MTP_GENERAL_ERROR) {
|
||||
if (mtpError.type !== MTPError.MTP_GENERAL_ERROR) {
|
||||
return Result.failed(mtpError)
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ export enum Endpoint {
|
||||
Security = 13,
|
||||
Outbox = 14,
|
||||
TimeSynchronization = 16,
|
||||
Quotations = 17,
|
||||
|
||||
// api version (mocked)
|
||||
ApiVersion = 1000,
|
||||
|
||||
@@ -134,4 +134,8 @@ export enum IconType {
|
||||
RecoveryModeBlack,
|
||||
ButtonSuccess,
|
||||
LightButton,
|
||||
Quotations,
|
||||
Settings,
|
||||
Dropdown,
|
||||
CheckNew,
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ export enum IconSize {
|
||||
Big = 2.8,
|
||||
Large = 3.2,
|
||||
ExtraLarge = 3.6,
|
||||
Enormous = 4.8,
|
||||
}
|
||||
|
||||
export interface Props {
|
||||
|
||||
@@ -128,6 +128,10 @@ import MarkAsUnread from "Core/__deprecated__/renderer/svg/mark-as-unread.svg"
|
||||
import Conversation from "Core/__deprecated__/renderer/svg/conversation.svg"
|
||||
import Exclamation from "Core/__deprecated__/renderer/svg/exclamation.svg"
|
||||
import ButtonSuccess from "Core/__deprecated__/renderer/svg/button-success.svg"
|
||||
import Quotations from "Core/__deprecated__/renderer/svg/quotations.svg"
|
||||
import Settings from "Core/__deprecated__/renderer/svg/settings.svg"
|
||||
import Dropdown from "Core/__deprecated__/renderer/svg/dropdown.svg"
|
||||
import CheckNew from "Core/__deprecated__/renderer/svg/check-new.svg"
|
||||
import DataMigration from "../../../../../../generic-view/ui/src/lib/icon/svg/data-migration.svg"
|
||||
import RecoveryModeWhite from "../../../../../../generic-view/ui/src/lib/icon/svg/recovery-mode-white.svg"
|
||||
import RecoveryModeBlack from "../../../../../../generic-view/ui/src/lib/icon/svg/recovery-mode-black.svg"
|
||||
@@ -510,6 +514,10 @@ const typeToIcon: Partial<Record<IconType, typeof Arrow>> = {
|
||||
[IconType.RecoveryModeBlack]: RecoveryModeBlack,
|
||||
[IconType.ButtonSuccess]: ButtonSuccess,
|
||||
[IconType.LightButton]: LightButton,
|
||||
[IconType.Quotations]: Quotations,
|
||||
[IconType.Settings]: Settings,
|
||||
[IconType.Dropdown]: Dropdown,
|
||||
[IconType.CheckNew]: CheckNew,
|
||||
}
|
||||
|
||||
export const getIconType = (
|
||||
|
||||
@@ -28,7 +28,7 @@ exports[`matches snapshot 1`] = `
|
||||
margin-right: 1.2rem;
|
||||
}
|
||||
|
||||
.c1:hover {
|
||||
.c1:hover:not(:disabled) {
|
||||
border-color: #3b3f42;
|
||||
cursor: pointer;
|
||||
-webkit-transition: border-color 0.5s linear;
|
||||
|
||||
@@ -27,7 +27,7 @@ const Input = styled.input`
|
||||
border-radius: 50%;
|
||||
margin-right: 1.2rem;
|
||||
|
||||
&:hover {
|
||||
&:hover:not(:disabled) {
|
||||
border-color: ${borderColor("hover")};
|
||||
cursor: pointer;
|
||||
transition: border-color 0.5s linear;
|
||||
|
||||
@@ -38,6 +38,11 @@ export const getModalSize = (size: ModalSize) => {
|
||||
return css`
|
||||
width: 101rem;
|
||||
`
|
||||
case ModalSize.LargeNew:
|
||||
return css`
|
||||
width: 92.3rem;
|
||||
padding: 0;
|
||||
`
|
||||
default:
|
||||
return
|
||||
}
|
||||
@@ -51,6 +56,7 @@ export const getTitleStyle = (size: ModalSize) => {
|
||||
return TextDisplayStyle.Headline4
|
||||
case ModalSize.Small:
|
||||
case ModalSize.Medium:
|
||||
case ModalSize.MediumNew:
|
||||
return TextDisplayStyle.Headline3
|
||||
case ModalSize.Large:
|
||||
return TextDisplayStyle.Headline2
|
||||
@@ -121,6 +127,10 @@ export const getButtonsPosition = (size: ModalSize) => {
|
||||
return css`
|
||||
justify-content: space-evenly;
|
||||
`
|
||||
case ModalSize.MediumNew:
|
||||
return css`
|
||||
justify-content: center;
|
||||
`
|
||||
case ModalSize.Large:
|
||||
return css`
|
||||
justify-content: flex-end;
|
||||
|
||||
@@ -9,6 +9,7 @@ export enum ModalSize {
|
||||
Medium,
|
||||
MediumNew,
|
||||
Large,
|
||||
LargeNew,
|
||||
}
|
||||
|
||||
export enum TitleOrder {
|
||||
|
||||
@@ -19,4 +19,5 @@ export enum MenuGroupTestIds {
|
||||
DataMigration = "data-migration-link",
|
||||
DeviceSelectionButton = "menu-group_device-selection-button",
|
||||
RecoveryMode = "recovery-mode-link",
|
||||
Quotations = "quotations-link",
|
||||
}
|
||||
|
||||
@@ -70,6 +70,13 @@ const YOUR_PURE_BUTTONS = [
|
||||
visibleOn: [DeviceType.MuditaHarmonyMsc],
|
||||
viewKey: View.RecoveryMode,
|
||||
},
|
||||
{
|
||||
button: views.quotations,
|
||||
icon: IconType.Quotations,
|
||||
testId: MenuGroupTestIds.Quotations,
|
||||
visibleOn: [DeviceType.MuditaHarmony],
|
||||
viewKey: View.Quotations,
|
||||
},
|
||||
]
|
||||
|
||||
const DESKTOP_APP_BUTTONS: MenuElementItem[] = [
|
||||
|
||||
@@ -21,6 +21,7 @@ export const URL_MAIN = {
|
||||
dataMigration: "/data-migration",
|
||||
dataMigrationKompakt: "/generic/mc-data-migration",
|
||||
recoveryMode: "/harmony-recovery-mode",
|
||||
quotations: "/harmony/quotations",
|
||||
} as const
|
||||
|
||||
export const URL_TABS = {
|
||||
|
||||
@@ -24,6 +24,7 @@ const messages = defineMessages({
|
||||
pureSystem: { id: "module.overview.pureSystem" },
|
||||
dataMigration: { id: "module.dataMigration.title" },
|
||||
harmonyRecoveryMode: { id: "module.recoveryMode.harmony.title" },
|
||||
quotations: { id: "module.quotations.title" },
|
||||
})
|
||||
|
||||
export enum View {
|
||||
@@ -40,6 +41,7 @@ export enum View {
|
||||
PureSystem = "pure-system",
|
||||
DataMigration = "dataMigration",
|
||||
RecoveryMode = "recoveryMode",
|
||||
Quotations = "quotations",
|
||||
}
|
||||
|
||||
export type Views = {
|
||||
@@ -108,4 +110,8 @@ export const views: Views = {
|
||||
label: messages.harmonyRecoveryMode,
|
||||
url: URL_MAIN.recoveryMode,
|
||||
},
|
||||
[View.Quotations]: {
|
||||
label: messages.quotations,
|
||||
url: URL_MAIN.quotations,
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user