diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 5e2f3397..00000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,109 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: Build npm - -# Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the master branch -on: - push: - branches: [ master, 1.0.* ] - pull_request: - branches: [ master, 1.0.* ] - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - build-admin-ui: - runs-on: ubuntu-latest - env: - NAMESPACE: ${{ secrets. dev_namespace_docker_hub }} - SERVICE_NAME: admin-ui - SERVICE_LOCATION: admin-ui - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - - - name: npm install - run: cd ${{ env.SERVICE_LOCATION }} && npm install --ignore-scripts - - - name: npm build - run: cd ${{ env.SERVICE_LOCATION }} && npm run-script build -- --prod --base-href . --output-path=dist - - - name: setup environment - run: | - # Strip git ref prefix from version - echo "::set-env name=BRANCH_NAME::$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" - echo ${{ env.BRANCH_NAME }} - - - name: Build image - run: | - cd "./${{env.SERVICE_LOCATION}}" - docker build . --file Dockerfile --tag ${{ env.SERVICE_NAME }} - - - name: Log into registry - run: echo "${{ secrets.release_docker_hub }}" | docker login -u ${{ secrets.actor_docker_hub }} --password-stdin - - - name: Push image - run: | - IMAGE_ID=$NAMESPACE/$SERVICE_NAME - - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - VERSION=$BRANCH_NAME - echo "push version $VERSION" - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $SERVICE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION - - -# This workflow contains a single job called "build" - build-pre-registration-ui: - runs-on: ubuntu-latest - env: - NAMESPACE: ${{ secrets. dev_namespace_docker_hub }} - SERVICE_NAME: pre-registration-ui - SERVICE_LOCATION: pre-registration-ui - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - - - name: npm install - run: cd ${{ env.SERVICE_LOCATION }} && npm install --ignore-scripts - - - name: npm build - run: cd ${{ env.SERVICE_LOCATION }} && npm run-script build -- --prod --base-href . --output-path=dist - - - name: setup environment - run: | - # Strip git ref prefix from version - echo "::set-env name=BRANCH_NAME::$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" - echo ${{ env.BRANCH_NAME }} - - - name: Build image - run: | - cd "./${{env.SERVICE_LOCATION}}" - docker build . --file Dockerfile --tag ${{ env.SERVICE_NAME }} - - - name: Log into registry - run: echo "${{ secrets.release_docker_hub }}" | docker login -u ${{ secrets.actor_docker_hub }} --password-stdin - - - name: Push image - run: | - IMAGE_ID=$NAMESPACE/$SERVICE_NAME - - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - VERSION=$BRANCH_NAME - echo "push version $VERSION" - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $SERVICE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION - diff --git a/.github/workflows/push-trigger.yml b/.github/workflows/push-trigger.yml new file mode 100644 index 00000000..97fefe00 --- /dev/null +++ b/.github/workflows/push-trigger.yml @@ -0,0 +1,174 @@ +name: admin-ui build upon a push + +on: + release: + types: [published] + pull_request: + types: [opened, reopened, synchronize] + workflow_dispatch: + inputs: + message: + description: 'Message for manually triggering' + required: false + default: 'Triggered for Updates' + type: string + push: + branches: + - '!release-branch' + - develop + - release-* + - master + - 1.* + - MOSIP* + +jobs: + build-admin-ui: + uses: mosip/kattu/.github/workflows/npm-build.yml@master + with: + SERVICE_LOCATION: ./admin-ui + BUILD_ARTIFACT: admin-ui + secrets: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} + + build-docker-admin-ui: + needs: build-admin-ui + strategy: + matrix: + include: + - SERVICE_LOCATION: './admin-ui' + SERVICE_NAME: 'admin-ui' + NPM_BUILD: true + BUILD_ARTIFACT: 'admin-ui' + fail-fast: false + name: ${{ matrix.SERVICE_NAME }} + uses: mosip/kattu/.github/workflows/docker-build.yml@master + with: + SERVICE_LOCATION: ${{ matrix.SERVICE_LOCATION }} + SERVICE_NAME: ${{ matrix.SERVICE_NAME }} + NPM_BUILD: ${{ matrix.NPM_BUILD }} + BUILD_ARTIFACT: ${{ matrix.BUILD_ARTIFACT }} + secrets: + DEV_NAMESPACE_DOCKER_HUB: ${{ secrets.DEV_NAMESPACE_DOCKER_HUB }} + ACTOR_DOCKER_HUB: ${{ secrets.ACTOR_DOCKER_HUB }} + RELEASE_DOCKER_HUB: ${{ secrets.RELEASE_DOCKER_HUB }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} + + sonar-analysis: + needs: build-admin-ui + if: "${{ github.event_name != 'pull_request' }}" + uses: mosip/kattu/.github/workflows/npm-sonar-analysis.yml@master + with: + SERVICE_LOCATION: admin-ui + SONAR_URL: 'https://sonarcloud.io' + PROJECT_KEY: 'mosip_${{ github.event.repository.name }}' + secrets: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + ORG_KEY: ${{ secrets.ORG_KEY }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} + + build-maven-admintest: + uses: mosip/kattu/.github/workflows/maven-build.yml@master + with: + SERVICE_LOCATION: ./admintest + BUILD_ARTIFACT: admintest + secrets: + OSSRH_USER: ${{ secrets.OSSRH_USER }} + OSSRH_SECRET: ${{ secrets.OSSRH_SECRET }} + OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }} + GPG_SECRET: ${{ secrets.GPG_SECRET }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} + + build-admintest-local: + needs: build-maven-admintest + runs-on: ubuntu-latest + env: + NAMESPACE: ${{ secrets.dev_namespace_docker_hub }} + SERVICE_NAME: admintest + SERVICE_LOCATION: admintest + BUILD_ARTIFACT: admintest-local + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + ref: ${{ github.ref }} + java-version: 11 + server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml + settings-path: ${{ github.workspace }} # location for the settings.xml file + + - name: Cache local Maven repository + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + + - name: Setup the settings file for ossrh server + run: echo " ossrh ${{secrets.ossrh_user}} ${{secrets.ossrh_secret}} ossrh true gpg2 ${{secrets.gpg_secret}} allow-snapshots true snapshots-repo https://oss.sonatype.org/content/repositories/snapshots false true releases-repo https://oss.sonatype.org/service/local/staging/deploy/maven2 true false sonar . https://sonarcloud.io false " > $GITHUB_WORKSPACE/settings.xml + + - name: Build residentuitests with Maven + run: | + cd ${{ env.SERVICE_LOCATION}} + mvn -U -B package -Dmaven.wagon.http.retryHandler.count=2 --file pom.xml -s $GITHUB_WORKSPACE/settings.xml + + + - name: Ready the springboot artifacts + if: ${{ !contains(github.ref, 'master') || !contains(github.ref, 'main') }} + run: | + ## FIND JARS & COPY ONLY EXECUTABLE JARs STORED UNDER TARGET DIRECTORY + find ${{ env.SERVICE_LOCATION }} -path '*/target/*' -name '*.jar' -type f -exec zip ${{ env.BUILD_ARTIFACT }}.zip {} + + + - name: Upload the springboot jars + if: ${{ !contains(github.ref, 'master') || !contains(github.ref, 'main') }} + uses: actions/upload-artifact@v3 + with: + name: ${{ env.BUILD_ARTIFACT }} + path: ${{ env.BUILD_ARTIFACT }}.zip + + - uses: 8398a7/action-slack@v3 + with: + status: ${{ job.status }} + fields: repo,message,author,commit,workflow,job # selectable (default: repo,message) + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required + if: failure() # Pick up events even if the job fails or is canceled. + + + build-docker-admintest: + needs: build-admintest-local + strategy: + matrix: + include: + - SERVICE_LOCATION: 'admintest' + SERVICE_NAME: 'admintest' + BUILD_ARTIFACT: 'admintest-local' + fail-fast: false + name: ${{ matrix.SERVICE_NAME }} + uses: mosip/kattu/.github/workflows/docker-build.yml@master + with: + SERVICE_LOCATION: ${{ matrix.SERVICE_LOCATION }} + SERVICE_NAME: ${{ matrix.SERVICE_NAME }} + BUILD_ARTIFACT: ${{ matrix.BUILD_ARTIFACT }} + secrets: + DEV_NAMESPACE_DOCKER_HUB: ${{ secrets.DEV_NAMESPACE_DOCKER_HUB }} + ACTOR_DOCKER_HUB: ${{ secrets.ACTOR_DOCKER_HUB }} + RELEASE_DOCKER_HUB: ${{ secrets.RELEASE_DOCKER_HUB }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} + + sonar-analysis-admintest: + needs: build-admintest-local + if: "${{ github.event_name != 'pull_request' }}" + uses: mosip/kattu/.github/workflows/maven-sonar-analysis.yml@master + with: + SERVICE_LOCATION: admintest + SONAR_URL: 'https://sonarcloud.io' + PROJECT_KEY: 'mosip_admintest' + secrets: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + ORG_KEY: ${{ secrets.ORG_KEY }} + OSSRH_USER: ${{ secrets.OSSRH_USER }} + OSSRH_SECRET: ${{ secrets.OSSRH_SECRET }} + OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }} + GPG_SECRET: ${{ secrets.GPG_SECRET }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} \ No newline at end of file diff --git a/.github/workflows/push_trigger.yml b/.github/workflows/push_trigger.yml deleted file mode 100644 index e98e748f..00000000 --- a/.github/workflows/push_trigger.yml +++ /dev/null @@ -1,125 +0,0 @@ - -name: Maven Package upon a push - -on: - push: - branches: - - '!release-branch' - - release-1* - - master - - 1.0.* - - develop - - 1.1.* - - MOSIP-11719 - - 1.2.* - -jobs: - build-admin-ui: - runs-on: ubuntu-latest - env: - NAMESPACE: ${{ secrets. dev_namespace_docker_hub }} - SERVICE_NAME: admin-ui - SERVICE_LOCATION: admin-ui - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - - - name: npm install - run: cd ${{ env.SERVICE_LOCATION }} && npm install --ignore-scripts - - - name: npm build - run: cd ${{ env.SERVICE_LOCATION }} && npm run-script build -- --prod --base-href . --output-path=dist - - - name: Setup branch and env - run: | - # Strip git ref prefix from version - echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV - echo "GPG_TTY=$(tty)" >> $GITHUB_ENV - - - name: setup environment - run: | - # Strip git ref prefix from version - echo "GPG_TTY=$(tty)" >> $GITHUB_ENV - echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - - - name: Build image - run: | - cd "./${{env.SERVICE_LOCATION}}" - docker build . --file Dockerfile --tag ${{ env.SERVICE_NAME }} - - - name: Log into registry - run: echo "${{ secrets.release_docker_hub }}" | docker login -u ${{ secrets.actor_docker_hub }} --password-stdin - - - name: Push image - run: | - IMAGE_ID=$NAMESPACE/$SERVICE_NAME - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - if [[ $BRANCH_NAME == master ]]; then - VERSION=latest - else - VERSION=$BRANCH_NAME - fi - echo "push version $VERSION" - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $SERVICE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION - - - sonar-analysis: - runs-on: ubuntu-latest - env: - NAMESPACE: ${{ secrets. dev_namespace_docker_hub }} - SERVICE_NAME: admin-ui - SERVICE_LOCATION: admin-ui - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: '14' - - - name: npm install - run: cd ${{ env.SERVICE_LOCATION }} && npm install --ignore-scripts - - - name: npm build - run: cd ${{ env.SERVICE_LOCATION }} && npm run-script build -- --prod --base-href . --output-path=dist - - - name: Setup branch and env - run: | - # Strip git ref prefix from version - echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV - echo "GPG_TTY=$(tty)" >> $GITHUB_ENV - - - name: setup environment - run: | - # Strip git ref prefix from version - echo "GPG_TTY=$(tty)" >> $GITHUB_ENV - echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV - - - name: run sonar analysis - run: | - cd "./${{env.SERVICE_LOCATION}}" - echo "sonar.host.url=https://sonarcloud.io/ - sonar.login=${{ secrets.SONAR_TOKEN }} - sonar.projectKey=mosip_admin-ui - sonar.organization=${{ secrets.ORG_KEY }} - sonar.sourceEncoding=UTF-8 - sonar.sources=src - sonar.exclusions=**/node_modules/** - sonar.tests=src - sonar.test.inclusions=**/*.spec.ts - sonar.typescript.lcov.reportPaths=coverage/lcov.info" >> sonar-project.properties - npm install sonar-scanner && npm run sonar - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/.github/workflows/release-changes.yml b/.github/workflows/release-changes.yml new file mode 100644 index 00000000..440e2e24 --- /dev/null +++ b/.github/workflows/release-changes.yml @@ -0,0 +1,26 @@ +name: Release/pre-release Preparation. + +on: + workflow_dispatch: + inputs: + MESSAGE: + description: 'Triggered for release or pe-release' + required: false + default: 'Release Preparation' + RELEASE_TAG: + description: 'tag to update' + required: true + SNAPSHOT_TAG: + description: 'tag to be replaced' + required: true + BASE: + description: 'base branch for PR' + required: true +jobs: + maven-release-preparation: + uses: mosip/kattu/.github/workflows/release-changes.yml@master + with: + MESSAGE: ${{ inputs.MESSAGE }} + RELEASE_TAG: ${{ inputs.RELEASE_TAG }} + SNAPSHOT_TAG: ${{ inputs.SNAPSHOT_TAG }} + BASE: ${{ inputs.BASE }} diff --git a/.github/workflows/release_changes.yml b/.github/workflows/release_changes.yml deleted file mode 100644 index cc9c2956..00000000 --- a/.github/workflows/release_changes.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: Release/pre-release Preparation. - -on: - workflow_dispatch: - inputs: - message: - description: 'Triggered for release or pe-release' - required: false - default: 'Release Preparation' - releaseTags: - description: 'tag to update' - required: true - snapshotTags: - description: 'tag to be replaced' - required: true - base: - description: 'base branch for PR' - required: true -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Setup branch and env - run: | - # Strip git ref prefix from version - echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV - echo "GPG_TTY=$(tty)" >> $GITHUB_ENV - - - name: Mannualy changing the pom versions - run: find . -type f -name "*pom.xml" -print0 | xargs -0 sed -i "s/${{ github.event.inputs.snapshotTags }}/${{ github.event.inputs.releaseTags }}/g" - - - name: Updating the Release URL in POM - run: | - cd .github/workflows - sed -i 's/OSSRH_SNAPSHOT_URL/RELEASE_URL/g' push_trigger.yml - - - name: Updating libs-snapshot-local to libs-release local for artifactory URL's. - run: find . -type f -name "*Dockerfile" -print0 | xargs -0 sed -i "s/libs-snapshot-local/libs-release-local/g" - - - name: removing -DskipTests - run: find . -type f -name "*push_trigger.yml" -print0 | xargs -0 sed -i "s/"-DskipTests"//g" - -# - name: removing --Dgpg.skip -# run: find . -type f -name "*push_trigger.yml" -print0 | xargs -0 sed -i "s/"-Dgpg.skip"//g" - - - name: Create Pull Request - uses: peter-evans/create-pull-request@v3 - with: - token: ${{ secrets.ACTION_PAT }} - commit-message: Updated Pom versions for release changes - title: Release changes - body: Automated PR for ${{ github.event.inputs.releaseTags }} release. - branch: release-branch - delete-branch: true - base: ${{ github.event.inputs.base }} diff --git a/.github/workflows/release_trigger.yml b/.github/workflows/release_trigger.yml deleted file mode 100644 index 9b2e24a0..00000000 --- a/.github/workflows/release_trigger.yml +++ /dev/null @@ -1,407 +0,0 @@ -name: Release maven packages and docker upon a release - -on: - release: - types: [published] - -jobs: - build-kernel-ref-idobjectvalidator: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 - with: - ref: ${{ github.ref }} - java-version: 1.8 - server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml - settings-path: ${{ github.workspace }} # location for the settings.xml file - - - name: Setup branch and GPG public key - run: | - # Strip git ref prefix from version - echo "::set-env name=BRANCH_NAME::$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" - echo ${{ env.BRANCH_NAME }} - echo "::set-env name=GPG_TTY::$(tty)" - echo ${{ env.GPG_TTY }} - sudo apt-get --yes install gnupg2 - gpg2 --import ./.github/keys/mosipgpgkey_pub.gpg - gpg2 --quiet --batch --passphrase=${{secrets.gpg_secret}} --allow-secret-key-import --import ./.github/keys/mosipgpgkey_sec.gpg - - - uses: actions/cache@v1 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven-${{ env.BRANCH_NAME }} - - - name: Setup the settings file for ossrh server - run: echo " ossrh ${{secrets.ossrh_user}} ${{secrets.ossrh_secret}} ossrh true gpg2 ${{secrets.gpg_secret}} allow-snapshots true snapshots-repo https://oss.sonatype.org/content/repositories/snapshots false true releases-repo https://oss.sonatype.org/service/local/staging/deploy/maven2 true false sonar . https://sonarcloud.io false " > $GITHUB_WORKSPACE/settings.xml - - - - name: Build with Maven - run: | - cd kernel - mvn -B package -s $GITHUB_WORKSPACE/settings.xml --file pom.xml - - - name: Ready the springboot artifacts - run: find -name '*.jar' -executable -type f -exec zip release.zip {} + - - - name: Upload the springboot jars - uses: actions/upload-artifact@v1 - with: - name: release - path: ./release.zip - - publish_to_nexus: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 - with: - ref: ${{ github.ref }} - java-version: 1.8 - server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml - settings-path: ${{ github.workspace }} # location for the settings.xml file - - - name: Setup branch and GPG public key - run: | - # Strip git ref prefix from version - echo "::set-env name=BRANCH_NAME::$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" - echo ${{ env.BRANCH_NAME }} - echo "::set-env name=GPG_TTY::$(tty)" - echo ${{ env.GPG_TTY }} - sudo apt-get --yes install gnupg2 - gpg2 --import ./.github/keys/mosipgpgkey_pub.gpg - gpg2 --quiet --batch --passphrase=${{secrets.gpg_secret}} --allow-secret-key-import --import ./.github/keys/mosipgpgkey_sec.gpg - - - uses: actions/cache@v1 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven-${{ env.BRANCH_NAME }} - - name: Install xmllint - run: | - sudo apt-get update - sudo apt-get install libxml2-utils - - name: Setup the settings file for ossrh server - run: echo " ossrh ${{secrets.ossrh_user}} ${{secrets.ossrh_secret}} ossrh true gpg2 ${{secrets.gpg_secret}} allow-snapshots true snapshots-repo https://oss.sonatype.org/content/repositories/snapshots false true releases-repo https://oss.sonatype.org/service/local/staging/deploy/maven2 true false sonar . https://sonarcloud.io false " > $GITHUB_WORKSPACE/settings.xml - - - name: Build with Maven - run: | - cd kernel - mvn -B package -s $GITHUB_WORKSPACE/settings.xml --file pom.xml - - - name: Publish the maven package - run: | - chmod +x ./deploy.sh - ./deploy.sh kernel $GITHUB_WORKSPACE/settings.xml .* - env: - GPG_TTY: $(tty) - - name: Analyze with SonarCloud - run: | - cd kernel - mvn -B verify sonar:sonar -Dsonar.projectKey=${{ secrets.PROJECT_KEY }} -Dsonar.organization=${{ secrets.ORG_KEY }} -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=${{ secrets.SONAR_TOKEN }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - # This workflow contains a single job called "build" - - docker-registration-processor-external-integration-service: - - runs-on: ubuntu-latest - env: - NAMESPACE: mosipdev - SERVICE_NAME: registration-processor-external-integration-service - SERVICE_LOCATION: registration-processor/registration-processor-external-integration-service - - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 11 - uses: actions/setup-java@v1 - with: - ref: ${{ github.ref }} - java-version: 11 - server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml - settings-path: ${{ github.workspace }} # location for the settings.xml file - - name: Setup branch and env - run: | - # Strip git ref prefix from version - echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV - echo "GPG_TTY=$(tty)" >> $GITHUB_ENV - - - name: Setup branch and GPG public key - run: | - # Strip git ref prefix from version - echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV - echo ${{ env.GPG_TTY }} - sudo apt-get --yes install gnupg2 - gpg2 --import ./.github/keys/mosipgpgkey_pub.gpg - gpg2 --quiet --batch --passphrase=${{secrets.gpg_secret}} --allow-secret-key-import --import ./.github/keys/mosipgpgkey_sec.gpg - - - - name: Setup the settings file for ossrh server - run: echo " ossrh ${{secrets.ossrh_user}} ${{secrets.ossrh_secret}} ossrh true gpg2 ${{secrets.gpg_secret}} allow-snapshots true snapshots-repo https://oss.sonatype.org/content/repositories/snapshots false true releases-repo https://oss.sonatype.org/service/local/staging/deploy/maven2 true false sonar . https://sonarcloud.io false " > $GITHUB_WORKSPACE/settings.xml - - - - name: Build with Maven - run: | - cd registration-processor/registration-processor-external-integration-service - mvn -B package -s $GITHUB_WORKSPACE/settings.xml --file pom.xml - - - name: Ready the springboot artifacts - run: find -name '*.jar' -executable -type f -exec zip release.zip {} + - - - - name: Setup branch and GPG public key - run: | - # Strip git ref prefix from version - - echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV - echo ${{ env.GPG_TTY }} - sudo apt-get --yes install gnupg2 - gpg2 --import ./.github/keys/mosipgpgkey_pub.gpg - gpg2 --quiet --batch --passphrase=${{secrets.gpg_secret}} --allow-secret-key-import --import ./.github/keys/mosipgpgkey_sec.gpg - - - uses: actions/cache@v1 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven-${{ env.BRANCH_NAME }} - - name: Install xmllint - run: | - sudo apt-get update - sudo apt-get install libxml2-utils - - name: Setup the settings file for ossrh server - run: echo " ossrh ${{secrets.RELEASE_USER}} ${{secrets.RELEASE_TOKEN}} ossrh true gpg2 ${{secrets.gpg_secret}} allow-snapshots true snapshots-repo https://oss.sonatype.org/content/repositories/snapshots false true releases-repo https://oss.sonatype.org/service/local/staging/deploy/maven2 true false sonar . https://sonarcloud.io false " > $GITHUB_WORKSPACE/settings.xml - - -# - name: Analyze with SonarCloud -# run: | -# cd pre-registration-booking-service -# mvn -B verify sonar:sonar -Dsonar.projectKey=${{ secrets.PROJECT_KEY }} -Dsonar.organization=${{ secrets.ORG_KEY }} -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=${{ secrets.SONAR_TOKEN }} -# env: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - - - name: Build image - run: | - cd "./${{env.SERVICE_LOCATION}}" - docker build . --file Dockerfile --tag ${{ env.SERVICE_NAME }} - - - name: Log into registry - run: echo "${{ secrets.release_docker_hub }}" | docker login -u ${{ secrets.actor_docker_hub }} --password-stdin - - - name: Push image - run: | - IMAGE_ID=$NAMESPACE/$SERVICE_NAME - - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - VERSION=$BRANCH_NAME - echo "push version $VERSION" - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $SERVICE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION - - build-admin-ui: - runs-on: ubuntu-latest - env: - NAMESPACE: ${{ secrets. dev_namespace_docker_hub }} - SERVICE_NAME: admin-ui - SERVICE_LOCATION: admin-ui - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - - - name: npm install - run: cd ${{ env.SERVICE_LOCATION }} && npm install --ignore-scripts - - - name: npm build - run: cd ${{ env.SERVICE_LOCATION }} && npm run-script build -- --prod --base-href . --output-path=dist - - - name: setup environment - run: | - # Strip git ref prefix from version - echo "::set-env name=BRANCH_NAME::$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" - echo ${{ env.BRANCH_NAME }} - - - name: Build image - run: | - cd "./${{env.SERVICE_LOCATION}}" - docker build . --file Dockerfile --tag ${{ env.SERVICE_NAME }} - - - name: Log into registry - run: echo "${{ secrets.release_docker_hub }}" | docker login -u ${{ secrets.actor_docker_hub }} --password-stdin - - - name: Push image - run: | - IMAGE_ID=$NAMESPACE/$SERVICE_NAME - - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - VERSION=$BRANCH_NAME - echo "push version $VERSION" - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $SERVICE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION - -# This workflow contains a single job called "build" - build-pre-registration-ui: - - runs-on: ubuntu-latest - env: - NAMESPACE: ${{ secrets. dev_namespace_docker_hub }} - SERVICE_NAME: pre-registration-ui - SERVICE_LOCATION: pre-registration-ui - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - - - name: npm install - run: cd ${{ env.SERVICE_LOCATION }} && npm install --ignore-scripts - - - name: npm build - run: cd ${{ env.SERVICE_LOCATION }} && npm run-script build -- --prod --base-href . --output-path=dist - - - name: setup environment - run: | - # Strip git ref prefix from version - echo "::set-env name=BRANCH_NAME::$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" - echo ${{ env.BRANCH_NAME }} - - - name: Build image - run: | - cd "./${{env.SERVICE_LOCATION}}" - docker build . --file Dockerfile --tag ${{ env.SERVICE_NAME }} - - - name: Log into registry - run: echo "${{ secrets.release_docker_hub }}" | docker login -u ${{ secrets.actor_docker_hub }} --password-stdin - - - name: Push image - run: | - IMAGE_ID=$NAMESPACE/$SERVICE_NAME - - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - VERSION=$BRANCH_NAME - echo "push version $VERSION" - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $SERVICE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION - - build-demosdk: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 - with: - ref: ${{ github.ref }} - java-version: 1.8 - server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml - settings-path: ${{ github.workspace }} # location for the settings.xml file - - - name: Setup branch and GPG public key - run: | - # Strip git ref prefix from version - echo "::set-env name=BRANCH_NAME::$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" - echo ${{ env.BRANCH_NAME }} - echo "::set-env name=GPG_TTY::$(tty)" - echo ${{ env.GPG_TTY }} - sudo apt-get --yes install gnupg2 - gpg2 --import ./.github/keys/mosipgpgkey_pub.gpg - gpg2 --quiet --batch --passphrase=${{secrets.gpg_secret}} --allow-secret-key-import --import ./.github/keys/mosipgpgkey_sec.gpg - - - uses: actions/cache@v1 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven-${{ env.BRANCH_NAME }} - - - name: Setup the settings file for ossrh server - run: echo " ossrh ${{secrets.ossrh_user}} ${{secrets.ossrh_secret}} ossrh true gpg2 ${{secrets.gpg_secret}} allow-snapshots true snapshots-repo https://oss.sonatype.org/content/repositories/snapshots false true releases-repo https://oss.sonatype.org/service/local/staging/deploy/maven2 true false sonar . https://sonarcloud.io false " > $GITHUB_WORKSPACE/settings.xml - - - - name: Build with Maven - run: | - cd demosdk - mvn -B package -s $GITHUB_WORKSPACE/settings.xml --file pom.xml - - - name: Ready the springboot artifacts - run: find -name '*.jar' -executable -type f -exec zip release.zip {} + - - - name: Upload the springboot jars - uses: actions/upload-artifact@v1 - with: - name: release - path: ./release.zip - - build-authentication-ref-impl: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 - with: - ref: ${{ github.ref }} - java-version: 1.8 - server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml - settings-path: ${{ github.workspace }} # location for the settings.xml file - - - name: Setup branch and GPG public key - run: | - # Strip git ref prefix from version - echo "::set-env name=BRANCH_NAME::$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" - echo ${{ env.BRANCH_NAME }} - echo "::set-env name=GPG_TTY::$(tty)" - echo ${{ env.GPG_TTY }} - sudo apt-get --yes install gnupg2 - gpg2 --import ./.github/keys/mosipgpgkey_pub.gpg - gpg2 --quiet --batch --passphrase=${{secrets.gpg_secret}} --allow-secret-key-import --import ./.github/keys/mosipgpgkey_sec.gpg - - - uses: actions/cache@v1 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven-${{ env.BRANCH_NAME }} - - - name: Setup the settings file for ossrh server - run: echo " ossrh ${{secrets.ossrh_user}} ${{secrets.ossrh_secret}} ossrh true gpg2 ${{secrets.gpg_secret}} allow-snapshots true snapshots-repo https://oss.sonatype.org/content/repositories/snapshots false true releases-repo https://oss.sonatype.org/service/local/staging/deploy/maven2 true false sonar . https://sonarcloud.io false " > $GITHUB_WORKSPACE/settings.xml - - - - name: Build with Maven - run: | - cd authentication - mvn -B package -s $GITHUB_WORKSPACE/settings.xml --file pom.xml - - - name: Ready the springboot artifacts - run: find -name '*.jar' -executable -type f -exec zip release.zip {} + - - - name: Upload the springboot jars - uses: actions/upload-artifact@v1 - with: - name: release - path: ./release.zip - diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml new file mode 100644 index 00000000..73c55b03 --- /dev/null +++ b/.github/workflows/tag.yml @@ -0,0 +1,33 @@ +name: Tagging of repos + +on: + workflow_dispatch: + inputs: + TAG: + description: 'Tag to be published' + required: true + type: string + BODY: + description: 'Release body message' + required: true + default: 'Changes in this Release' + type: string + PRE_RELEASE: + description: 'Pre-release? True/False' + required: true + default: False + type: string + DRAFT: + description: 'Draft? True/False' + required: false + default: False + type: string + +jobs: + tag-branch: + uses: mosip/kattu/.github/workflows/tag.yml@master + with: + TAG: ${{ inputs.TAG }} + BODY: ${{ inputs.BODY }} + PRE_RELEASE: ${{ inputs.PRE_RELEASE }} + DRAFT: ${{ inputs.DRAFT }} \ No newline at end of file diff --git a/README.md b/README.md index c8930a51..78362833 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Admin Portal -[![Maven Package upon a push](https://github.com/mosip/keymanager/actions/workflows/push_trigger.yml/badge.svg?branch=release-1.2.0)](https://github.com/mosip/admin-ui/actions/workflows/push_trigger.yml) -[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?branch=release-1.2.0&project=mosip_admin-ui&metric=alert_status)](https://sonarcloud.io/dashboard?branch=release-1.2.0&id=mosip_admin-ui) +[![Maven Package upon a push](https://github.com/mosip/keymanager/actions/workflows/push_trigger.yml/badge.svg?branch=release-1.2.0.1)](https://github.com/mosip/admin-ui/actions/workflows/push_trigger.yml) +[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?branch=release-1.2.0.1&project=mosip_admin-ui&metric=alert_status)](https://sonarcloud.io/dashboard?branch=release-1.2.0.1&id=mosip_admin-ui) ## Overview See [overview and portal user guide](https://docs.mosip.io/1.2.0/modules/administration/admin-portal-user-guide). @@ -27,10 +27,9 @@ Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github. Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). -## Further help +## Further help To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). ## License This project is licensed under the terms of [Mozilla Public License 2.0](../LICENSE). - diff --git a/admin-ui/src/app/core/services/data-storage.service.ts b/admin-ui/src/app/core/services/data-storage.service.ts index 1c929316..a911a960 100644 --- a/admin-ui/src/app/core/services/data-storage.service.ts +++ b/admin-ui/src/app/core/services/data-storage.service.ts @@ -12,6 +12,8 @@ export class DataStorageService { private BASE_URL = this.appService.getConfig().baseUrl; + langIndependentTables : string[] = ['devicetypes','machinetypes','devicespecifications','machinespecifications','devices','machines']; + getI18NLanguageFiles(langCode:string){ return this.http.get(`./assets/i18n/${langCode}.json`); } @@ -261,6 +263,9 @@ export class DataStorageService { }else{ data.request["pageFetch"] = JSON.parse(this.appService.getConfig().filterValueMaxCount)["default"]; } + if(this.langIndependentTables.includes(type)){ + data.request["languageCode"] = 'all'; + } return this.http.post( this.BASE_URL + appConstants.MASTERDATA_BASE_URL + type + '/filtervalues', data diff --git a/admin-ui/src/app/core/services/document-category-mapping.service.ts b/admin-ui/src/app/core/services/document-category-mapping.service.ts index 84f63ffe..31b03989 100644 --- a/admin-ui/src/app/core/services/document-category-mapping.service.ts +++ b/admin-ui/src/app/core/services/document-category-mapping.service.ts @@ -2,6 +2,7 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { Observable, BehaviorSubject } from 'rxjs'; import { map } from 'rxjs/operators'; +import * as appConstants from '../../app.constants'; import { AppConfigService } from 'src/app/app-config.service'; import { URL } from 'src/app/app.constants'; @@ -30,7 +31,7 @@ export class DocumentCategoryMappingService { } getMappedDoc(code: string, lang: string): Observable { - return this.http.get(this.BASE_URL + 'masterdata/validdocuments/' + code +'/'+ lang).pipe(map(response => { + return this.http.get(this.BASE_URL + appConstants.MASTERDATA_BASE_URL +'validdocuments/' + code +'/'+ lang).pipe(map(response => { return response; })); } @@ -44,7 +45,7 @@ export class DocumentCategoryMappingService { updateMappedDoc(doccategorycode: string, doctypecode: string): Observable { return this.http.put( - this.BASE_URL + 'masterdata/validdocuments/map/' + doccategorycode + '/' + doctypecode, + this.BASE_URL + appConstants.MASTERDATA_BASE_URL +'validdocuments/map/' + doccategorycode + '/' + doctypecode, "" ); @@ -52,7 +53,7 @@ export class DocumentCategoryMappingService { updateUnMappeddoc(doccategorycode: string, doctypecode: string): Observable { return this.http.put( - this.BASE_URL + 'masterdata/validdocuments/unmap/' + doccategorycode + '/' + doctypecode, + this.BASE_URL + appConstants.MASTERDATA_BASE_URL +'validdocuments/unmap/' + doccategorycode + '/' + doctypecode, "" ); } diff --git a/admin-ui/src/app/core/services/logout.service.ts b/admin-ui/src/app/core/services/logout.service.ts index 7473677c..4c9bd943 100644 --- a/admin-ui/src/app/core/services/logout.service.ts +++ b/admin-ui/src/app/core/services/logout.service.ts @@ -22,24 +22,7 @@ export class LogoutService { ) {} logout() { - let adminUrl = this.appService.getConfig().adminUrl; - this.http - .delete(`${this.appService.getConfig().baseUrl}${this.appService.getConfig().logout}`, { - observe: 'response' - }) - .subscribe( - (res: HttpResponse>) => { - if (res.body.response.status === 'Success') { - this.redirectService.redirect( - window.location.origin + adminUrl - ); - } else { - window.alert(res.body.response.message); - } - }, - (error: HttpErrorResponse) => { - window.alert(error.message); - } - ); + //TODO: NEED TO CHECK THE IMPLEMENTATION LATER + window.location.href = `${this.appService.getConfig().baseUrl}${this.appService.getConfig().logout}?redirecturi=`+btoa(window.location.href); } } diff --git a/admin-ui/src/app/features/bulkupload/masterdataupload/create/create.component.css b/admin-ui/src/app/features/bulkupload/masterdataupload/create/create.component.css index 131222e1..dc182a28 100644 --- a/admin-ui/src/app/features/bulkupload/masterdataupload/create/create.component.css +++ b/admin-ui/src/app/features/bulkupload/masterdataupload/create/create.component.css @@ -1,51 +1,160 @@ /* No CSS *//*# sourceMappingURL=create.component.css.map */ .browseInput { - background: rgba(253, 81, 140, 1); - border: 1px solid rgba(253, 81, 140, 1); - color: white; - padding: 8px; - border-radius: 2px; - box-shadow: 0px 3px 1px -2px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%), 0px 1px 5px 0px rgb(0 0 0 / 12%); - margin-left: 6px; -} - -.browseInput[disabled] { - border: 1px solid rgba(253, 81, 140, 0.35); - color: rgba(253, 81, 140, 0.35); -} - -.custom-file-input{ - display: inline-block; - overflow: hidden; - position: relative; - padding:10px; -} -.custom-file-input input[type="file"]{ - width: 100%; - height: 100%; - opacity: 0; - filter: alpha(opacity=0); - zoom: 1; /* Fix for IE7 */ - position: absolute; - top: 0; - left: 0; - z-index: 999; -} -.custom-file-input input[type="text"]{ - border-bottom: 1px solid rgba(0, 0, 0, 0.42) ! important; - border: 0px; - height: 32px; - margin-left: 1px; - width: 22.5rem; -} -.custom-file-input input[type="text"].addredborder{ - border-bottom: 1px solid #f44336 ! important; - border: 0px; - height: 32px; - margin-left: 1px; - width: 22.5rem; -} -.mat-form-field{ - padding:10px; -} \ No newline at end of file + background: rgba(253, 81, 140, 1); + border: 1px solid rgba(253, 81, 140, 1); + color: white; + padding: 8px; + border-radius: 2px; + box-shadow: 0px 3px 1px -2px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%), 0px 1px 5px 0px rgb(0 0 0 / 12%); + margin-left: 6px; + } + + .browseInput[disabled] { + border: 1px solid rgba(253, 81, 140, 0.35); + color: rgba(253, 81, 140, 0.35); + } + + .custom-file-input{ + display: inline-block; + overflow: hidden; + position: relative; + padding:10px; + } + .custom-file-input input[type="file"]{ + width: 100%; + height: 100%; + opacity: 0; + filter: alpha(opacity=0); + zoom: 1; /* Fix for IE7 */ + position: absolute; + top: 0; + left: 0; + z-index: 999; + } + .custom-file-input input[type="text"]{ + border-bottom: 1px solid rgba(0, 0, 0, 0.42) ! important; + border: 0px; + height: 32px; + margin-left: 1px; + width: 22.5rem; + } + .custom-file-input input[type="text"].addredborder{ + border-bottom: 1px solid #f44336 ! important; + border: 0px; + height: 32px; + margin-left: 1px; + width: 22.5rem; + } + .mat-form-field{ + padding:10px; + } + .custom-file-input span{ + display:inline; + position:absolute; + padding-top: 9px; + } + + .fileuploadcontainer { + height: 105px; + padding: 2rem; + border: dashed 1px #FF4081; + background-color: #f1b5c9; + position: relative; + display: flex; + border-radius: 5px; + justify-content: center; + align-items: center; + overflow: hidden; + margin-left: 8px; + margin-top: 10px; + width:25%; + } + .fileuploadcontainer input { + opacity: 0; + position: absolute; + z-index: 2; + width: 100%; + height: 100%; + top: 0; + left: 0; + } + .fileuploadcontainer label { + color: #FF4081; + width: 148px; + height: 44px; + border-radius: 5px; + background: #FFFFFF; + padding: 10px; + border: 1px solid #CCCCCC; + /*display: flex;*/ + font-size: 12px; + font-weight: 200; + } + .fileuploadcontainer h3 { + font-size: 16px; + color: #FF4081; + padding-left: 3px; + padding-top: 7px; + font-weight: 600; + } + + .fileover { + animation: shake 1s; + animation-iteration-count: infinite; + } + .files-list { + margin-top: 1.5rem; + } + .files-list .single-file { + display: flex; + padding: 0.5rem; + justify-content: space-between; + align-items: center; + border: dashed 1px #FF4081; + margin-bottom: 1rem; + display: flex; + flex-grow: 1; + margin-left: 8px; + width:25%; + } + .files-list .single-file .preview { + display: flex; + margin-left: 0.5rem; + cursor: pointer; + align-self: flex-end; + } + .files-list .single-file .delete { + display: flex; + margin-left: 0.5rem; + cursor: pointer; + align-self: flex-end; + } + .files-list .single-file .name { + font-size: 14px; + font-weight: 500; + color: #353f4a; + margin: 0; + } + .files-list .single-file .size { + font-size: 12px; + font-weight: 500; + color: #a4a4a4; + margin: 0; + margin-bottom: 0.25rem; + } + .files-list .single-file .info { + width: 100%; + } + + .preview-heading{ + color: #505050; + font-weight: 600; + } + + .labelfileupload { + font-size: 12px; + font-weight: 500; + margin-left: 8px; + color: rgba(0, 0, 0, 0.54); + } \ No newline at end of file diff --git a/admin-ui/src/app/features/bulkupload/masterdataupload/create/create.component.html b/admin-ui/src/app/features/bulkupload/masterdataupload/create/create.component.html index fad55451..79da511f 100644 --- a/admin-ui/src/app/features/bulkupload/masterdataupload/create/create.component.html +++ b/admin-ui/src/app/features/bulkupload/masterdataupload/create/create.component.html @@ -19,7 +19,7 @@

{{labelanddatas.title |translate}}

{{labelanddatas.operation | translate }} {{labelanddatas.title |translate}} - {{'genericerror.fieldValidation' | translate}} + {{"genericerror.fieldValidation" | translate}}
- + {{labelanddatas.tableName | translate }} - + {{labelanddatas.title |translate}} {{'genericerror.fieldValidation' | translate}} - + +
-
+ + +
+ + +
+
+
+
+ + + + + + + + + + + +
+
+

{{uploadForm.controls.fileName.value}}

+
+
+
diff --git a/admin-ui/src/app/features/masterdata/document-category-mapping/document-category-mapping.component.ts b/admin-ui/src/app/features/masterdata/document-category-mapping/document-category-mapping.component.ts index 96e5cf15..fbfdced5 100644 --- a/admin-ui/src/app/features/masterdata/document-category-mapping/document-category-mapping.component.ts +++ b/admin-ui/src/app/features/masterdata/document-category-mapping/document-category-mapping.component.ts @@ -56,15 +56,16 @@ export class DocumentCategoryMappingComponent implements OnInit { }); this.docCategoryMapping.setMappedDoc(this.allDocCategoryList[0]); this.docCategoryMapping.currentMappedDocList.subscribe(response => { - this.docCategoryMapping.getMappedDoc(response.code, response.langCode).subscribe(async mappedDoc => { - if (mappedDoc && mappedDoc.response) { - await this.getUnMappedDoc(); - this.subtractingMappedDocFromUnMappedDoc(mappedDoc.response, this.unMappedDoc); - this.showSpinner = false; - } else { - this.mappedDocList = []; - this.unMappedDoc = []; - } + this.docCategoryMapping.getMappedDoc(response.code, response.langCode).subscribe(mappedDoc => { + if (mappedDoc && mappedDoc.response) { + this.getUnMappedDoc().then(() => { + this.subtractingMappedDocFromUnMappedDoc(mappedDoc.response, this.unMappedDoc); + this.showSpinner = false; + }); + } else { + this.mappedDocList = []; + this.unMappedDoc = []; + } }); }); } @@ -125,18 +126,19 @@ export class DocumentCategoryMappingComponent implements OnInit { this.selectedItem = item['code']; this.docCategoryMapping.setMappedDoc(item); this.docCategoryMapping.currentMappedDocList.subscribe(response => { - this.docCategoryMapping.getMappedDoc(response.code, response.langCode).subscribe(async data => { + this.docCategoryMapping.getMappedDoc(response.code, response.langCode).subscribe(data => { if (data && data.response && data.response.documents) { - await this.getUnMappedDoc(); - this.subtractingMappedDocFromUnMappedDoc(data.response.documents, this.unMappedDoc); - this.showSpinner = false; + this.getUnMappedDoc().then(() => { + this.subtractingMappedDocFromUnMappedDoc(data.response.documents, this.unMappedDoc); + this.showSpinner = false; + }); } }); }); } onClose(mappedItem: object, index: number) { - this.docCategoryMapping.updateUnMappeddoc(this.selectedItem, mappedItem['code']).subscribe(async data => { + this.docCategoryMapping.updateUnMappeddoc(this.selectedItem, mappedItem['code']).subscribe(data => { //console.log('Data', data); }); if (mappedItem && (index >= 0)) { @@ -150,7 +152,7 @@ export class DocumentCategoryMappingComponent implements OnInit { } onAdd(unMappedItem: object, index: number) { - this.docCategoryMapping.updateMappedDoc(this.selectedItem, unMappedItem['code']).subscribe(async data => { + this.docCategoryMapping.updateMappedDoc(this.selectedItem, unMappedItem['code']).subscribe(data => { //console.log('Data', data); }); if (unMappedItem && (index >= 0) ) { diff --git a/admin-ui/src/app/features/masterdata/list-view/list-view.component.ts b/admin-ui/src/app/features/masterdata/list-view/list-view.component.ts index f265f786..ad493b14 100644 --- a/admin-ui/src/app/features/masterdata/list-view/list-view.component.ts +++ b/admin-ui/src/app/features/masterdata/list-view/list-view.component.ts @@ -81,8 +81,8 @@ export class ListViewComponent implements OnDestroy { } } - loadBlacklistedWords() { - return new Promise(async (resolve, reject) => { + loadBlacklistedWords(): void { + new Promise(async (resolve, reject) => { const data = []; await this.getMasterDataTypeValues('all').then(response => { if (response['data']) { diff --git a/admin-ui/src/app/features/masterdata/single-view/single-view.component.ts b/admin-ui/src/app/features/masterdata/single-view/single-view.component.ts index c2391fb3..a5ec0a93 100644 --- a/admin-ui/src/app/features/masterdata/single-view/single-view.component.ts +++ b/admin-ui/src/app/features/masterdata/single-view/single-view.component.ts @@ -213,11 +213,11 @@ export class SingleViewComponent implements OnDestroy { disableClose: true }) .afterClosed() - .subscribe(() => + .subscribe(() => { this.router.navigateByUrl( `admin/masterdata/${this.masterdataType}/view` - ) - ); + ); + }); } changePage(location: string) { diff --git a/admin-ui/src/app/features/packet-status/packet-status/packet-status.component.html b/admin-ui/src/app/features/packet-status/packet-status/packet-status.component.html index f764fcd6..669230a0 100644 --- a/admin-ui/src/app/features/packet-status/packet-status/packet-status.component.html +++ b/admin-ui/src/app/features/packet-status/packet-status/packet-status.component.html @@ -14,19 +14,24 @@
+ - + + - + +
Packet Status Information
{{'packet-status.id' | translate}}{{data[0].registrationId}}{{'packet-status.id' | translate}}{{data[0].registrationId}}
{{'packet-status.status' | translate}}{{statusCheck}}{{'packet-status.status' | translate}}{{statusCheck}}
+ - - + + @@ -50,6 +55,10 @@

{{item.transactionTypeCode.replace("

Timeline
{{'packet-status.viewMore' | translate}}{{'packet-status.viewLess' | translate}} + {{'packet-status.viewMore' | translate}}{{'packet-status.viewLess' | translate}} keyboard_arrow_down keyboard_arrow_up
+ + + + diff --git a/admin-ui/src/app/features/packet-status/packet-status/packet-status.component.scss b/admin-ui/src/app/features/packet-status/packet-status/packet-status.component.scss index 316c109c..361bfa6e 100644 --- a/admin-ui/src/app/features/packet-status/packet-status/packet-status.component.scss +++ b/admin-ui/src/app/features/packet-status/packet-status/packet-status.component.scss @@ -174,4 +174,9 @@ h3 { font-size: 10.5px; +} + +caption { + font-size: 1.2em; + font-weight: bold; } \ No newline at end of file diff --git a/admin-ui/src/app/features/resources/center/create/create.component.html b/admin-ui/src/app/features/resources/center/create/create.component.html index 87b5bfe7..86cec76a 100644 --- a/admin-ui/src/app/features/resources/center/create/create.component.html +++ b/admin-ui/src/app/features/resources/center/create/create.component.html @@ -211,7 +211,9 @@

{{ "center.location-details" | translate }}

{{ fieldName }} + " + required + > {{ data.name }} @@ -522,4 +524,4 @@

{{ "center.operational-details" | translate }}

- \ No newline at end of file + diff --git a/admin-ui/src/app/features/resources/center/edit/edit.component.ts b/admin-ui/src/app/features/resources/center/edit/edit.component.ts index 509d41d3..1fae495c 100644 --- a/admin-ui/src/app/features/resources/center/edit/edit.component.ts +++ b/admin-ui/src/app/features/resources/center/edit/edit.component.ts @@ -462,9 +462,9 @@ export class EditComponent { disableClose: true }) .afterClosed() - .subscribe(() => + .subscribe(() => { this.router.navigateByUrl(`admin/resources/centers/view`) - ); + }); } handleChangeSecondaryLang = (fieldName: string) => { diff --git a/admin-ui/src/app/features/resources/devices/create/create.component.ts b/admin-ui/src/app/features/resources/devices/create/create.component.ts index 4fc09dfe..f798a0ac 100644 --- a/admin-ui/src/app/features/resources/devices/create/create.component.ts +++ b/admin-ui/src/app/features/resources/devices/create/create.component.ts @@ -330,7 +330,10 @@ export class CreateComponent{ case: 'MESSAGE' }, disableClose: true - }).afterClosed().subscribe(() => this.router.navigateByUrl('admin/resources/devices/view')); + }).afterClosed() + .subscribe(() => { + this.router.navigateByUrl('admin/resources/devices/view') + }); } setHeaderData() { @@ -581,8 +584,8 @@ export class CreateComponent{ disableClose: true }) .afterClosed() - .subscribe(() => + .subscribe(() => { this.router.navigateByUrl(`admin/resources/devices/view`) - ); + }); } } diff --git a/admin-ui/src/app/features/resources/machines/create/create.component.ts b/admin-ui/src/app/features/resources/machines/create/create.component.ts index eb29901c..a13ca63b 100644 --- a/admin-ui/src/app/features/resources/machines/create/create.component.ts +++ b/admin-ui/src/app/features/resources/machines/create/create.component.ts @@ -332,9 +332,9 @@ export class CreateComponent { disableClose: true, }) .afterClosed() - .subscribe(() => + .subscribe(() => { this.router.navigateByUrl('admin/resources/machine/view') - ); + }); } setPrimaryData() { @@ -596,8 +596,8 @@ export class CreateComponent { disableClose: true, }) .afterClosed() - .subscribe(() => + .subscribe(() => { this.router.navigateByUrl(`admin/resources/machines/view`) - ); + }); } } diff --git a/admin-ui/src/app/features/resources/users/create/create.component.scss b/admin-ui/src/app/features/resources/users/create/create.component.scss index e8fb49a2..e6ad12a8 100644 --- a/admin-ui/src/app/features/resources/users/create/create.component.scss +++ b/admin-ui/src/app/features/resources/users/create/create.component.scss @@ -1,5 +1,5 @@ p { - font-family: Lato; + font-family: "Lato", sans-serif; } .example-form-field { diff --git a/admin-ui/src/app/features/resources/users/create/create.component.ts b/admin-ui/src/app/features/resources/users/create/create.component.ts index aeb9fbc9..5ddc4de9 100644 --- a/admin-ui/src/app/features/resources/users/create/create.component.ts +++ b/admin-ui/src/app/features/resources/users/create/create.component.ts @@ -193,7 +193,10 @@ export class CreateComponent{ case: 'MESSAGE' }, disableClose: true - }).afterClosed().subscribe(() => this.router.navigateByUrl('admin/resources/devices/view')); + }).afterClosed() + .subscribe(() => { + this.router.navigateByUrl('admin/resources/devices/view') + }); } ngOnDestroy() { @@ -332,11 +335,7 @@ export class CreateComponent{ response => { if (response.response.data) { this.data = response.response.data; - if(url === "zoneuser"){ - this.primaryData = {userId:this.data[0].userId, zone:this.data[0].zoneCode, regCenterId:this.data[0].regCenterId, name: this.data[0].userName} - }else{ - this.primaryData = {userId:this.data[0].userId, zone:this.data[0].zoneCode, regCenterId:this.data[0].regCenterId, name: this.data[0].userName} - } + this.primaryData = {userId:this.data[0].userId, zone:this.data[0].zoneCode, regCenterId:this.data[0].regCenterId, name: this.data[0].userName}; this.initializeheader(); } else { let message = ""; diff --git a/admin-ui/src/app/shared/dialog/dialog.component.html b/admin-ui/src/app/shared/dialog/dialog.component.html index e0473b63..4468206d 100644 --- a/admin-ui/src/app/shared/dialog/dialog.component.html +++ b/admin-ui/src/app/shared/dialog/dialog.component.html @@ -5,6 +5,7 @@

{{ input.title[primaryLangCode] }}

Error Information
Error Message
{{errorMessage}}
+ "); + + int scenarioIndex = startingScenarioIndex; + int classIndex = 0; + for (ClassResult classResult : classResults) { + String cssClass = cssClassPrefix + ((classIndex % 2) == 0 ? "even" : "odd"); + + buffer.setLength(0); + int scenariosPerClass = 0; + int methodIndex = 0; + + for (MethodResult methodResult : classResult.getMethodResults()) { + List results = methodResult.getResults(); + int resultsCount = results.size(); + assert resultsCount > 0; + ITestResult firstResult = results.iterator().next(); + String methodName=firstResult.getName(); + // Write the remaining scenarios for the method + + for (int i = 0; i < resultsCount; i++) { + + ITestResult result = results.get(i); + // String [] scenarioDetails = getScenarioDetails(result); + + // String scenarioName = Utils.escapeHtml("Scenario_" + scenarioDetails[0]); + // String scenarioDescription = Utils.escapeHtml(scenarioDetails[1]); + + long scenarioStart = result.getStartMillis(); + long scenarioDuration = result.getEndMillis() - scenarioStart; + +// buffer.append("").append("") +// .append("") +// .append(""); + buffer.append("") // Start of table row with a specified CSS class + .append("") // Table cell with a hyperlink + .append(""); // Table cell with scenario duration + + scenarioIndex++; + } + scenariosPerClass += resultsCount; + methodIndex++; + } + + // Write the test results for the class + writer.print(buffer); + classIndex++; + } + scenarioCount = scenarioIndex - startingScenarioIndex; + } + return scenarioCount; + } + + + + /** + * Writes the details for all test scenarios. + */ + protected void writeScenarioDetails() { + int scenarioIndex = 0; + for (SuiteResult suiteResult : suiteResults) { + for (TestResult testResult : suiteResult.getTestResults()) { + /* + * writer.print("

"); + * writer.print(Utils.escapeHtml(testResult.getTestName())); + * writer.print("

"); + */ + + scenarioIndex += writeScenarioDetails(testResult.getFailedConfigurationResults(), scenarioIndex); + scenarioIndex += writeScenarioDetails(testResult.getFailedTestResults(), scenarioIndex); + scenarioIndex += writeScenarioDetails(testResult.getSkippedConfigurationResults(), scenarioIndex); + scenarioIndex += writeScenarioDetails(testResult.getSkippedTestResults(), scenarioIndex); + // scenarioIndex += writeScenarioDetails(testResult.getPassedTestResults(), scenarioIndex); + } + } + } + + /** + * Writes the scenario details for the results of a given state for a single + * test. + */ + private int writeScenarioDetails(List classResults, int startingScenarioIndex) { + int scenarioIndex = startingScenarioIndex; + for (ClassResult classResult : classResults) { + String className = classResult.getClassName(); + for (MethodResult methodResult : classResult.getMethodResults()) { + List results = methodResult.getResults(); + assert !results.isEmpty(); + // ITestResult firstResult = results.iterator().next(); + // String methodName=firstResult.getName(); + String label = Utils + .escapeHtml(className + "#" + results.iterator().next().getMethod().getMethodName()); + for (ITestResult result : results) { + writeScenario(scenarioIndex, label, result); + scenarioIndex++; + } + } + } + + return scenarioIndex - startingScenarioIndex; + } + + /** + * Writes the details for an individual test scenario. + */ + private void writeScenario(int scenarioIndex, String label, ITestResult result) { + writer.print("

"); + writer.print(label); + writer.print("

"); + + writer.print("
Missing Data Table
"); + writer.print(description); + writer.print("
").append(scenarioName).append("").append(scenarioDescription).append("").append(scenarioDuration).append("
").append(methodName).append("").append(scenarioDuration).append("
"); + + // Write test parameters (if any) + Object[] parameters = result.getParameters(); + int parameterCount = (parameters == null ? 0 : parameters.length); + + /* + * if (parameterCount > 0) { writer.print(""); for (int i = + * 1; i <= parameterCount; i++) { writer.print(""); } + * writer.print(""); for (Object parameter : + * parameters) { writer.print(""); } writer.print(""); } + */ + + // Write reporter messages (if any) + List reporterMessages = Reporter.getOutput(result); + if (!reporterMessages.isEmpty()) { + writer.print(""); + } + + // Write exception (if any) + Throwable throwable = result.getThrowable(); + if (throwable != null) { + writer.print(""); + writer.print(""); + } + + writer.print("
Parameter #"); + * writer.print(i); writer.print("
"); + * writer.print(Utils.escapeHtml(Utils.toString(parameter))); + * writer.print("
"); + writeReporterMessages(reporterMessages); + writer.print("
" + + (result.getStatus() == ITestResult.SUCCESS ? "Expected Exception" : "Exception") + "
"); + writeStackTrace(throwable); + writer.print("
"); + writer.print("

back to summary

"); + } + + protected void writeReporterMessages(List reporterMessages) { + writer.print("
"); + Iterator iterator = reporterMessages.iterator(); + assert iterator.hasNext(); + if (Reporter.getEscapeHtml()) { + writer.print(Utils.escapeHtml(iterator.next())); + } else { + writer.print(iterator.next()); + } + while (iterator.hasNext()) { + writer.print("
"); + if (Reporter.getEscapeHtml()) { + writer.print(Utils.escapeHtml(iterator.next())); + } else { + writer.print(iterator.next()); + } + } + writer.print("
"); + } + + protected void writeStackTrace(Throwable throwable) { + writer.print("
"); + writer.print(Utils.shortStackTrace(throwable, true)); + writer.print("
"); + } + + /** + * Writes a TH element with the specified contents and CSS class names. + * + * @param html the HTML contents + * @param cssClasses the space-delimited CSS classes or null if there are no + * classes to apply + */ + protected void writeTableHeader(String html, String cssClasses) { + writeTag("th", html, cssClasses); + } + + /** + * Writes a TD element with the specified contents. + * + * @param html the HTML contents + */ + protected void writeTableData(String html) { + writeTableData(html, null); + } + + /** + * Writes a TD element with the specified contents and CSS class names. + * + * @param html the HTML contents + * @param cssClasses the space-delimited CSS classes or null if there are no + * classes to apply + */ + protected void writeTableData(String html, String cssClasses) { + writeTag("td", html, cssClasses); + } + + /** + * Writes an arbitrary HTML element with the specified contents and CSS class + * names. + * + * @param tag the tag name + * @param html the HTML contents + * @param cssClasses the space-delimited CSS classes or null if there are no + * classes to apply + */ + protected void writeTag(String tag, String html, String cssClasses) { + writer.print("<"); + writer.print(tag); + if (cssClasses != null) { + writer.print(" class=\""); + writer.print(cssClasses); + writer.print("\""); + } + writer.print(">"); + writer.print(html); + writer.print(""); + } + + /** + * Groups {@link TestResult}s by suite. + */ + protected static class SuiteResult { + private final String suiteName; + private final List testResults = Lists.newArrayList(); + + public SuiteResult(ISuite suite) { + suiteName = suite.getName(); + for (ISuiteResult suiteResult : suite.getResults().values()) { + testResults.add(new TestResult(suiteResult.getTestContext())); + } + } + + public String getSuiteName() { + return suiteName; + } + + /** + * @return the test results (possibly empty) + */ + public List getTestResults() { + return testResults; + } + } + + /** + * Groups {@link ClassResult}s by test, type (configuration or test), and + * status. + */ + protected static class TestResult { + /** + * Orders test results by class name and then by method name (in lexicographic + * order). + */ + protected static final Comparator RESULT_COMPARATOR = new Comparator() { + @Override + public int compare(ITestResult o1, ITestResult o2) { + int result = o1.getTestClass().getName().compareTo(o2.getTestClass().getName()); + if (result == 0) { + result = o1.getMethod().getMethodName().compareTo(o2.getMethod().getMethodName()); + } + return result; + } + }; + + private final String testName; + private final List failedConfigurationResults; + private final List failedTestResults; + private final List skippedConfigurationResults; + private final List skippedTestResults; + private final List passedTestResults; + private final int failedTestCount; + private final int skippedTestCount; + private final int passedTestCount; + private final long duration; + private final String includedGroups; + private final String excludedGroups; + + public TestResult(ITestContext context) { + testName = context.getName(); + + Set failedConfigurations = context.getFailedConfigurations().getAllResults(); + Set failedTests = context.getFailedTests().getAllResults(); + Set skippedConfigurations = context.getSkippedConfigurations().getAllResults(); + Set skippedTests = context.getSkippedTests().getAllResults(); + Set passedTests = context.getPassedTests().getAllResults(); + + failedConfigurationResults = groupResults(failedConfigurations); + failedTestResults = groupResults(failedTests); + skippedConfigurationResults = groupResults(skippedConfigurations); + skippedTestResults = groupResults(skippedTests); + passedTestResults = groupResults(passedTests); + + failedTestCount = failedTests.size(); + skippedTestCount = skippedTests.size(); + passedTestCount = passedTests.size(); + + duration = context.getEndDate().getTime() - context.getStartDate().getTime(); + + includedGroups = formatGroups(context.getIncludedGroups()); + excludedGroups = formatGroups(context.getExcludedGroups()); + } + + /** + * Groups test results by method and then by class. + */ + protected List groupResults(Set results) { + List classResults = Lists.newArrayList(); + if (!results.isEmpty()) { + List resultsPerClass = Lists.newArrayList(); + List resultsPerMethod = Lists.newArrayList(); + + List resultsList = Lists.newArrayList(results); + Collections.sort(resultsList, RESULT_COMPARATOR); + Iterator resultsIterator = resultsList.iterator(); + assert resultsIterator.hasNext(); + + ITestResult result = resultsIterator.next(); + resultsPerMethod.add(result); + + String previousClassName = result.getTestClass().getName(); + String previousMethodName = result.getMethod().getMethodName(); + while (resultsIterator.hasNext()) { + result = resultsIterator.next(); + + String className = result.getTestClass().getName(); + if (!previousClassName.equals(className)) { + // Different class implies different method + assert !resultsPerMethod.isEmpty(); + resultsPerClass.add(new MethodResult(resultsPerMethod)); + resultsPerMethod = Lists.newArrayList(); + + assert !resultsPerClass.isEmpty(); + classResults.add(new ClassResult(previousClassName, resultsPerClass)); + resultsPerClass = Lists.newArrayList(); + + previousClassName = className; + previousMethodName = result.getMethod().getMethodName(); + } else { + String methodName = result.getMethod().getMethodName(); + if (!previousMethodName.equals(methodName)) { + assert !resultsPerMethod.isEmpty(); + resultsPerClass.add(new MethodResult(resultsPerMethod)); + resultsPerMethod = Lists.newArrayList(); + + previousMethodName = methodName; + } + } + resultsPerMethod.add(result); + } + assert !resultsPerMethod.isEmpty(); + resultsPerClass.add(new MethodResult(resultsPerMethod)); + assert !resultsPerClass.isEmpty(); + classResults.add(new ClassResult(previousClassName, resultsPerClass)); + } + return classResults; + } + + public String getTestName() { + return testName; + } + + /** + * @return the results for failed configurations (possibly empty) + */ + public List getFailedConfigurationResults() { + return failedConfigurationResults; + } + + /** + * @return the results for failed tests (possibly empty) + */ + public List getFailedTestResults() { + return failedTestResults; + } + + /** + * @return the results for skipped configurations (possibly empty) + */ + public List getSkippedConfigurationResults() { + return skippedConfigurationResults; + } + + /** + * @return the results for skipped tests (possibly empty) + */ + public List getSkippedTestResults() { + return skippedTestResults; + } + + /** + * @return the results for passed tests (possibly empty) + */ + public List getPassedTestResults() { + return passedTestResults; + } + + public int getFailedTestCount() { + return failedTestCount; + } + + public int getSkippedTestCount() { + return skippedTestCount; + } + + public int getPassedTestCount() { + return passedTestCount; + } + + public long getDuration() { + return duration; + } + + public String getIncludedGroups() { + return includedGroups; + } + + public String getExcludedGroups() { + return excludedGroups; + } + + /** + * Formats an array of groups for display. + */ + protected String formatGroups(String[] groups) { + if (groups.length == 0) { + return ""; + } + + StringBuilder builder = new StringBuilder(); + builder.append(groups[0]); + for (int i = 1; i < groups.length; i++) { + builder.append(", ").append(groups[i]); + } + return builder.toString(); + } + } + + /** + * Groups {@link MethodResult}s by class. + */ + protected static class ClassResult { + private final String className; + private final List methodResults; + + /** + * @param className the class name + * @param methodResults the non-null, non-empty {@link MethodResult} list + */ + public ClassResult(String className, List methodResults) { + this.className = className; + this.methodResults = methodResults; + } + + public String getClassName() { + return className; + } + + /** + * @return the non-null, non-empty {@link MethodResult} list + */ + public List getMethodResults() { + return methodResults; + } + } + + /** + * Groups test results by method. + */ + protected static class MethodResult { + private final List results; + + /** + * @param results the non-null, non-empty result list + */ + public MethodResult(List results) { + this.results = results; + } + + /** + * @return the non-null, non-empty result list + */ + public List getResults() { + return results; + } + } + +} diff --git a/admintest/src/main/java/io/mosip/testrig/adminui/utility/ExtentReportManager.java b/admintest/src/main/java/io/mosip/testrig/adminui/utility/ExtentReportManager.java new file mode 100644 index 00000000..975142b2 --- /dev/null +++ b/admintest/src/main/java/io/mosip/testrig/adminui/utility/ExtentReportManager.java @@ -0,0 +1,26 @@ +package io.mosip.testrig.adminui.utility; + +import com.aventstack.extentreports.ExtentReports; +import com.aventstack.extentreports.ExtentTest; + +import com.aventstack.extentreports.reporter.ExtentSparkReporter; + +public class ExtentReportManager extends BaseClass { + public static ExtentSparkReporter html; + public static ExtentReports extent; + public static String Filepath; + //public static WebDriver driver; + public static ExtentTest test; + public static ExtentReports getReports() { + if(extent==null) { + extent=new ExtentReports(); + extent=new ExtentReports(); + Filepath=System.getProperty("user.dir")+"/extent_reports/"+"admin-ui-report-"+Commons.appendDate+".html"; + html=new ExtentSparkReporter(Filepath); + extent.attachReporter(html); + } + + return extent; + + } +} diff --git a/admintest/src/main/java/io/mosip/test/admintest/utility/JsonUtil.java b/admintest/src/main/java/io/mosip/testrig/adminui/utility/JsonUtil.java similarity index 78% rename from admintest/src/main/java/io/mosip/test/admintest/utility/JsonUtil.java rename to admintest/src/main/java/io/mosip/testrig/adminui/utility/JsonUtil.java index 7d14fdbe..3bae1119 100644 --- a/admintest/src/main/java/io/mosip/test/admintest/utility/JsonUtil.java +++ b/admintest/src/main/java/io/mosip/testrig/adminui/utility/JsonUtil.java @@ -1,9 +1,10 @@ -package io.mosip.test.admintest.utility; +package io.mosip.testrig.adminui.utility; import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; +import io.mosip.testrig.adminui.kernel.util.ConfigManager; import org.apache.commons.io.IOUtils; import java.io.File; @@ -56,26 +57,28 @@ public static T convertJsonintoJava(String jsonString, Class cls) { return payload; } - public static String JsonObjSimpleParsing(String jsonIdentity, String idfield) - throws Exception { - String val =null; - JSONObject json = new JSONObject(jsonIdentity); + - JSONObject identity = json.getJSONObject("identity"); +public static String JsonObjArrayListParsing2(String a) throws Exception { + - JSONArray identityitems = identity.getJSONArray(idfield); + JSONArray jsonArray = new JSONArray(a); - for (int i = 0, size = identityitems.length(); i < size; i++) { - JSONObject idItem = identityitems.getJSONObject(i); - String lang = idItem.getString("language"); - val = idItem.getString("value"); - if (lang.equalsIgnoreCase(JsonUtil.JsonObjParsing(Commons.getTestData(),"loginlang"))) - return val; - } - return "sin"; - } - + + for (int i = 0, size = jsonArray.length(); i < size; i++) { + JSONObject idItem = jsonArray.getJSONObject(i); + String lang = idItem.getString("language"); + String val = idItem.getString("value"); + if (lang.equals(ConfigManager.getloginlang())) { + return val; + } + + } + return ""; + + + } /** * Direct String * @@ -124,15 +127,22 @@ public static List JsonObjArrayListParsing(String jsonIdentity, String i public static String readJsonFileText(String document) { String jsonTxt = null; + File f=null; try { - File f = new File(System.getProperty("user.dir") + "\\"+document); + if (TestRunner.checkRunType().equalsIgnoreCase("JAR")) { + f = new File(TestRunner.getResourcePath() + "/" +document); + } else if (TestRunner.checkRunType().equalsIgnoreCase("IDE")) { + + + f = new File(System.getProperty("user.dir") + System.getProperty("path.config")+ "/"+document); + } if (f.exists()) { InputStream is = new FileInputStream(f); jsonTxt = IOUtils.toString(is, "UTF-8"); - System.out.println(jsonTxt); + logger.info(jsonTxt); logger.info("readJsonFileText"); } } catch (Exception e) { diff --git a/admintest/src/main/java/io/mosip/test/admintest/utility/PropertiesUtil.java b/admintest/src/main/java/io/mosip/testrig/adminui/utility/PropertiesUtil.java similarity index 78% rename from admintest/src/main/java/io/mosip/test/admintest/utility/PropertiesUtil.java rename to admintest/src/main/java/io/mosip/testrig/adminui/utility/PropertiesUtil.java index 36bc43f5..ab61e310 100644 --- a/admintest/src/main/java/io/mosip/test/admintest/utility/PropertiesUtil.java +++ b/admintest/src/main/java/io/mosip/testrig/adminui/utility/PropertiesUtil.java @@ -1,13 +1,16 @@ -package io.mosip.test.admintest.utility; +package io.mosip.testrig.adminui.utility; import java.io.*; import java.util.Properties; +import org.apache.log4j.Logger; + public class PropertiesUtil { - // private static final Logger logger = LogManager.getLogger(PropertiesUtil.class); + private static final Logger logger = Logger.getLogger(PropertiesUtil.class); + public static String getKeyValue(String key) throws IOException { @@ -27,7 +30,7 @@ public static String getKeyValue(String key) throws IOException { public static void main(String[] args) throws IOException { String value = getKeyValue("PropertyFilePath"); - System.out.println(value); + logger.info(value); } } diff --git a/admintest/src/main/java/io/mosip/testrig/adminui/utility/Screenshot.java b/admintest/src/main/java/io/mosip/testrig/adminui/utility/Screenshot.java new file mode 100644 index 00000000..3d7573d6 --- /dev/null +++ b/admintest/src/main/java/io/mosip/testrig/adminui/utility/Screenshot.java @@ -0,0 +1,55 @@ +package io.mosip.testrig.adminui.utility; + +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.util.Base64; + +import org.apache.commons.io.IOUtils; +import org.openqa.selenium.OutputType; +import org.openqa.selenium.TakesScreenshot; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.io.FileHandler; + +//import com.aspose.cells.Workbook; +import com.aventstack.extentreports.ExtentTest; + + + +public class Screenshot { + + public static String ClickScreenshot(WebDriver driver) throws IOException { + TakesScreenshot ss=(TakesScreenshot)driver; + File so=ss.getScreenshotAs(OutputType.FILE); + String path=null; + path = TestRunner.getResourcePath()+ "/Screenshots/"+System.currentTimeMillis()+".png"; + File des=new File(path); + FileHandler.copy(so, des); + FileInputStream fis=new FileInputStream(path); + byte[] bytes =IOUtils.toByteArray(fis); + String base64img=Base64.getEncoder().encodeToString(bytes); + + + return base64img; + + } + // public static String Attachfile(ExtentTest test,String n) { + // try { + // String up="C:\\Users\\jayesh.kharode\\Downloads\\"+n+".csv"; + // Workbook workbook = new Workbook(up); + // String path=System.getProperty("user.dir")+"/Export/"+System.currentTimeMillis()+".png"; + // workbook.save(path); + // FileInputStream fis=new FileInputStream(path); + // byte[] bytes =IOUtils.toByteArray(fis); + // String base64img=Base64.getEncoder().encodeToString(bytes); + // return base64img; + // + // }catch(Exception e) { + // test.fail(e.getMessage()); + // } + // + // return null; + // + // } + // +} diff --git a/admintest/src/main/java/io/mosip/test/admintest/utility/SetTestName.java b/admintest/src/main/java/io/mosip/testrig/adminui/utility/SetTestName.java similarity index 81% rename from admintest/src/main/java/io/mosip/test/admintest/utility/SetTestName.java rename to admintest/src/main/java/io/mosip/testrig/adminui/utility/SetTestName.java index abbaf819..8681aad4 100644 --- a/admintest/src/main/java/io/mosip/test/admintest/utility/SetTestName.java +++ b/admintest/src/main/java/io/mosip/testrig/adminui/utility/SetTestName.java @@ -1,4 +1,4 @@ -package io.mosip.test.admintest.utility; +package io.mosip.testrig.adminui.utility; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/admintest/src/main/java/io/mosip/testrig/adminui/utility/TestRunner.java b/admintest/src/main/java/io/mosip/testrig/adminui/utility/TestRunner.java new file mode 100644 index 00000000..5564039f --- /dev/null +++ b/admintest/src/main/java/io/mosip/testrig/adminui/utility/TestRunner.java @@ -0,0 +1,206 @@ +package io.mosip.testrig.adminui.utility; + +import java.io.File; +import java.util.ArrayList; +import java.util.List; + +import org.apache.log4j.Logger; +import org.testng.TestListenerAdapter; +import org.testng.TestNG; +import org.testng.xml.XmlClass; +import org.testng.xml.XmlSuite; +import org.testng.xml.XmlTest; + +import io.mosip.testrig.adminui.dbaccess.DBManager; +import io.mosip.testrig.adminui.fw.util.AdminTestUtil; +import io.mosip.testrig.adminui.kernel.util.ConfigManager; +import io.mosip.testrig.adminui.testcase.*; + + +public class TestRunner { + private static final Logger logger = Logger.getLogger(TestRunner.class); + static TestListenerAdapter tla = new TestListenerAdapter(); + + public static String jarUrl = TestRunner.class.getProtectionDomain().getCodeSource().getLocation().getPath(); + public static String uin=""; + public static String perpetualVid=""; + public static String onetimeuseVid=""; + public static String temporaryVid=""; + + static TestNG testNg; + + public static void main(String[] args) throws Exception { + + AdminTestUtil.initialize(); + DBManager.clearMasterDbData(); + startTestRunner(); + + } + + + public static void startTestRunner() throws Exception { + File homeDir = null; + TestNG runner = new TestNG(); + if(!ConfigManager.gettestcases().equals("")) { + XmlSuite suite = new XmlSuite(); + suite.setName("MySuite"); + suite.addListener("io.mosip.testrig.adminui.utility.EmailableReport"); + XmlClass blocklistedwordsCRUD = new XmlClass("io.mosip.testrig.adminui.testcase.BlockListTest"); + XmlClass bulkUploadCRUD = new XmlClass("io.mosip.testrig.adminui.testcase.BulkUploadTest"); + XmlClass centerCRUD = new XmlClass("io.mosip.testrig.adminui.testcase.CenterTest"); + XmlClass centerTypeCRUD = new XmlClass("io.mosip.testrig.adminui.testcase.CenterTypeTest"); + XmlClass deviceSpecCRUD = new XmlClass("io.mosip.testrig.adminui.testcase.DeviceSpecificationTest"); + XmlClass deviceCRUD = new XmlClass("io.mosip.testrig.adminui.testcase.DeviceTest"); + XmlClass deviceTypesCRUD = new XmlClass("io.mosip.testrig.adminui.testcase.DeviceTypesTest"); + XmlClass documentCategoriesCRUD = new XmlClass("io.mosip.testrig.adminui.testcase.DocumentCategoriesTest"); + XmlClass documentTypesCRUD = new XmlClass("io.mosip.testrig.adminui.testcase.DocumentTypes"); + XmlClass dynamicFieldCRUD = new XmlClass("io.mosip.testrig.adminui.testcase.DynamicFieldTest"); + XmlClass holidaysCRUD = new XmlClass("io.mosip.testrig.adminui.testcase.HolidaysTest"); + XmlClass machineSpecCRUD = new XmlClass("io.mosip.testrig.adminui.testcase.MachineSpecificationTest"); + XmlClass machineCRUD= new XmlClass("io.mosip.testrig.adminui.testcase.MachineTest"); + XmlClass machineTypesCRUD = new XmlClass("io.mosip.testrig.adminui.testcase.MachineTypesTest"); + XmlClass templateCRUD = new XmlClass("io.mosip.testrig.adminui.testcase.TemplateTest"); + + List classes = new ArrayList<>(); + String[] Scenarioname=ConfigManager.gettestcases().split(","); + for(String test:Scenarioname) { + if(test.equals("blocklistedwordsCRUD")) + classes.add(blocklistedwordsCRUD); + + if(test.equals("bulkUploadCRUD")) + classes.add(bulkUploadCRUD); + + if(test.equals("centerCRUD")) + classes.add(centerCRUD); + + if(test.equals("centerTypeCRUD")) + classes.add(centerTypeCRUD); + + if(test.equals("deviceSpecCRUD")) + classes.add(deviceSpecCRUD); + + if(test.equals("deviceCRUD")) + classes.add(deviceCRUD); + + if(test.equals("deviceTypesCRUD")) + classes.add(deviceTypesCRUD); + + if(test.equals("documentCategoriesCRUD")) + classes.add(documentCategoriesCRUD); + + if(test.equals("documentTypesCRUD")) + classes.add(documentTypesCRUD); + + if(test.equals("dynamicFieldCRUD")) + classes.add(dynamicFieldCRUD); + + if(test.equals("holidaysCRUD")) + classes.add(holidaysCRUD); + + if(test.equals("machineSpecCRUD")) + classes.add(machineSpecCRUD); + + if(test.equals("machineCRUD")) + classes.add(machineCRUD); + + if(test.equals("machineTypesCRUD")) + classes.add(machineTypesCRUD); + + if(test.equals("templateCRUD")) + classes.add(templateCRUD); + + } + + + XmlTest test = new XmlTest(suite); + test.setName("MyTest"); + test.setXmlClasses(classes); + + List suites = new ArrayList<>(); + suites.add(suite); + + runner.setXmlSuites(suites); + + }else { + List suitefiles = new ArrayList(); + String os = System.getProperty("os.name"); + if (checkRunType().contains("IDE") || os.toLowerCase().contains("windows") == true) { + homeDir = new File(getResourcePath() + "/testngFile"); + + } else { + homeDir = new File(getResourcePath() + "/testngFile"); + + } + + for (File file : homeDir.listFiles()) { + if (file.getName().toLowerCase() != null) { + suitefiles.add(file.getAbsolutePath()); + } + } + + runner.setTestSuites(suitefiles); + + + } + // Set other properties and run TestNG + System.getProperties().setProperty("testng.outpur.dir", "testng-report"); + runner.setOutputDirectory("testng-report"); + System.getProperties().setProperty("emailable.report2.name", "ADMINUI-" + BaseTestCaseFunc.environment + + "-run-" + System.currentTimeMillis() + "-report.html"); + + runner.run(); + + DBManager.clearMasterDbData(); + System.exit(0); + } + + + + public static String getGlobalResourcePath() { + if (checkRunType().equalsIgnoreCase("JAR")) { + return new File(jarUrl).getParentFile().getAbsolutePath().toString(); + } else if (checkRunType().equalsIgnoreCase("IDE")) { + String path = new File(TestRunner.class.getClassLoader().getResource("").getPath()).getAbsolutePath() + .toString(); + if (path.contains("test-classes")) + path = path.replace("test-classes", "classes"); + return path; + } + return "Global Resource File Path Not Found"; + } + + public static String getResourcePath() { + if (checkRunType().equalsIgnoreCase("JAR")) { + return new File(jarUrl).getParentFile().getAbsolutePath().toString()+"/resources/"; + } else if (checkRunType().equalsIgnoreCase("IDE")) { + String path = System.getProperty("user.dir") + System.getProperty("path.config"); + + // String path = new File(TestRunner.class.getClassLoader().getResource("").getPath()).getAbsolutePath() + // .toString(); + if (path.contains("test-classes")) + path = path.replace("test-classes", "classes"); + return path; + } + return "Global Resource File Path Not Found"; + } + + public static String checkRunType() { + if (TestRunner.class.getResource("TestRunner.class").getPath().toString().contains(".jar")) + return "JAR"; + else + return "IDE"; + } + public static String GetKernalFilename(){ + String path = System.getProperty("env.user"); + String kernalpath=null; + if(System.getProperty("env.user")==null || System.getProperty("env.user").equals("")) { + kernalpath="Kernel.properties"; + + }else { + kernalpath="Kernel_"+path+".properties"; + } + return kernalpath; + } + + +} diff --git a/admintest/src/main/java/io/mosip/testrig/adminui/utility/pojo/Cc.java b/admintest/src/main/java/io/mosip/testrig/adminui/utility/pojo/Cc.java new file mode 100644 index 00000000..35212150 --- /dev/null +++ b/admintest/src/main/java/io/mosip/testrig/adminui/utility/pojo/Cc.java @@ -0,0 +1,9 @@ +package io.mosip.testrig.adminui.utility.pojo; + +import java.util.ArrayList; + +public class Cc{ + public ArrayList value; + public String html; + public String text; + } \ No newline at end of file diff --git a/admintest/src/main/java/io/mosip/testrig/adminui/utility/pojo/From.java b/admintest/src/main/java/io/mosip/testrig/adminui/utility/pojo/From.java new file mode 100644 index 00000000..3ae553b4 --- /dev/null +++ b/admintest/src/main/java/io/mosip/testrig/adminui/utility/pojo/From.java @@ -0,0 +1,9 @@ +package io.mosip.testrig.adminui.utility.pojo; + +import java.util.ArrayList; + +public class From{ + public ArrayList value; + public String html; + public String text; + } \ No newline at end of file diff --git a/admintest/src/main/java/io/mosip/testrig/adminui/utility/pojo/HeaderLine.java b/admintest/src/main/java/io/mosip/testrig/adminui/utility/pojo/HeaderLine.java new file mode 100644 index 00000000..fbc82d1a --- /dev/null +++ b/admintest/src/main/java/io/mosip/testrig/adminui/utility/pojo/HeaderLine.java @@ -0,0 +1,6 @@ +package io.mosip.testrig.adminui.utility.pojo; + +public class HeaderLine{ + public String key; + public String line; + } \ No newline at end of file diff --git a/admintest/src/main/java/io/mosip/testrig/adminui/utility/pojo/Headers.java b/admintest/src/main/java/io/mosip/testrig/adminui/utility/pojo/Headers.java new file mode 100644 index 00000000..311dad95 --- /dev/null +++ b/admintest/src/main/java/io/mosip/testrig/adminui/utility/pojo/Headers.java @@ -0,0 +1,4 @@ +package io.mosip.testrig.adminui.utility.pojo; + +public class Headers{ +} \ No newline at end of file diff --git a/admintest/src/main/java/io/mosip/testrig/adminui/utility/pojo/Root.java b/admintest/src/main/java/io/mosip/testrig/adminui/utility/pojo/Root.java new file mode 100644 index 00000000..111586b3 --- /dev/null +++ b/admintest/src/main/java/io/mosip/testrig/adminui/utility/pojo/Root.java @@ -0,0 +1,19 @@ +package io.mosip.testrig.adminui.utility.pojo; + +import java.util.ArrayList; +import java.util.Date; + +public class Root{ + public ArrayList attachments; + public Headers headers; + public ArrayList headerLines; + public String html; + public String subject; + public Date date; + // @JsonProperty("to") + public To to; + public From from; + public Cc cc; + public String messageId; + public String type; + } \ No newline at end of file diff --git a/admintest/src/main/java/io/mosip/testrig/adminui/utility/pojo/To.java b/admintest/src/main/java/io/mosip/testrig/adminui/utility/pojo/To.java new file mode 100644 index 00000000..845a2cbb --- /dev/null +++ b/admintest/src/main/java/io/mosip/testrig/adminui/utility/pojo/To.java @@ -0,0 +1,9 @@ +package io.mosip.testrig.adminui.utility.pojo; + +import java.util.ArrayList; + +public class To{ + public ArrayList value; + public String html; + public String text; + } \ No newline at end of file diff --git a/admintest/src/main/java/io/mosip/testrig/adminui/utility/pojo/Value.java b/admintest/src/main/java/io/mosip/testrig/adminui/utility/pojo/Value.java new file mode 100644 index 00000000..6efb56c3 --- /dev/null +++ b/admintest/src/main/java/io/mosip/testrig/adminui/utility/pojo/Value.java @@ -0,0 +1,6 @@ +package io.mosip.testrig.adminui.utility.pojo; + +public class Value{ + public String address; + public String name; + } \ No newline at end of file diff --git a/admintest/src/main/resources/BulkUploadFiles/ara/device_type.csv b/admintest/src/main/resources/BulkUploadFiles/ara/device_type.csv index fad07c85..aed9f671 100644 --- a/admintest/src/main/resources/BulkUploadFiles/ara/device_type.csv +++ b/admintest/src/main/resources/BulkUploadFiles/ara/device_type.csv @@ -1,2 +1,2 @@ -code,name,name,description,langCode,isActive -ABhGH,ABChjJH,ABChjJH,For printing Documents,eng,TRUE +code|name|name|description|langCode|isActive +ABhGH1|ABChjJH1|ABChjJH1|For printing Documents|eng|TRUE diff --git a/admintest/src/main/resources/BulkUploadFiles/ara/machine_master.csv b/admintest/src/main/resources/BulkUploadFiles/ara/machine_master.csv index 2e614b94..414a37d1 100644 --- a/admintest/src/main/resources/BulkUploadFiles/ara/machine_master.csv +++ b/admintest/src/main/resources/BulkUploadFiles/ara/machine_master.csv @@ -1,2 +1,2 @@ -id,name,macAddress,serialNum,ipAddress,validityDateTime,machineSpecId,publicKey,keyIndex,signPublicKey,signKeyIndex,zoneCode,regCenterId,langCode,isActive -58755,technoABCH,3C-2C-30-D1-E5-65,FB5962911688,192.168.0.408,2022-11-17T09:50:23.637Z,1001,AAEACwACAHIAIINxl2dEhLP4GpDMjUal1yT9UtduBlILZPKh2hszFGmqABAAFwALCAAAAQABAQDCHegKJ3vRn__8h1knXKiLA8qfO5LebzBlRO2tAcI3HvLyL9rPkVrXWYQ6wAn4VQk015C1hViU-7k752dYE5WUAUbgsxOHvvDPH1t72CNHNj9dyE86wGqR9AtK3yz0yf1IP_xgtWpiaQ2V9t2d3LtgPYWnRuPJbcl97nLXXL6PGfh1mRwsQUi94coEBPMZ9YLLOAFckPuDZt-lEcXIMkj8r0uNwAZUSEvGifTNWbLjC5BRlJBmvScIlptXqIwBaq2kSMVK2X1KbQ6TM8zkA_co4LEAIZfcpMgPn6RdW0yFtcx24HqrCY8v0DHregwoCPPpw8HvB-r5aR09mXG64zsJ,B9:6A:BF:7B:31:4F:9F:52:B1:24:B1:E4:2B:20:DD:5C:6A:BD:43:6E:20:51:5C:EB:73:E0:84:3D:06:5E:2C:45,AAEABAAEAHIAAAAQABQACwgAAAEAAQEAr93rKokeZGIzcCtFX3iyCvwpmfnd9jz0nF__0bxWr0mH8Zs0rhlG6vKRagx31I4CdrLAECOwMZ0r7Y3utTqHqelQE3MJLtboKITOqYRpBkqHSm1jGaEb8a1E9yoJri3tZrBCrAShimrN_SbtS1uKbJUG3cuVuE0gtGLI1d5wMfS_4PSz3RwvZtGHisEb3zbV6SLcJkgcDeMbUD7P25SVJd1xrJybuGIgyeSZxOgLzy1P-qHCiOXiAO9o06fwyIhIYbeZYz5th4rq7Rb6mRK9EWFpLrLvBL0F6USiidl8qNCxxZZFUp3W5xFANVYfRvgLKI33zBYniZ7aTE8PgrYa2w,CE:19:36:5F:89:6D:D3:3E:6D:1B:64:EF:CE:04:F1:14:D5:73:9D:FF:EC:18:FB:CC:DF:C8:74:8E:1E:DC:BF:73,NTH,10002,eng,TRUE +id|name|macAddress|serialNum|ipAddress|validityDateTime|machineSpecId|publicKey|keyIndex|signPublicKey|signKeyIndex|zoneCode|regCenterId|langCode|isActive +5875513|technoABCDE|3C-2C-30-D1-E5-65|FB5962911688|192.168.0.408|2025-11-17T09:50:23.637Z|RESIDENT-1|AAEACwACAHIAIINxl2dEhLP4GpDMjUal1yT9UtduBlILZPKh2hszFGmqABAAFwALCAAAAQABAQDFEX4nLppAuHIfGzhYn7DR_3wAQkVnrPSFFaiV9TAvN0WHtH_hweGNNjUGYvyaowwmC8jsazufmnIoPisZIFraVQNWCA6N0RhZF_LisoTYDoQSM-ZbCKPxRTFnemtTwXHxQdlVWGUXst_WZIWC0OTSzJHbBg_iXQW1UOXRJL845GFOKjvOPQiEbOZgmoWslkTIAi7bf-AeWdEYuO3bwPf-T5Xxj_xH2-PTinQA_4itRWSrhG5kEU-zQHWGL72SiGzwOOoPnzZZv2X_9djpWGEz1gyNl5ionns8IfuQrvikSEMxm-E6Z9RfKNh2_rEHgnOR4gl0ju5kg_n9tnuUeXXP|18:C3:AB:91:22:88:15:5B:13:F7:67:E9:FE:12:00:34:3C:C9:B3:EE:CB:2F:Y6:32:4B:76:1D:3D:5A:3F:1A:7A|AAEABAAEAHIAAAAQABQACwgAAAEAAQEArjUwXvR8QvkWcp2KOqMhU-tK4YxPHdkkm9IN7azBolMoAs41uR32xp070AW5LfhQokuEskOF_dvRrqHw4JzWMXDRVSpBrW_k-OwLzNfeFvuKQ9JTAXdzKUOXbPgcLY1B5bJe9E7fn-gPKYki35RgwphHraSKaYZ1yELpXiT3KPoWXzDvZE5Lqx317bgMGh2RPkf80alJks-iv-aEPDWlSWE5jr3t68gUYx4r_eixdw6tx1ADGCqK1ZEKCul73ptnR8eWorN1njcxlxUaoECvf3rCEuvfZAprBKSWBEnaFPkfgc9lYSBwtP4YKJHttmPX0Dzc85wa6V19SIwNVEiCsQ|4D:58:8F:EC:C3:CB:0E:8C:D9:27:2E:56:F5:61:65:B8:11:28:89:26:20:4E:67:2Y:35:B1:55:2C:AD:9B:E1:5A|NTH|10002|eng|TRUE diff --git a/admintest/src/main/resources/BulkUploadFiles/eng/device_type.csv b/admintest/src/main/resources/BulkUploadFiles/eng/device_type.csv new file mode 100644 index 00000000..aed9f671 --- /dev/null +++ b/admintest/src/main/resources/BulkUploadFiles/eng/device_type.csv @@ -0,0 +1,2 @@ +code|name|name|description|langCode|isActive +ABhGH1|ABChjJH1|ABChjJH1|For printing Documents|eng|TRUE diff --git a/admintest/src/main/resources/BulkUploadFiles/eng/machine_master.csv b/admintest/src/main/resources/BulkUploadFiles/eng/machine_master.csv index 2e614b94..414a37d1 100644 --- a/admintest/src/main/resources/BulkUploadFiles/eng/machine_master.csv +++ b/admintest/src/main/resources/BulkUploadFiles/eng/machine_master.csv @@ -1,2 +1,2 @@ -id,name,macAddress,serialNum,ipAddress,validityDateTime,machineSpecId,publicKey,keyIndex,signPublicKey,signKeyIndex,zoneCode,regCenterId,langCode,isActive -58755,technoABCH,3C-2C-30-D1-E5-65,FB5962911688,192.168.0.408,2022-11-17T09:50:23.637Z,1001,AAEACwACAHIAIINxl2dEhLP4GpDMjUal1yT9UtduBlILZPKh2hszFGmqABAAFwALCAAAAQABAQDCHegKJ3vRn__8h1knXKiLA8qfO5LebzBlRO2tAcI3HvLyL9rPkVrXWYQ6wAn4VQk015C1hViU-7k752dYE5WUAUbgsxOHvvDPH1t72CNHNj9dyE86wGqR9AtK3yz0yf1IP_xgtWpiaQ2V9t2d3LtgPYWnRuPJbcl97nLXXL6PGfh1mRwsQUi94coEBPMZ9YLLOAFckPuDZt-lEcXIMkj8r0uNwAZUSEvGifTNWbLjC5BRlJBmvScIlptXqIwBaq2kSMVK2X1KbQ6TM8zkA_co4LEAIZfcpMgPn6RdW0yFtcx24HqrCY8v0DHregwoCPPpw8HvB-r5aR09mXG64zsJ,B9:6A:BF:7B:31:4F:9F:52:B1:24:B1:E4:2B:20:DD:5C:6A:BD:43:6E:20:51:5C:EB:73:E0:84:3D:06:5E:2C:45,AAEABAAEAHIAAAAQABQACwgAAAEAAQEAr93rKokeZGIzcCtFX3iyCvwpmfnd9jz0nF__0bxWr0mH8Zs0rhlG6vKRagx31I4CdrLAECOwMZ0r7Y3utTqHqelQE3MJLtboKITOqYRpBkqHSm1jGaEb8a1E9yoJri3tZrBCrAShimrN_SbtS1uKbJUG3cuVuE0gtGLI1d5wMfS_4PSz3RwvZtGHisEb3zbV6SLcJkgcDeMbUD7P25SVJd1xrJybuGIgyeSZxOgLzy1P-qHCiOXiAO9o06fwyIhIYbeZYz5th4rq7Rb6mRK9EWFpLrLvBL0F6USiidl8qNCxxZZFUp3W5xFANVYfRvgLKI33zBYniZ7aTE8PgrYa2w,CE:19:36:5F:89:6D:D3:3E:6D:1B:64:EF:CE:04:F1:14:D5:73:9D:FF:EC:18:FB:CC:DF:C8:74:8E:1E:DC:BF:73,NTH,10002,eng,TRUE +id|name|macAddress|serialNum|ipAddress|validityDateTime|machineSpecId|publicKey|keyIndex|signPublicKey|signKeyIndex|zoneCode|regCenterId|langCode|isActive +5875513|technoABCDE|3C-2C-30-D1-E5-65|FB5962911688|192.168.0.408|2025-11-17T09:50:23.637Z|RESIDENT-1|AAEACwACAHIAIINxl2dEhLP4GpDMjUal1yT9UtduBlILZPKh2hszFGmqABAAFwALCAAAAQABAQDFEX4nLppAuHIfGzhYn7DR_3wAQkVnrPSFFaiV9TAvN0WHtH_hweGNNjUGYvyaowwmC8jsazufmnIoPisZIFraVQNWCA6N0RhZF_LisoTYDoQSM-ZbCKPxRTFnemtTwXHxQdlVWGUXst_WZIWC0OTSzJHbBg_iXQW1UOXRJL845GFOKjvOPQiEbOZgmoWslkTIAi7bf-AeWdEYuO3bwPf-T5Xxj_xH2-PTinQA_4itRWSrhG5kEU-zQHWGL72SiGzwOOoPnzZZv2X_9djpWGEz1gyNl5ionns8IfuQrvikSEMxm-E6Z9RfKNh2_rEHgnOR4gl0ju5kg_n9tnuUeXXP|18:C3:AB:91:22:88:15:5B:13:F7:67:E9:FE:12:00:34:3C:C9:B3:EE:CB:2F:Y6:32:4B:76:1D:3D:5A:3F:1A:7A|AAEABAAEAHIAAAAQABQACwgAAAEAAQEArjUwXvR8QvkWcp2KOqMhU-tK4YxPHdkkm9IN7azBolMoAs41uR32xp070AW5LfhQokuEskOF_dvRrqHw4JzWMXDRVSpBrW_k-OwLzNfeFvuKQ9JTAXdzKUOXbPgcLY1B5bJe9E7fn-gPKYki35RgwphHraSKaYZ1yELpXiT3KPoWXzDvZE5Lqx317bgMGh2RPkf80alJks-iv-aEPDWlSWE5jr3t68gUYx4r_eixdw6tx1ADGCqK1ZEKCul73ptnR8eWorN1njcxlxUaoECvf3rCEuvfZAprBKSWBEnaFPkfgc9lYSBwtP4YKJHttmPX0Dzc85wa6V19SIwNVEiCsQ|4D:58:8F:EC:C3:CB:0E:8C:D9:27:2E:56:F5:61:65:B8:11:28:89:26:20:4E:67:2Y:35:B1:55:2C:AD:9B:E1:5A|NTH|10002|eng|TRUE diff --git a/admintest/src/main/resources/BulkUploadFiles/sin/device_type.csv b/admintest/src/main/resources/BulkUploadFiles/sin/device_type.csv index fad07c85..aed9f671 100644 --- a/admintest/src/main/resources/BulkUploadFiles/sin/device_type.csv +++ b/admintest/src/main/resources/BulkUploadFiles/sin/device_type.csv @@ -1,2 +1,2 @@ -code,name,name,description,langCode,isActive -ABhGH,ABChjJH,ABChjJH,For printing Documents,eng,TRUE +code|name|name|description|langCode|isActive +ABhGH1|ABChjJH1|ABChjJH1|For printing Documents|eng|TRUE diff --git a/admintest/src/main/resources/BulkUploadFiles/sin/machine_master.csv b/admintest/src/main/resources/BulkUploadFiles/sin/machine_master.csv index 2e614b94..414a37d1 100644 --- a/admintest/src/main/resources/BulkUploadFiles/sin/machine_master.csv +++ b/admintest/src/main/resources/BulkUploadFiles/sin/machine_master.csv @@ -1,2 +1,2 @@ -id,name,macAddress,serialNum,ipAddress,validityDateTime,machineSpecId,publicKey,keyIndex,signPublicKey,signKeyIndex,zoneCode,regCenterId,langCode,isActive -58755,technoABCH,3C-2C-30-D1-E5-65,FB5962911688,192.168.0.408,2022-11-17T09:50:23.637Z,1001,AAEACwACAHIAIINxl2dEhLP4GpDMjUal1yT9UtduBlILZPKh2hszFGmqABAAFwALCAAAAQABAQDCHegKJ3vRn__8h1knXKiLA8qfO5LebzBlRO2tAcI3HvLyL9rPkVrXWYQ6wAn4VQk015C1hViU-7k752dYE5WUAUbgsxOHvvDPH1t72CNHNj9dyE86wGqR9AtK3yz0yf1IP_xgtWpiaQ2V9t2d3LtgPYWnRuPJbcl97nLXXL6PGfh1mRwsQUi94coEBPMZ9YLLOAFckPuDZt-lEcXIMkj8r0uNwAZUSEvGifTNWbLjC5BRlJBmvScIlptXqIwBaq2kSMVK2X1KbQ6TM8zkA_co4LEAIZfcpMgPn6RdW0yFtcx24HqrCY8v0DHregwoCPPpw8HvB-r5aR09mXG64zsJ,B9:6A:BF:7B:31:4F:9F:52:B1:24:B1:E4:2B:20:DD:5C:6A:BD:43:6E:20:51:5C:EB:73:E0:84:3D:06:5E:2C:45,AAEABAAEAHIAAAAQABQACwgAAAEAAQEAr93rKokeZGIzcCtFX3iyCvwpmfnd9jz0nF__0bxWr0mH8Zs0rhlG6vKRagx31I4CdrLAECOwMZ0r7Y3utTqHqelQE3MJLtboKITOqYRpBkqHSm1jGaEb8a1E9yoJri3tZrBCrAShimrN_SbtS1uKbJUG3cuVuE0gtGLI1d5wMfS_4PSz3RwvZtGHisEb3zbV6SLcJkgcDeMbUD7P25SVJd1xrJybuGIgyeSZxOgLzy1P-qHCiOXiAO9o06fwyIhIYbeZYz5th4rq7Rb6mRK9EWFpLrLvBL0F6USiidl8qNCxxZZFUp3W5xFANVYfRvgLKI33zBYniZ7aTE8PgrYa2w,CE:19:36:5F:89:6D:D3:3E:6D:1B:64:EF:CE:04:F1:14:D5:73:9D:FF:EC:18:FB:CC:DF:C8:74:8E:1E:DC:BF:73,NTH,10002,eng,TRUE +id|name|macAddress|serialNum|ipAddress|validityDateTime|machineSpecId|publicKey|keyIndex|signPublicKey|signKeyIndex|zoneCode|regCenterId|langCode|isActive +5875513|technoABCDE|3C-2C-30-D1-E5-65|FB5962911688|192.168.0.408|2025-11-17T09:50:23.637Z|RESIDENT-1|AAEACwACAHIAIINxl2dEhLP4GpDMjUal1yT9UtduBlILZPKh2hszFGmqABAAFwALCAAAAQABAQDFEX4nLppAuHIfGzhYn7DR_3wAQkVnrPSFFaiV9TAvN0WHtH_hweGNNjUGYvyaowwmC8jsazufmnIoPisZIFraVQNWCA6N0RhZF_LisoTYDoQSM-ZbCKPxRTFnemtTwXHxQdlVWGUXst_WZIWC0OTSzJHbBg_iXQW1UOXRJL845GFOKjvOPQiEbOZgmoWslkTIAi7bf-AeWdEYuO3bwPf-T5Xxj_xH2-PTinQA_4itRWSrhG5kEU-zQHWGL72SiGzwOOoPnzZZv2X_9djpWGEz1gyNl5ionns8IfuQrvikSEMxm-E6Z9RfKNh2_rEHgnOR4gl0ju5kg_n9tnuUeXXP|18:C3:AB:91:22:88:15:5B:13:F7:67:E9:FE:12:00:34:3C:C9:B3:EE:CB:2F:Y6:32:4B:76:1D:3D:5A:3F:1A:7A|AAEABAAEAHIAAAAQABQACwgAAAEAAQEArjUwXvR8QvkWcp2KOqMhU-tK4YxPHdkkm9IN7azBolMoAs41uR32xp070AW5LfhQokuEskOF_dvRrqHw4JzWMXDRVSpBrW_k-OwLzNfeFvuKQ9JTAXdzKUOXbPgcLY1B5bJe9E7fn-gPKYki35RgwphHraSKaYZ1yELpXiT3KPoWXzDvZE5Lqx317bgMGh2RPkf80alJks-iv-aEPDWlSWE5jr3t68gUYx4r_eixdw6tx1ADGCqK1ZEKCul73ptnR8eWorN1njcxlxUaoECvf3rCEuvfZAprBKSWBEnaFPkfgc9lYSBwtP4YKJHttmPX0Dzc85wa6V19SIwNVEiCsQ|4D:58:8F:EC:C3:CB:0E:8C:D9:27:2E:56:F5:61:65:B8:11:28:89:26:20:4E:67:2Y:35:B1:55:2C:AD:9B:E1:5A|NTH|10002|eng|TRUE diff --git a/admintest/src/main/resources/README b/admintest/src/main/resources/README index 06cebb16..24934f2c 100644 --- a/admintest/src/main/resources/README +++ b/admintest/src/main/resources/README @@ -2,7 +2,7 @@ This Repository is used for Admin Portal Automation. How To run : First Build Jar - Place VM args- java -Dpath=https://env.mosip.net/ -Duserid=user -Dpassword=pwd -jar nameofAdminJar.jar + Place VM args- java -Dpath=https://admin.env.mosip.net/ -DKeyclockURL=https://iam.env.mosip.net -Denv.user=api-internal.env -Denv.endpoint=https://api-internal.dev3.mosip.net -jar nameofAdminJar.jar Place jar in one folder along with src/main/resources files and folder and then run jar TestData Setup: diff --git a/admintest/src/main/resources/Screenshots/1686303740602.png b/admintest/src/main/resources/Screenshots/1686303740602.png new file mode 100644 index 00000000..7b20569f Binary files /dev/null and b/admintest/src/main/resources/Screenshots/1686303740602.png differ diff --git a/admintest/src/main/resources/TestData.json b/admintest/src/main/resources/TestData.json deleted file mode 100644 index 6f7521ab..00000000 --- a/admintest/src/main/resources/TestData.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "identity": { - "BELOW_ARE_KEYWORDS_FOR_HELP": "Below Keys use to put in setExcludedGroups to exclude scenarios eg BL for blocklistedwordsCRUD to ignore this execution", - "ALL": "BL,BU,CTR,CT,DS,D,DT,DOC,DOCT,DF,H,MS,M,MT,T", - "1blocklistedwordsCRUD": "BL", - "2bulkUploadCRUD": "BU", - "3centerCRUD": "CTR", - "4centerTypeCRUD": "CT", - "5deviceSpecCRUD": "DS", - "6deviceCRUD": "D", - "7deviceTypesCRUD": "DT", - "8documentCategoriesCRUD": "DOC", - "9documentTypesCRUD": "DOCT", - "10dynamicFieldCRUD": "DF", - "11holidaysCRUD": "H", - "12machineSpecCRUD": "MS", - "13machineCRUD": "M", - "14machineTypesCRUD": "MT", - "15templateCRUD": "T", - "BELOW_ARE_STATIC_KEYWORDS": "We are using this setExcludedGroups to exclude scenarios", - "setExcludedGroups": "", - "holidayDateCenter": "27/12/2022", - "holidayDate": "12/27/2022", - "loginlang": "ara", - "jsonObjName": "identity", - "bulkwait": "10000", - "publicKey": "ZAEACwACAHIAIINxl2dEhLP4GpDMjUal1yT9UtduBlILZPKh2hszFGmqABAAFwALCAAAAQABAQDCHegKJ3vRn__8h1knXKiLA8qfO5LebzBlRO2tAcI3HvLyL9rPkVrXWYQ6wAn4VQk015C1hViU-7k752dYE5WUAUbgsxOHvvDPH1t72CNHNj9dyE86wGqR9AtK3yz0yf1IP_xgtWpiaQ2V9t2d3LtgPYWnRuPJbcl97nLXXL6PGfh1mRwsQUi94coEBPMZ9YLLOAFckPuDZt-lEcXIMkj8r0uNwAZUSEvGifTNWbLjC5BRlJBmvScIlptXqIwBaq2kSMVK2X1KbQ6TM8zkA_co4LEAIZfcpMgPn6RdW0yFtcx24HqrCY8v0DHregwoCPPpw8HvB-r5aR09mXG64zsJ", - "signPublicKey": "AAZABAAEAHIAAAAQABQACwgAAAEAAQEAr93rKokeZGIzcCtFX3iyCvwpmfnd9jz0nF__0bxWr0mH8Zs0rhlG6vKRagx31I4CdrLAECOwMZ0r7Y3utTqHqelQE3MJLtboKITOqYRpBkqHSm1jGaEb8a1E9yoJri3tZrBCrAShimrN_SbtS1uKbJUG3cuVuE0gtGLI1d5wMfS_4PSz3RwvZtGHisEb3zbV6SLcJkgcDeMbUD7P25SVJd1xrJybuGIgyeSZxOgLzy1P-qHCiOXiAO9o06fwyIhIYbeZYz5th4rq7Rb6mRK9EWFpLrLvBL0F6USiidl8qNCxxZZFUp3W5xFANVYfRvgLKI33zBYniZ7aTE8PgrYa2w", - "langcode": [ - { - "language": "tam", - "value": "தமிழ்" - }, - { - "language": "kan", - "value": "ಕನ್ನಡ" - }, - { - "language": "hin", - "value": "हिंदी" - }, - { - "language": "eng", - "value": "English" - }, - { - "language": "fra", - "value": "Français" - }, - { - "language": "ara", - "value": "Arabic" - } - ] - } -} \ No newline at end of file diff --git a/admintest/src/main/resources/chromedriver/chromedriver.exe b/admintest/src/main/resources/chromedriver/chromedriver.exe deleted file mode 100644 index 57070d59..00000000 Binary files a/admintest/src/main/resources/chromedriver/chromedriver.exe and /dev/null differ diff --git a/admintest/src/main/resources/config/Authorization/internalAuthRequest.json b/admintest/src/main/resources/config/Authorization/internalAuthRequest.json new file mode 100644 index 00000000..57aa8f2f --- /dev/null +++ b/admintest/src/main/resources/config/Authorization/internalAuthRequest.json @@ -0,0 +1,13 @@ +{ + "id": "string", + "version": "string", + "requesttime": "2022-01-13T06:07:20.554Z", + "metadata": {}, + "request": { + "userName": "110005", + "password": "mosip", + "appId": "admin", + "clientId": "mosip-admin-client", + "clientSecret": "xyz123" + } +} \ No newline at end of file diff --git a/admintest/src/main/resources/config/Authorization/request.json b/admintest/src/main/resources/config/Authorization/request.json new file mode 100644 index 00000000..57831153 --- /dev/null +++ b/admintest/src/main/resources/config/Authorization/request.json @@ -0,0 +1,11 @@ +{ + "id": "string", + "metadata": {}, + "request": { + "appId": "prereg", + "password": "prereguser", + "userName": "prereguser" + }, + "requesttime": "2019-04-10T10:00:00.000Z", + "version": "string" +} \ No newline at end of file diff --git a/admintest/src/main/resources/config/Authorization/zoneMappingRequest.json b/admintest/src/main/resources/config/Authorization/zoneMappingRequest.json new file mode 100644 index 00000000..c7e5fbce --- /dev/null +++ b/admintest/src/main/resources/config/Authorization/zoneMappingRequest.json @@ -0,0 +1,12 @@ +{ + "id": "string", + "metadata": {}, + "request": { + "zoneCode": "CSB", + "userId": "110123", + "isActive": true, + "langCode": "eng" + }, + "requesttime": "2022-05-09T09:52:11.969Z", + "version": "string" +} \ No newline at end of file diff --git a/admintest/src/main/resources/config/Kernel.properties b/admintest/src/main/resources/config/Kernel.properties new file mode 100644 index 00000000..199667ee --- /dev/null +++ b/admintest/src/main/resources/config/Kernel.properties @@ -0,0 +1,126 @@ +#Kernel resource uris +#Make sure all resource apis are covered +authenticationInternal=/v1/authmanager/authenticate/internal/useridPwd +zoneMappingUrl=/v1/masterdata/zoneuser +leafzonesURL=/v1/masterdata/zones/leafzones/eng +zoneNameUrl=/v1/masterdata/zones/zonename +zoneMappingActivateUrl=/v1/masterdata/zoneuser +userCenterMappingUrl=/v1/masterdata/usercentermapping +bulkUploadUrl=/v1/admin/bulkupload +#Below users are used for authentication +#PARTNER +#Dont change the partner id +#IDREPO +mosip_idrepo_app_id=idrepo +mosip_idrepo_client_id=mosip-idrepo-client +mosip_idrepo_client_secret=M7CZ6WYMi6oe695u +#IDREPO +mosip_idrepo_app_id=idrepo +mosip_idrepo_client_id=mosip-idrepo-client +mosip_idrepo_client_secret=M7CZ6WYMi6oe695u +keycloak-realm-id=mosip +keycloak-external-url=https://iam.dev.mosip.net +mosip_testrig_client_id=mosip-testrig-client +mosip_testrig_client_secret=mqKN6lkadcA3rG31 +admin +mosip_admin_app_id=admin +admin_password=mosip123 +#actuall user login will be 'adminui-auto12' +admin_userName=admin00 +mosip_admin_client_id=mosip-admin-client +mosip_admin_client_secret=xzzvvPISDPwR2yl7 +#admin +admin_zone_password=mosip123 +admin_zone_userName=globaladmin +mosip_regclient_app_id=registrationclient +mosip_reg_client_id=mosip-reg-client +mosip_reg_client_secret=ExzIU4M7MYrMZLuz +iam-users-to-create=admin00 +#iam-users-to-create=111997,220005,111992 +iam-users-password=mosip123 +roles.admin00=GLOBAL_ADMIN,ID_AUTHENTICATION,PARTNER_ADMIN,PMS_ADMIN,POLICYMANAGER,REGISTRATION_ADMIN,REGISTRATION_SUPERVISOR,ZONAL_ADMIN +roles.globaladmin=GLOBAL_ADMIN,REGISTRATION_ADMIN,uma_authorization,ZONAL_ADMIN,default-roles-mosip +partner_url=jdbc:postgresql://dev.mosip.net:5432/mosip_ida +#----------------------------------Database properties----------------------------------------------------------# +postgresqlUser=postgresql +db-port=5432 +db-server=dev.mosip.net +hibernate.connection.driver_class=org.postgresql.Driver +hibernate.connection.pool_size=1 +hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect +hibernate.show_sql=true +hibernate.current_session_context_class=thread +db-su-user=postgres +postgres-password=mQi298ZW7p +pms_db_schema=pms +km_db_schema=keymgr +master_db_schema=master +audit_db_schema=audit +ida_db_schema=ida +db-server=dev.mosip.net +keycloak-external-url=https://iam.dev.mosip.net +audit_url=jdbc:postgresql://dev.mosip.net:5432/mosip_audit +driver_class=org.postgresql.Driver +pool_size=1 +dialect=org.hibernate.dialect.PostgreSQLDialect +show_sql=true +current_session_context_class=thread +db-su-user=postgres +postgres-password=mQi298ZW7p +postgresqlUser=postgresql +db-port=5432 +db-server=dev.mosip.net +s3-user-key=minioadmin +s3-user-secret=minioadmin +s3-host=http://minio.minio:9000 +s3-account=automation +s3-region=null +reportExpirationInDays=3 +# supported values yes or no +push-reports-to-s3=no +enableDebug=no +# supported values are 1 to 8 +threadCount=1 +# supported values are 0 ,1, 2 based on number of env languages +langselect=0 +#suppport sin or eng,hin,kan,tam,fra,ara +loginlang=sin +#----------------------------------AuthDemoService Host properties----------------------------------------------------------# +#To run locally +authDemoServiceBaseURL=http://localhost +authDemoServicePort=8082 +#To run in Docker +#authDemoServiceBaseURL=http://authdemo.apitestrig +#authDemoServicePort=80 +#----------------------------------IdP properties----------------------------------------------------------# +currentUserURI=/#/uinservices/viewhistory +actuatorEndpoint=/resident/v1/actuator/env +actuatorIDAEndpoint=/idauthentication/v1/actuator/env +actuatorRegprocEndpoint=/registrationprocessor/v1/registrationtransaction/actuator/env +tokenEndpoint=/v1/esignet/oauth/token +validateBindingEndpoint=esignet-binding +#To run in Docker +#authCertsPath=/home/mosip/authcerts +#To run locally +authCertsPath= +servicesNotDeployed= +adminPortalPath=https://admin.dev.mosip.net/ +apiEnvUser=api-internal.dev +apiInternalEndPoint=https://api-internal.dev.mosip.net + +#----------------------------------Test_data--------------------------------------------- +adminscenariosToExecute= +holidayDateCenter=11/12/2026 +holidayDate=10/12/2026 +validityDate=10/12/2026 +preappend=00 +splitdigit=7 +jsonObjName=identity +bulkwait=10000 +dummyData=blocklistworddata +publicKey=AAEACwACAHIAIINxl2dEhLP4GpDMjUal1yT9UtduBlILZPKh2hszFGmqABAAFwALCAAAAQABAQDFEX4nLppAuHIfGzhYn7DR_3wAQkVnrPSFFaiV9TAvN0WHtH_hweGNNjUGYvyaowwmC8jsazufmnIoPisZIFraVQNWCA6N0RhZF_LisoTYDoQSM-ZbCKPxRTFnemtTwXHxQdlVWGUXst_WZIWC0OTSzJHbBg_iXQW1UOXRJL845GFOKjvOPQiEbOZgmoWslkTIAi9bf-AeWdEYuO3bwPf-T5Xxj_xH2-PTinQA_4itRWSrhG5kEU-zQHWGL72SiGzwOOoPnzZZv2X_9djpWGEz1gyNl5ionns8IfuQrvikSEMxm-E6Z9RfKNhl_rEHgnOR4gl0ju5kg_n9tnuUeXXP +signPublicKey=AAEABAAEAHIAAAAQABQACwgAAAEAAQEArjUwXvR8QvkWcplKOqMhU-tK4YxPHdkkm9IN7azBolMoAs41uR32xp070AW5LfhQokuEskOF_dvRrqHw4JzWMXDRVSpBrW_k-OwLzNfeFvuKQ9JTAXdzKUOXbPgcLY1B5bJe9E7fn-gPKYki35RgwphHraSKaYZ1yELpXiT3KPoWXzDvZE5Lqx317bgMGh2RPkf80alJks-iv-aEPDWlSWE5jr3t68gUYx4r_eixdw6tx1ADGCqK1ZEKCul73ptnR8eWorN1njcxlxUaoECvf3rCEuvfZAprBKSWBEnaFPkfgc9lYSBwtP4YKJHttmPX0Dzc85wa6V17SIwNVEiCsQ +headless=yes +docker=yes +langcode=[{"language":"tam","value":"தமிழ\uFFFD"},{"language":"kan","value":"\u2022ನ\uFFFDನಡ"},{"language":"hin","value":"hin"},{"language":"eng1","value":"English"},{"language":"eng","value":"English"},{"language":"fra","value":"Français"},{"language":"ara","value":"Arabic"}] + \ No newline at end of file diff --git a/admintest/src/main/resources/config/Kernel11.properties b/admintest/src/main/resources/config/Kernel11.properties new file mode 100644 index 00000000..aef49c61 --- /dev/null +++ b/admintest/src/main/resources/config/Kernel11.properties @@ -0,0 +1,114 @@ +#Kernel resource uris +#Make sure all resource apis are covered +authenticationInternal=/v1/authmanager/authenticate/internal/useridPwd +zoneMappingUrl=/v1/masterdata/zoneuser +zoneNameUrl=/v1/masterdata/zones/zonename +zoneMappingActivateUrl=/v1/masterdata/zoneuser +userCenterMappingUrl=/v1/masterdata/usercentermapping +bulkUploadUrl=/v1/admin/bulkupload +#Below users are used for authentication +#PARTNER +#Dont change the partner id +#IDREPO +mosip_idrepo_app_id=idrepo +mosip_idrepo_client_id=mosip-idrepo-client +mosip_idrepo_client_secret=wJ21F8gXzdy2RM9q +#IDREPO +mosip_idrepo_app_id=idrepo +mosip_idrepo_client_id=mosip-idrepo-client +mosip_idrepo_client_secret=wJ21F8gXzdy2RM9q +keycloak-realm-id=mosip +keycloak-external-url=https://iam.dev3.mosip.net +mosip_testrig_client_id=mosip-testrig-client +mosip_testrig_client_secret=aOCfcQC2dYm2Iotg +admin +mosip_admin_app_id=admin +admin_password=mosip123 +#actuall user login will be 'adminui-auto12' +admin_userName=auto12 +mosip_admin_client_id=mosip-admin-client +mosip_admin_client_secret=7Vvj405Z5a35eAod +#admin +admin_zone_password=mosip123 +admin_zone_userName=globaladmin +mosip_regclient_app_id=registrationclient +mosip_reg_client_id=mosip-reg-client +mosip_reg_client_secret=SGqovDBMh7McnAxw +iam-users-to-create=auto12,globaladmin +#iam-users-to-create=111997,220005,111992 +iam-users-password=mosip123,mosip123 +roles.auto12=GLOBAL_ADMIN,ID_AUTHENTICATION,PARTNER_ADMIN,PMS_ADMIN,POLICYMANAGER,REGISTRATION_ADMIN,REGISTRATION_SUPERVISOR,ZONAL_ADMIN +roles.globaladmin=GLOBAL_ADMIN,REGISTRATION_ADMIN,uma_authorization,ZONAL_ADMIN,default-roles-mosip +partner_url=jdbc:postgresql://dev3.mosip.net:5432/mosip_ida +#----------------------------------Database properties----------------------------------------------------------# +postgresqlUser=postgresql +db-port=5432 +db-server=dev3.mosip.net +hibernate.connection.driver_class=org.postgresql.Driver +hibernate.connection.pool_size=1 +hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect +hibernate.show_sql=true +hibernate.current_session_context_class=thread +db-su-user=postgres +postgresql-password=rLqRHeY4C5 +pms_db_schema=pms +km_db_schema=keymgr +master_db_schema=master +audit_db_schema=audit +ida_db_schema=ida +db-server=dev3.mosip.net +keycloak-external-url=https://iam.dev3.mosip.net +audit_url=jdbc:postgresql://dev3.mosip.net:5432/mosip_audit +driver_class=org.postgresql.Driver +pool_size=1 +dialect=org.hibernate.dialect.PostgreSQLDialect +show_sql=true +current_session_context_class=thread +db-su-user=postgres +postgresql-password=rLqRHeY4C5 +postgresqlUser=postgresql +db-port=5432 +db-server=dev3.mosip.net + + +s3-user-key=minioadmin +s3-user-secret=minioadmin +s3-host=http://minio.minio:9000 +s3-account=automation +s3-region=null +reportExpirationInDays=3 +# supported values yes or no +push-reports-to-s3=yes +enableDebug=no +# supported values are 1 to 8 +threadCount=1 +# supported values are 0 ,1, 2 based on number of env languages +langselect=0 +#----------------------------------AuthDemoService Host properties----------------------------------------------------------# +#To run locally +#authDemoServiceBaseURL=http://localhost +#authDemoServicePort=8082 + +#To run in Docker +authDemoServiceBaseURL=http://authdemo.apitestrig +authDemoServicePort=80 + + +#----------------------------------IdP properties----------------------------------------------------------# + +currentUserURI=/#/uinservices/viewhistory +actuatorEndpoint=/resident/v1/actuator/env +actuatorIDAEndpoint=/idauthentication/v1/actuator/env +actuatorRegprocEndpoint=/registrationprocessor/v1/registrationtransaction/actuator/env +tokenEndpoint=/v1/esignet/oauth/token +validateBindingEndpoint=esignet-binding + +#To run in Docker +authCertsPath=/home/mosip/authcerts + +#To run locally +#authCertsPath= + +adminPortalPath=https://admin.dev3.mosip.net/ +apiEnvUser=api-internal.dev3 +apiInternalEndPoint=https://api-internal.dev3.mosip.net diff --git a/admintest/src/main/resources/config/Kernel123.properties b/admintest/src/main/resources/config/Kernel123.properties new file mode 100644 index 00000000..fd7f50b2 --- /dev/null +++ b/admintest/src/main/resources/config/Kernel123.properties @@ -0,0 +1,244 @@ +#Kernel resource uris +#Make sure all resource apis are covered +authclientidsecretkeyURL=/v1/authmanager/authenticate/clientidsecretkey +authentication=/v1/authmanager/authenticate/useridPwd +authenticationInternal=/v1/authmanager/authenticate/internal/useridPwd +keycloakAuthURL=/auth/realms/master/protocol/openid-connect/token +auditLog_URI = /v1/auditmanager/audits +CentetMachineUserMappingToMasterData_uri= /v1/masterdata/registrationmachineusermappings +EmailNotification_URI= /v1/notifier/email/send +encrypt_URI=/v1/keymanager/encrypt +decrypt_URI=/v1/keymanager/decrypt +FetchApplication_URI=/v1/masterdata/applicationtypes +FetchApplication_lang_URI=/v1/masterdata/applicationtypes/{langcode} +FetchApplication_id_lang_URI=/v1/masterdata/applicationtypes/{code}/{langcode} +FetchBiometricAttribute_URI=/v1/masterdata/getbiometricattributesbyauthtype/{langcode}/{biometrictypecode} +FetchBiometricAuthType_URI=/v1/masterdata/biometrictypes/{langcode} +FetchBlackListedWord_URI=/v1/masterdata/blacklistedwords/{langcode} +FetchDevice_lang_URI = /v1/masterdata/devices/{languagecode} +FetchDevice_id_lang_URI = /v1/masterdata/devices/{languagecode}/{deviceType} +FetchDeviceSpec_lang_URI = /v1/masterdata/devicespecifications/{langcode} +FetchDeviceSpec_id_lang_URI = /v1/masterdata/devicespecifications/{langcode}/{devicetypecode} +FetchDocumentCategories_URI = /v1/masterdata/documentcategories/{langcode} +FetchDocumentCategories_URI_withcodeAndLangCode = /v1/masterdata/documentcategories/{code}/{langcode} +FetchDocumentTypes_URI = /v1/masterdata/documenttypes/{documentcategorycode}/{langcode} +FetchGenderType_URI = /v1/masterdata/gendertypes +FetchGenderType_id_lang_URI = /v1/masterdata/gendertypes/{langcode} +FetchHolidays_URI = /v1/masterdata/holidays +FetchHolidays_id_URI = /v1/masterdata/holidays/{holidayid} +FetchHolidays_id_lang_URI = /v1/masterdata/holidays/{holidayid}/{langcode} +FetchIDlist_URI = /v1/masterdata/idtypes/{langcode} +FetchLocationHierarchy_URI_withlangCode = /v1/masterdata/locations/{langcode} +FetchLocationHierarchy_URI_locationcode = /v1/masterdata/locations/{locationcode}/{langcode} +FetchLocationHierarchy_URI_hierarchyname = /v1/masterdata/locations/locationhierarchy/{hierarchyname} +FetchMachine_URI=/v1/masterdata/machines +FetchMachine_lang_URI=/v1/masterdata/machines/{langcode} +FetchMachine_id_lang_URI=/v1/masterdata/machines/{id}/{langcode} +FetchMachineHistory_URI = /v1/masterdata/machineshistories/{id}/{langcode}/{effdatetimes} +FetchRegCent_URI = /v1/masterdata/registrationcenters +FetchRegCent_id_lang_URI = /v1/masterdata/registrationcenters/{id}/{langcode} +FetchRegCent_loc_lang_URI = /v1/masterdata/getlocspecificregistrationcenters/{langcode}/{locationcode} +FetchRegCent_hir_name_lang_URI = /v1/masterdata/registrationcenters/{langcode}/{hierarchylevel}/{name} +FetchRegCent_prox_lang_URI = /v1/masterdata/getcoordinatespecificregistrationcenters/{langcode}/{longitude}/{latitude}/{proximitydistance} +FetchRegCentHistory_URI = /v1/masterdata/registrationcentershistory/{registrationCenterId}/{langcode}/{effectiveDate} +FetchRegCentHolidays_URI = /v1/masterdata/getregistrationcenterholidays/{langcode}/{registrationcenterid}/{year} +FetchRegcentMachUserMaping_URI = /v1/masterdata/getregistrationmachineusermappinghistory/{effdtimes}/{registrationcenterid}/{machineid}/{userid} +FetchRejectionReason_URI = /v1/masterdata/packetrejectionreasons/{reasoncategorycode}/{langcode} +FetchTemplate_URI = /v1/masterdata/templates +FetchTemplate_lang_URI = /v1/masterdata/templates/{langcode} +FetchTemplate_id_lang_URI = /v1/masterdata/templates/{langcode}/{templatetypecode} +FetchTitle_URI = /v1/masterdata/title/{langcode} +fetchAllTemplate = /v1/masterdata/templates/templatetypecodes/{code} +getApplicantType = /v1/masterdata/getApplicantType +fetchDeviceHistory = /v1/masterdata/deviceshistories/{id}/{langcode}/{effdatetimes} +getDocType_DocCatByAppID = /v1/masterdata/applicanttype/{applicantId}/languages +getDocTypeDocCatByLangCode = /v1/masterdata/validdocuments/{languagecode} +fetchImmediateChildLocation = /v1/masterdata/locations/immediatechildren/{locationcode}/{langcode} +getIndividualType = /v1/masterdata/individualtypes +getRoles = /v1/syncdata/roles +fetchRegCenter = /v1/masterdata/registrationcenters/validate/{id}/{langCode}/{timestamp} +fetchRegistrationCenterDeviceHistory = /v1/masterdata/registrationcenterdevicehistory/{regcenterid}/{deviceid}/{effdatetimes} +getusersBasedOnRegCenter = /v1/syncdata/userdetails/{regid} +licKeyGenerator = /v1/keymanager/license/generate +mapLicenseKey = /v1/keymanager/license/permission +fetchmapLicenseKey = /v1/keymanager/license/permission +OTPGeneration = /v1/otpmanager/otp/generate +OTPValidation = /v1/otpmanager/otp/validate +otpNotifier = /v1/otpnotifier/otp/send +RIDGenerator_URI = /v1/ridgenerator/generate/rid/{centerid}/{machineid} +SmsNotification_URI = /v1/notifier/sms/send +syncConf = /v1/syncdata/configs +fetchIncrementalData = /v1/syncjob/syncjobdef +fetchmasterdata = /v1/syncdata/masterdata +fetchmasterdatawithRID = /v1/syncdata/masterdata/{regcenterId} +SyncPublicKeyToRegClient_URI = /v1/keymanager/publickey/ +uingenerator = /v1/idgenerator/uin +validateGenderByName = /v1/masterdata/gendertypes/validate/{gendername} +validateLocationByName = /v1/masterdata/locations/validate/{locationname} +tokenIdGenerator_URI = /v1/keymanager/{uin}/{partnercode} +getRIDByUserId = /v1/authmanager/rid/{appid}/{userid} +syncMdatawithKeyIndex = /v1/syncdata/clientsettings +syncMdatawithRegCentIdKeyIndex = /v1/syncdata/clientsettings/{regcenterid} +uploadpublickey = /v1/syncdata/tpm/publickey +getUserHistory = /v1/masterdata/users/{id}/{eff_dtimes} +sendOtp = /v1/authmanager/authenticate/sendotp +useridOTP = /v1/authmanager/authenticate/useridOTP +#preregSendOtp = /preregistration/v1/login/sendOtp +preregSendOtp = /preregistration/v1/login/sendOtp/langcode +preregValidateOtp = /preregistration/v1/login/validateOtp +zoneMappingUrl=/v1/masterdata/zoneuser +zoneNameUrl=/v1/masterdata/zones/zonename +zoneMappingActivateUrl=/v1/masterdata/zoneuser +userCenterMappingUrl=/v1/masterdata/usercentermapping +bulkUploadUrl=/v1/admin/bulkupload +mountPath=/home/mosip/mountvolume +packetUtilityBaseUrl=http://localhost:8080 +mountPathForScenario=D:/centralized/mountvolume +# OTP Details +OTPTimeOut = 181 +attempt = 10 +ConfigParameters=mosip.kernel.rid.length,mosip.kernel.uin.length,mosip.kernel.sms.country.code,mosip.kernel.sms.number.length,mosip.kernel.otp.default-length,mosip.kernel.otp.expiry-time,mosip.kernel.otp.key-freeze-time,mosip.kernel.otp.validation-attempt-threshold,mosip.kernel.otp.min-key-length,mosip.kernel.otp.max-key-length,mosip.kernel.licensekey.length,mosip.supported-languages +#Below users are used for authentication +#PARTNER +#Dont change the partner id +pmsAuthInternal=true +mosip_pms_app_id=partner +partner_password=mosip123 +partner_userName=111997 +partner_user_password=mosip123 +mosip_pms_client_id=mosip-pms-client +mosip_pms_client_secret=Tkx3jw9INusggEDW +policytest_password=mosip123 +policytest_userName=111998 +#RESIDENT & IDA +mosip_resident_app_id=resident +mosip_resident_client_id=mosip-resident-client +mosip_resident_client_secret=UGq78khkAst6fjbn +#IDREPO +mosip_idrepo_app_id=idrepo +mosip_idrepo_client_id=mosip-idrepo-client +mosip_idrepo_client_secret=wJ21F8gXzdy2RM9q +#admin +mosip_admin_app_id=admin +admin_password=mosip123 +admin_userName=auto +mosip_admin_client_id=mosip-admin-client +mosip_admin_client_secret=7Vvj405Z5a35eAod +#admin +admin_zone_password=mosip123 +admin_zone_userName=globaladmin +mosip_regclient_app_id=registrationclient +mosip_reg_client_id=mosip-reg-client +mosip_reg_client_secret=SGqovDBMh7McnAxw +#mparter_mobile +mpartner_default_mobile_client_id=mpartner-default-mobile +mpartner_default_mobile_secret=Gif10hl5sFH6WCUi + + + + +#This credentials are used to execute auth demo service +AuthClientID=mosip-resident-client +AuthClientSecret=UGq78khkAst6fjbn +AuthAppID=resident +mosip_hotlist_app_id=hotlist +mosip_hotlist_client_id=mosip-hotlist-client +mosip_hotlist_client_secret=8Q1SLvLXt5Cwd9QN +###Keycloak_User-Creation_Properties +#Dontchange the partner user_111997 + +new_Resident_User=111995 +new_Resident_Password=mosip123 +new_Resident_Role=default-roles-mosip,PARTNER_ADMIN +roles.111995=PARTNER_ADMIN,default-roles-mosip + + +keycloak_UserName = admin +keycloak_Password = oY6ijJuIL8 + +keycloak-external-url=https://iam.dev3.mosip.net +mosip_testrig_client_id=mosip-testrig-client +mosip_testrig_client_secret=aOCfcQC2dYm2Iotg + +keycloak-realm-id=mosip +iam-users-to-create=auto,globaladmin +#iam-users-to-create=111997,220005,111992 +iam-users-password=mosip123,mosip123 +roles.auto=GLOBAL_ADMIN,ID_AUTHENTICATION,PARTNER_ADMIN,PMS_ADMIN,POLICYMANAGER,REGISTRATION_ADMIN,REGISTRATION_SUPERVISOR,ZONAL_ADMIN +roles.globaladmin=GLOBAL_ADMIN,REGISTRATION_ADMIN,uma_authorization,ZONAL_ADMIN,default-roles-mosip +##DB_Connectivity +driver_class=org.postgresql.Driver +pool_size=1 +dialect=org.hibernate.dialect.PostgreSQLDialect +show_sql=true +current_session_context_class=thread +#audit details +audit_url=jdbc:postgresql://dev3.mosip.net:5432/mosip_audit +audit_username=postgres +audit_password=rLqRHeY4C5 +audit_default_schema=audit +#ida-partner details +DB_PORT= +installation-domain= +partner_url=jdbc:postgresql://dev3.mosip.net:5432/mosip_ida +partner_username=postgres +partner_password=rLqRHeY4C5 +partner_default_schema=partner +reportLogPath=automationLogAndReport +#--------minio proprties---------------- +s3-user-key=minioadmin +s3-user-secret=minioadmin +s3-host=http://minio.minio:9000 +s3-account=automation +s3-region=null +reportExpirationInDays=3 +# supported values yes or no +push-reports-to-s3=no +enableDebug=no +# supported values are 1 to 8 +threadCount=1 +# supported values are 0 ,1, 2 based on number of env languages +langselect=0 +#----------------------------------Database properties----------------------------------------------------------# +postgresqlUser=postgresql +db-port=5432 +db-server=dev3.mosip.net +hibernate.connection.driver_class=org.postgresql.Driver +hibernate.connection.pool_size=1 +hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect +hibernate.show_sql=true +hibernate.current_session_context_class=thread +db-su-user=postgres +postgresql-password=rLqRHeY4C5 +pms_db_schema=pms +km_db_schema=keymgr +master_db_schema=master +audit_db_schema=audit +ida_db_schema=ida + +#----------------------------------AuthDemoService Host properties----------------------------------------------------------# +#To run locally +authDemoServiceBaseURL=http://localhost +authDemoServicePort=8082 + +#To run in Docker +#authDemoServiceBaseURL=http://authdemo.apitestrig +#authDemoServicePort=80 + + +#----------------------------------IdP properties----------------------------------------------------------# + +currentUserURI=/#/uinservices/viewhistory +actuatorEndpoint=/resident/v1/actuator/env +actuatorIDAEndpoint=/idauthentication/v1/actuator/env +actuatorRegprocEndpoint=/registrationprocessor/v1/registrationtransaction/actuator/env +tokenEndpoint=/v1/esignet/oauth/token +validateBindingEndpoint=esignet-binding + +#To run in Docker +authCertsPath=/home/mosip/authcerts + +#To run locally +authCertsPath= +preconfiguredOtp=111111 +usePreConfiguredOtp=true \ No newline at end of file diff --git a/admintest/src/main/resources/config/Kernel_dev.properties b/admintest/src/main/resources/config/Kernel_dev.properties new file mode 100644 index 00000000..873efbd3 --- /dev/null +++ b/admintest/src/main/resources/config/Kernel_dev.properties @@ -0,0 +1,108 @@ +#Kernel resource uris +#Make sure all resource apis are covered +authenticationInternal=/v1/authmanager/authenticate/internal/useridPwd +zoneMappingUrl=/v1/masterdata/zoneuser +leafzonesURL=/v1/masterdata/zones/leafzones/eng +zoneNameUrl=/v1/masterdata/zones/zonename +zoneMappingActivateUrl=/v1/masterdata/zoneuser +userCenterMappingUrl=/v1/masterdata/usercentermapping +bulkUploadUrl=/v1/admin/bulkupload +#Below users are used for authentication +#PARTNER +#Dont change the partner id +#IDREPO +mosip_idrepo_app_id=idrepo +mosip_idrepo_client_id=mosip-idrepo-client +mosip_idrepo_client_secret=M7CZ6WYMi6oe695u +#IDREPO +mosip_idrepo_app_id=idrepo +mosip_idrepo_client_id=mosip-idrepo-client +mosip_idrepo_client_secret=M7CZ6WYMi6oe695u +keycloak-realm-id=mosip +keycloak-external-url=https://iam.dev.mosip.net +mosip_testrig_client_id=mosip-testrig-client +mosip_testrig_client_secret=mqKN6lkadcA3rG31 +admin +mosip_admin_app_id=admin +admin_password=mosip123 +#actuall user login will be 'adminui-auto12' +admin_userName=admin00 +mosip_admin_client_id=mosip-admin-client +mosip_admin_client_secret=xzzvvPISDPwR2yl7 +#admin +admin_zone_password=mosip123 +admin_zone_userName=globaladmin +mosip_regclient_app_id=registrationclient +mosip_reg_client_id=mosip-reg-client +mosip_reg_client_secret=ExzIU4M7MYrMZLuz +iam-users-to-create=admin00 +#iam-users-to-create=111997,220005,111992 +iam-users-password=mosip123 +roles.admin00=GLOBAL_ADMIN,ID_AUTHENTICATION,PARTNER_ADMIN,PMS_ADMIN,POLICYMANAGER,REGISTRATION_ADMIN,REGISTRATION_SUPERVISOR,ZONAL_ADMIN +roles.globaladmin=GLOBAL_ADMIN,REGISTRATION_ADMIN,uma_authorization,ZONAL_ADMIN,default-roles-mosip +partner_url=jdbc:postgresql://dev.mosip.net:5432/mosip_ida +#----------------------------------Database properties----------------------------------------------------------# +postgresqlUser=postgresql +db-port=5432 +db-server=dev.mosip.net +hibernate.connection.driver_class=org.postgresql.Driver +hibernate.connection.pool_size=1 +hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect +hibernate.show_sql=true +hibernate.current_session_context_class=thread +db-su-user=postgres +postgresql-password=mQi298ZW7p +pms_db_schema=pms +km_db_schema=keymgr +master_db_schema=master +audit_db_schema=audit +ida_db_schema=ida +db-server=dev.mosip.net +keycloak-external-url=https://iam.dev.mosip.net +audit_url=jdbc:postgresql://dev.mosip.net:5432/mosip_audit +driver_class=org.postgresql.Driver +pool_size=1 +dialect=org.hibernate.dialect.PostgreSQLDialect +show_sql=true +current_session_context_class=thread +db-su-user=postgres +postgresql-password=mQi298ZW7p +postgresqlUser=postgresql +db-port=5432 +db-server=dev.mosip.net +s3-user-key=minioadmin +s3-user-secret=minioadmin +s3-host=http://minio.minio:9000 +s3-account=automation +s3-region=null +reportExpirationInDays=3 +# supported values yes or no +push-reports-to-s3=no +enableDebug=no +# supported values are 1 to 8 +threadCount=1 +# supported values are 0 ,1, 2 based on number of env languages +langselect=0 +#----------------------------------AuthDemoService Host properties----------------------------------------------------------# +#To run locally +authDemoServiceBaseURL=http://localhost +authDemoServicePort=8082 +#To run in Docker +#authDemoServiceBaseURL=http://authdemo.apitestrig +#authDemoServicePort=80 +#----------------------------------IdP properties----------------------------------------------------------# +currentUserURI=/#/uinservices/viewhistory +actuatorEndpoint=/resident/v1/actuator/env +actuatorIDAEndpoint=/idauthentication/v1/actuator/env +actuatorRegprocEndpoint=/registrationprocessor/v1/registrationtransaction/actuator/env +tokenEndpoint=/v1/esignet/oauth/token +validateBindingEndpoint=esignet-binding +#To run in Docker +#authCertsPath=/home/mosip/authcerts +#To run locally +authCertsPath= +servicesNotDeployed= +adminPortalPath=https://admin.dev.mosip.net/ +apiEnvUser=api-internal.dev +apiInternalEndPoint=https://api-internal.dev.mosip.net + \ No newline at end of file diff --git a/admintest/src/main/resources/config/Kernel_qa-triad.properties b/admintest/src/main/resources/config/Kernel_qa-triad.properties new file mode 100644 index 00000000..71218bb5 --- /dev/null +++ b/admintest/src/main/resources/config/Kernel_qa-triad.properties @@ -0,0 +1,106 @@ +#Kernel resource uris +#Make sure all resource apis are covered +authenticationInternal=/v1/authmanager/authenticate/internal/useridPwd +zoneMappingUrl=/v1/masterdata/zoneuser +zoneNameUrl=/v1/masterdata/zones/zonename +zoneMappingActivateUrl=/v1/masterdata/zoneuser +userCenterMappingUrl=/v1/masterdata/usercentermapping +bulkUploadUrl=/v1/admin/bulkupload +#Below users are used for authentication +#PARTNER +#Dont change the partner id +#IDREPO +mosip_idrepo_app_id=idrepo +mosip_idrepo_client_id=mosip-idrepo-client +mosip_idrepo_client_secret=uqQIwIcrlz5oElb5 +#IDREPO +mosip_idrepo_app_id=idrepo +mosip_idrepo_client_id=mosip-idrepo-client +mosip_idrepo_client_secret=uqQIwIcrlz5oElb5 +keycloak-realm-id=mosip +keycloak-external-url=https://iam.qa-triad.mosip.net +mosip_testrig_client_id=mosip-testrig-client +mosip_testrig_client_secret=84VRHBpEVx4AVB7n +admin +mosip_admin_app_id=admin +admin_password=mosip123 +#actuall user login will be 'adminui-auto12' +admin_userName=auto122 +mosip_admin_client_id=mosip-admin-client +mosip_admin_client_secret=ik6vQx0u60FDemR3 +#admin +admin_zone_password=mosip123 +admin_zone_userName=globaladmin +mosip_regclient_app_id=registrationclient +mosip_reg_client_id=mosip-reg-client +mosip_reg_client_secret=IviZHMzm4lboHBDJ +iam-users-to-create=auto122,globaladmin +#iam-users-to-create=111997,220005,111992 +iam-users-password=mosip123,mosip123 +roles.auto122=GLOBAL_ADMIN,ID_AUTHENTICATION,PARTNER_ADMIN,PMS_ADMIN,POLICYMANAGER,REGISTRATION_ADMIN,REGISTRATION_SUPERVISOR,ZONAL_ADMIN +roles.globaladmin=GLOBAL_ADMIN,REGISTRATION_ADMIN,uma_authorization,ZONAL_ADMIN,default-roles-mosip +partner_url=jdbc:postgresql://qa-triad.mosip.net:5432/mosip_ida +#----------------------------------Database properties----------------------------------------------------------# +postgresqlUser=postgresql +db-port=5432 +db-server=qa-triad.mosip.net +hibernate.connection.driver_class=org.postgresql.Driver +hibernate.connection.pool_size=1 +hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect +hibernate.show_sql=true +hibernate.current_session_context_class=thread +db-su-user=postgres +postgresql-password=9AdeAN3GFr +pms_db_schema=pms +km_db_schema=keymgr +master_db_schema=master +audit_db_schema=audit +ida_db_schema=ida +db-server=qa-triad.mosip.net +keycloak-external-url=https://iam.qa-triad.mosip.net +audit_url=jdbc:postgresql://qa-triad.mosip.net:5432/mosip_audit +driver_class=org.postgresql.Driver +pool_size=1 +dialect=org.hibernate.dialect.PostgreSQLDialect +show_sql=true +current_session_context_class=thread +db-su-user=postgres +postgresql-password=9AdeAN3GFr +postgresqlUser=postgresql +db-port=5432 +db-server=qa-triad.mosip.net +s3-user-key=minioadmin +s3-user-secret=minioadmin +s3-host=http://minio.minio:9000 +s3-account=automation +s3-region=null +reportExpirationInDays=3 +# supported values yes or no +push-reports-to-s3=no +enableDebug=no +# supported values are 1 to 8 +threadCount=1 +# supported values are 0 ,1, 2 based on number of env languages +langselect=0 +#----------------------------------AuthDemoService Host properties----------------------------------------------------------# +#To run locally +authDemoServiceBaseURL=http://localhost +authDemoServicePort=8082 +#To run in Docker +#authDemoServiceBaseURL=http://authdemo.apitestrig +#authDemoServicePort=80 +#----------------------------------IdP properties----------------------------------------------------------# +currentUserURI=/#/uinservices/viewhistory +actuatorEndpoint=/resident/v1/actuator/env +actuatorIDAEndpoint=/idauthentication/v1/actuator/env +actuatorRegprocEndpoint=/registrationprocessor/v1/registrationtransaction/actuator/env +tokenEndpoint=/v1/esignet/oauth/token +validateBindingEndpoint=esignet-binding +#To run in Docker +#authCertsPath=/home/mosip/authcerts +#To run locally +authCertsPath= +adminPortalPath=https://admin.qa-triad.mosip.net/ +apiEnvUser=api-internal.qa-triad +apiInternalEndPoint=https://api-internal.qa-triad.mosip.net + \ No newline at end of file diff --git a/admintest/src/main/resources/config/Kernel_qa-upgrade-f1.properties b/admintest/src/main/resources/config/Kernel_qa-upgrade-f1.properties new file mode 100644 index 00000000..d15724a7 --- /dev/null +++ b/admintest/src/main/resources/config/Kernel_qa-upgrade-f1.properties @@ -0,0 +1,128 @@ +#Kernel resource uris +#Make sure all resource apis are covered +authenticationInternal=/v1/authmanager/authenticate/internal/useridPwd +zoneMappingUrl=/v1/masterdata/zoneuser +leafzonesURL=/v1/masterdata/zones/leafzones/eng +#zoneNameUrl=/v1/masterdata/zones/zonename +zoneMappingActivateUrl=/v1/masterdata/zoneuser +userCenterMappingUrl=/v1/masterdata/usercentermapping +bulkUploadUrl=/v1/admin/bulkupload +#Below users are used for authentication +#PARTNER +#Dont change the partner id +#IDREPO +mosip_idrepo_app_id=idrepo +mosip_idrepo_client_id=mosip-idrepo-client +mosip_idrepo_client_secret=jsNIZfKZY1P6xWjn +#IDREPO +mosip_idrepo_app_id=idrepo +mosip_idrepo_client_id=mosip-idrepo-client +mosip_idrepo_client_secret=jsNIZfKZY1P6xWjn +keycloak-realm-id=mosip +keycloak-external-url=https://iam.qa-upgrade-f1.mosip.net +mosip_testrig_client_id=mosip-testrig-client +mosip_testrig_client_secret=q7OD54mSVPQDwVfJ +admin +mosip_admin_app_id=admin +admin_password=mosip123 +#actuall user login will be 'adminui-auto12' +admin_userName=admin1 +mosip_admin_client_id=mosip-admin-client +mosip_admin_client_secret=IkWnflKaMujZEjdZ +#admin +admin_zone_password=mosip123 +admin_zone_userName=globaladmin +mosip_regclient_app_id=registrationclient +mosip_reg_client_id=mosip-reg-client +mosip_reg_client_secret=q3ynuI9KA1SEubcX +iam-users-to-create=admin1 +#iam-users-to-create=111997,220005,111992 +iam-users-password=mosip123,mosip123 +roles.admin00=GLOBAL_ADMIN,ID_AUTHENTICATION,PARTNER_ADMIN,PMS_ADMIN,POLICYMANAGER,REGISTRATION_ADMIN,REGISTRATION_SUPERVISOR,ZONAL_ADMIN +roles.globaladmin=GLOBAL_ADMIN,REGISTRATION_ADMIN,uma_authorization,ZONAL_ADMIN,default-roles-mosip +partner_url=jdbc:postgresql://qa-upgrade-f1.mosip.net:5432/mosip_ida +#----------------------------------Database properties----------------------------------------------------------# +postgresqlUser=postgresql +db-port=5432 +db-server=qa-upgrade-f1.mosip.net +hibernate.connection.driver_class=org.postgresql.Driver +hibernate.connection.pool_size=1 +hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect +hibernate.show_sql=true +hibernate.current_session_context_class=thread +db-su-user=postgres +postgresql-password=MDBlQAuhj6 +pms_db_schema=pms +km_db_schema=keymgr +master_db_schema=master +audit_db_schema=audit +ida_db_schema=ida +db-server=qa-upgrade-f1.mosip.net +keycloak-external-url=https://iam.qa-upgrade-f1.mosip.net +audit_url=jdbc:postgresql://qa-upgrade-f1.mosip.net:5432/mosip_audit +driver_class=org.postgresql.Driver +pool_size=1 +dialect=org.hibernate.dialect.PostgreSQLDialect +show_sql=true +current_session_context_class=thread +db-su-user=postgres +postgresql-password=MDBlQAuhj6 +postgresqlUser=postgresql +db-port=5432 +db-server=qa-upgrade-f1.mosip.net +s3-user-key=minioadmin +s3-user-secret=minioadmin +s3-host=http://minio.minio:9000 +s3-account=automation +s3-region=null +reportExpirationInDays=3 +# supported values yes or no +push-reports-to-s3=no +enableDebug=no +# supported values are 1 to 8 +threadCount=1 +# supported values are 0 ,1, 2 based on number of env languages +langselect=0 +#suppport sin or eng,hin,kan,tam,fra,ara +loginlang=sin +#----------------------------------AuthDemoService Host properties----------------------------------------------------------# +#To run locally +authDemoServiceBaseURL=http://localhost +authDemoServicePort=8082 +#To run in Docker +#authDemoServiceBaseURL=http://authdemo.apitestrig +#authDemoServicePort=80 +#----------------------------------IdP properties----------------------------------------------------------# +currentUserURI=/#/uinservices/viewhistory +actuatorEndpoint=/resident/v1/actuator/env +actuatorIDAEndpoint=/idauthentication/v1/actuator/env +actuatorRegprocEndpoint=/registrationprocessor/v1/registrationtransaction/actuator/env +tokenEndpoint=/v1/esignet/oauth/token +validateBindingEndpoint=esignet-binding +#To run in Docker +#authCertsPath=/home/mosip/authcerts +#To run locally +authCertsPath= + +servicesNotDeployed= + +adminPortalPath=https://admin.qa-upgrade-f1.mosip.net/ +apiEnvUser=api-internal.qa-upgrade-f1 +apiInternalEndPoint=https://api-internal.qa-upgrade-f1.mosip.net +#----------------------------------Test_data--------------------------------------------- +adminscenariosToExecute=centerCRUD,centerCRUD +holidayDateCenter=11/12/2026 +holidayDate=10/12/2026 +validityDate=10/12/2026 +preappend=00 +splitdigit=7 +jsonObjName=identity +bulkwait=10000 +dummyData=blocklistwordss +publicKey=AAEACwACAHIAIINxl2dEhLP4GpDMjUal1yT9UtduBlILZPKh2hszFGmqABAAFwALCAAAAQABAQDFEX4nLppAuHIfGzhYn7DR_3wAQkVnrPSFFaiV9TAvN0WHtH_hweGNNjUGYvyaowwmC8jsazufmnIoPisZIFraVQNWCA6N0RhZF_LisoTYDoQSM-ZbCKPxRTFnemtTwXHxQdlVWGUXst_WZIWC0OTSzJHbBg_iXQW1UOXRJL845GFOKjvOPQiEbOZgmoWslkTIAi9bf-AeWdEYuO3bwPf-T5Xxj_xH2-PTinQA_4itRWSrhG5kEU-zQHWGL72SiGzwOOoPnzZZv2X_9djpWGEz1gyNl5ionns8IfuQrvikSEMxm-E6Z9RfKNhl_rEHgnOR4gl0ju5kg_n9tnuUeXXP +signPublicKey=AAEABAAEAHIAAAAQABQACwgAAAEAAQEArjUwXvR8QvkWcplKOqMhU-tK4YxPHdkkm9IN7azBolMoAs41uR32xp070AW5LfhQokuEskOF_dvRrqHw4JzWMXDRVSpBrW_k-OwLzNfeFvuKQ9JTAXdzKUOXbPgcLY1B5bJe9E7fn-gPKYki35RgwphHraSKaYZ1yELpXiT3KPoWXzDvZE5Lqx317bgMGh2RPkf80alJks-iv-aEPDWlSWE5jr3t68gUYx4r_eixdw6tx1ADGCqK1ZEKCul73ptnR8eWorN1njcxlxUaoECvf3rCEuvfZAprBKSWBEnaFPkfgc9lYSBwtP4YKJHttmPX0Dzc85wa6V17SIwNVEiCsQ +headless=yes +docker=yes +langcode=[{"language":"tam","value":"தமிழ௜uFFFD"},{"language":"kan","value":"ಜu2022ನ೜uFFFDನಡ"},{"language":"hin","value":"hin"},{"language":"eng1","value":"English"},{"language":"eng","value":"English"},{"language":"fra","value":"Français"},{"language":"ara","value":"Arabic"}] + + \ No newline at end of file diff --git a/admintest/src/main/resources/config/Kernel_qa-upgrade3.properties b/admintest/src/main/resources/config/Kernel_qa-upgrade3.properties new file mode 100644 index 00000000..ed86e2f9 --- /dev/null +++ b/admintest/src/main/resources/config/Kernel_qa-upgrade3.properties @@ -0,0 +1,106 @@ +#Kernel resource uris +#Make sure all resource apis are covered +authenticationInternal=/v1/authmanager/authenticate/internal/useridPwd +zoneMappingUrl=/v1/masterdata/zoneuser +zoneNameUrl=/v1/masterdata/zones/zonename +zoneMappingActivateUrl=/v1/masterdata/zoneuser +userCenterMappingUrl=/v1/masterdata/usercentermapping +bulkUploadUrl=/v1/admin/bulkupload +#Below users are used for authentication +#PARTNER +#Dont change the partner id +#IDREPO +mosip_idrepo_app_id=idrepo +mosip_idrepo_client_id=mosip-idrepo-client +mosip_idrepo_client_secret=1goKToWjb8t6nFeW +#IDREPO +mosip_idrepo_app_id=idrepo +mosip_idrepo_client_id=mosip-idrepo-client +mosip_idrepo_client_secret=1goKToWjb8t6nFeW +keycloak-realm-id=mosip +keycloak-external-url=https://iam.qa-upgrade3.mosip.net +mosip_testrig_client_id=mosip-testrig-client +mosip_testrig_client_secret=F0nqSasG5fWPpBvG +admin +mosip_admin_app_id=admin +admin_password=mosip123 +#actuall user login will be 'adminui-auto12' +admin_userName=auto126 +mosip_admin_client_id=mosip-admin-client +mosip_admin_client_secret=f3mZVaYBfuvyfcjJ +#admin +admin_zone_password=mosip123 +admin_zone_userName=globaladmin +mosip_regclient_app_id=registrationclient +mosip_reg_client_id=mosip-reg-client +mosip_reg_client_secret=zPnLp4cpbpl3z6LX +iam-users-to-create=auto126 +#iam-users-to-create=111997,220005,111992 +iam-users-password=mosip123,mosip123 +roles.auto126=GLOBAL_ADMIN,ID_AUTHENTICATION,PARTNER_ADMIN,PMS_ADMIN,POLICYMANAGER,REGISTRATION_ADMIN,REGISTRATION_SUPERVISOR,ZONAL_ADMIN +roles.globaladmin=GLOBAL_ADMIN,REGISTRATION_ADMIN,uma_authorization,ZONAL_ADMIN,default-roles-mosip +partner_url=jdbc:postgresql://qa-upgrade3.mosip.net:5432/mosip_ida +#----------------------------------Database properties----------------------------------------------------------# +postgresqlUser=postgresql +db-port=5432 +db-server=qa-upgrade3.mosip.net +hibernate.connection.driver_class=org.postgresql.Driver +hibernate.connection.pool_size=1 +hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect +hibernate.show_sql=true +hibernate.current_session_context_class=thread +db-su-user=postgres +postgresql-password=9AdeAN3GFr +pms_db_schema=pms +km_db_schema=keymgr +master_db_schema=master +audit_db_schema=audit +ida_db_schema=ida +db-server=qa-upgrade3.mosip.net +keycloak-external-url=https://iam.qa-upgrade3.mosip.net +audit_url=jdbc:postgresql://qa-upgrade3.mosip.net:5432/mosip_audit +driver_class=org.postgresql.Driver +pool_size=1 +dialect=org.hibernate.dialect.PostgreSQLDialect +show_sql=true +current_session_context_class=thread +db-su-user=postgres +postgresql-password=9AdeAN3GFr +postgresqlUser=postgresql +db-port=5432 +db-server=qa-upgrade3.mosip.net +s3-user-key=minioadmin +s3-user-secret=minioadmin +s3-host=http://minio.minio:9000 +s3-account=automation +s3-region=null +reportExpirationInDays=3 +# supported values yes or no +push-reports-to-s3=no +enableDebug=no +# supported values are 1 to 8 +threadCount=1 +# supported values are 0 ,1, 2 based on number of env languages +langselect=0 +#----------------------------------AuthDemoService Host properties----------------------------------------------------------# +#To run locally +authDemoServiceBaseURL=http://localhost +authDemoServicePort=8082 +#To run in Docker +#authDemoServiceBaseURL=http://authdemo.apitestrig +#authDemoServicePort=80 +#----------------------------------IdP properties----------------------------------------------------------# +currentUserURI=/#/uinservices/viewhistory +actuatorEndpoint=/resident/v1/actuator/env +actuatorIDAEndpoint=/idauthentication/v1/actuator/env +actuatorRegprocEndpoint=/registrationprocessor/v1/registrationtransaction/actuator/env +tokenEndpoint=/v1/esignet/oauth/token +validateBindingEndpoint=esignet-binding +#To run in Docker +#authCertsPath=/home/mosip/authcerts +#To run locally +authCertsPath= +adminPortalPath=https://admin.qa-upgrade3.mosip.net/ +apiEnvUser=api-internal.qa-upgrade3 +apiInternalEndPoint=https://api-internal.qa-upgrade3.mosip.net + \ No newline at end of file diff --git a/admintest/src/main/resources/config/application.properties b/admintest/src/main/resources/config/application.properties new file mode 100644 index 00000000..53517d97 --- /dev/null +++ b/admintest/src/main/resources/config/application.properties @@ -0,0 +1,6 @@ +# common properties + +preregLoginConfigUrl=/preregistration/v1/login/config +masterSchemaURL=/v1/masterdata/idschema/latest +addIdentityURL=/idrepository/v1/identity/ +idRepoGenVidURL=/idrepository/v1/vid \ No newline at end of file diff --git a/admintest/src/main/resources/config/healthCheckEndpoint.properties b/admintest/src/main/resources/config/healthCheckEndpoint.properties new file mode 100644 index 00000000..1958eb2a --- /dev/null +++ b/admintest/src/main/resources/config/healthCheckEndpoint.properties @@ -0,0 +1,43 @@ +###### = +regproc_masterdata=/v1/hotlist/actuator/health +masterdata=/v1/admin/actuator/health +auth_idrepo_resident_regproc_masterdata=/v1/auditmanager/actuator/health +regproc=/v1/identity/actuator/health +auth_idrepo_resident_regproc_masterdata=/v1/authmanager/actuator/health +auth_idrepo_regproc=/biosdk-service/actuator/health +auth_mobileid=/v1/credentialservice/actuator/health +auth_mobileid=/v1/credentialrequest/actuator/health +auth_idrepo_regproc_partner=/v1/datashare/actuator/health +auth_mobileid_esignet=/idauthentication/v1/actuator/health +auth_mobileid_esignet_partner=/idauthentication/v1/internal/actuator/health +auth_mobileid_esignet=/idauthentication/v1/otp/actuator/health +idrepo_auth_mobileid_mimoto_esignet_resident_regproc=/idrepository/v1/identity/actuator/health +idrepo_regproc=/v1/idgenerator/actuator/health +idrepo_resident_regproc_masterdata=/v1/keymanager/actuator/health +auth_idrepo_masterdata_mobileid_mimoto_esignet_resident_partner_prereg_regproc=/v1/masterdata/actuator/health +regproc=/v1/mock-abis-service/actuator/health +regproc=/v1/mockmv/actuator/health +auth_idrepo_resident_regproc=/v1/notifier/actuator/health +auth_mobileid=/v1/otpmanager/actuator/health +regproc=/v1/packetcreator/actuator/health +regproc=/commons/v1/packetmanager/actuator/health +partner_auth_esignet_idrepo_resident_regproc=/v1/partnermanager/actuator/health +partner_auth_esignet_regproc=/v1/policymanager/actuator/health +prereg=/preregistration/v1/captcha/actuator/health +prereg=/v1/pridgenerator/actuator/health +regproc=/v1/print/actuator/health +regproc=/registrationprocessor/v1/camelbridge/actuator/health +resident_regproc=/registrationprocessor/v1/packetreceiver/actuator/health +regproc=/registrationprocessor/v1/landingzone/actuator/health +regproc=/registrationprocessor/v1/notification/actuator/health +regproc=/registrationprocessor/v1/opencrvs-stage/actuator/health +regproc=/registrationprocessor/v1/reprocessor/actuator/health +regproc_masterdata=/registrationprocessor/v1/registrationstatus/actuator/health +regproc=/registrationprocessor/v1/registrationtransaction/actuator/health +regproc=/registrationprocessor/v1/workflowmanager/actuator/health +resident_auth_esignet_mobileid=/resident/v1/actuator/health +idrepo_auth_mobileid_mimoto_esignet_resident=/v1/ridgenerator/actuator/health +regproc_masterdata=/v1/syncdata/actuator/health +idrepo_auth_mobileid_mimoto_esignet_resident_regproc=/idrepository/v1/actuator/health +auth_idrepo_resident_regproc=/hub/actuator/health +resident_esignet=/v1/esignet/actuator/health \ No newline at end of file diff --git a/admintest/src/main/resources/config/kernel_dev2.properties b/admintest/src/main/resources/config/kernel_dev2.properties new file mode 100644 index 00000000..9923e9a3 --- /dev/null +++ b/admintest/src/main/resources/config/kernel_dev2.properties @@ -0,0 +1,128 @@ +#Kernel resource uris +#Make sure all resource apis are covered +authenticationInternal=/v1/authmanager/authenticate/internal/useridPwd +zoneMappingUrl=/v1/masterdata/zoneuser +leafzonesURL=/v1/masterdata/zones/leafzones/eng +#zoneNameUrl=/v1/masterdata/zones/zonename +zoneMappingActivateUrl=/v1/masterdata/zoneuser +userCenterMappingUrl=/v1/masterdata/usercentermapping +bulkUploadUrl=/v1/admin/bulkupload +#Below users are used for authentication +#PARTNER +#Dont change the partner id +#IDREPO +mosip_idrepo_app_id=idrepo +mosip_idrepo_client_id=mosip-idrepo-client +mosip_idrepo_client_secret=IGsZkHXcAoqGKRTA +#IDREPO +mosip_idrepo_app_id=idrepo +mosip_idrepo_client_id=mosip-idrepo-client +mosip_idrepo_client_secret=IGsZkHXcAoqGKRTA +keycloak-realm-id=mosip +keycloak-external-url=https://iam.dev2.mosip.net +mosip_testrig_client_id=mosip-testrig-client +mosip_testrig_client_secret=Xup50UX3AybAkzkH +admin +mosip_admin_app_id=admin +admin_password=mosip123 +#actuall user login will be 'adminui-auto12' + +mosip_admin_client_id=mosip-admin-client +mosip_admin_client_secret=E4386XMrYOvoHMJ5 +#admin +admin_zone_password=mosip123 +admin_zone_userName=globaladmin +mosip_regclient_app_id=registrationclient +mosip_reg_client_id=mosip-reg-client +mosip_reg_client_secret=3H9qsSxmYn4bXBk8 +iam-users-to-create=admin00 +#iam-users-to-create=111997,220005,111992 +iam-users-password=mosip123 +roles.admin123=GLOBAL_ADMIN,ID_AUTHENTICATION,PARTNER_ADMIN,PMS_ADMIN,POLICYMANAGER,REGISTRATION_ADMIN,REGISTRATION_SUPERVISOR,ZONAL_ADMIN +roles.globaladmin=GLOBAL_ADMIN,REGISTRATION_ADMIN,uma_authorization,ZONAL_ADMIN,default-roles-mosip +partner_url=jdbc:postgresql://dev2.mosip.net:5432/mosip_ida +#----------------------------------Database properties----------------------------------------------------------# +postgresqlUser=postgresql +db-port=5432 +db-server=dev2.mosip.net +hibernate.connection.driver_class=org.postgresql.Driver +hibernate.connection.pool_size=1 +hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect +hibernate.show_sql=true +hibernate.current_session_context_class=thread +db-su-user=postgres +postgresql-password=FRekEGMjiC +pms_db_schema=pms +km_db_schema=keymgr +master_db_schema=master +audit_db_schema=audit +ida_db_schema=ida +db-server=dev2.mosip.net +keycloak-external-url=https://iam.dev2.mosip.net +audit_url=jdbc:postgresql://dev2.mosip.net:5432/mosip_audit +driver_class=org.postgresql.Driver +pool_size=1 +dialect=org.hibernate.dialect.PostgreSQLDialect +show_sql=true +current_session_context_class=thread +db-su-user=postgres +postgresql-password=FRekEGMjiC +postgresqlUser=postgresql +db-port=5432 +db-server=dev2.mosip.net +s3-user-key=minioadmin +s3-user-secret=minioadmin +s3-host=http://minio.minio:9000 +s3-account=automation +s3-region=null +reportExpirationInDays=3 +# supported values yes or no +push-reports-to-s3=no +enableDebug=yes +# supported values are 1 to 8 +threadCount=1 +# supported values are 0 ,1, 2 based on number of env languages +langselect=0 +#suppport sin or eng,hin,kan,tam,fra,ara +loginlang=sin +#----------------------------------AuthDemoService Host properties----------------------------------------------------------# +#To run locally +authDemoServiceBaseURL=http://localhost +authDemoServicePort=8082 +#To run in Docker +#authDemoServiceBaseURL=http://authdemo.apitestrig +#authDemoServicePort=80 +#----------------------------------IdP properties----------------------------------------------------------# +currentUserURI=/#/uinservices/viewhistory +actuatorEndpoint=/resident/v1/actuator/env +actuatorIDAEndpoint=/idauthentication/v1/actuator/env +actuatorRegprocEndpoint=/registrationprocessor/v1/registrationtransaction/actuator/env +tokenEndpoint=/v1/esignet/oauth/token +validateBindingEndpoint=esignet-binding +#To run in Docker +#authCertsPath=/home/mosip/authcerts +#To run locally +authCertsPath= + +servicesNotDeployed= + +adminPortalPath=https://admin.dev2.mosip.net/ +apiEnvUser=api-internal.dev2 +apiInternalEndPoint=https://api-internal.dev2.mosip.net + +#----------------------------------Test_data--------------------------------------------- +adminscenariosToExecute=bulkUploadCRUD +holidayDateCenter=11/12/2026 +holidayDate=10/12/2025 +validityDate=10/12/2026 +preappend=00 +splitdigit=7 +jsonObjName=identity +bulkwait=10000 +dummyData=blocklistwordss +publicKey=AAEACwACAHIAIINxl2dEhLP4GpDMjUal1yT9aaUtduBlILZPKh2hszFGmqABAAFwALCAAAAQABAQDFEX4nLppAuHIfGzhYn7DR_3wAQkVnrPSFFaiV9TAvN0WHtH_hweGNNjUGYvyaowwmC8jsazufmnIoPisZIFraVQNWCA6N0RhZF_LisoTYDoQSM-ZbCKPxRTFnemtTwXHxQdlVWGUXst_WZIWC0OTSzJHbBg_iXQW1UOXRJL845GFOKjvOPQiEbOZgmoWslkTIAi9bf-AeWdEYuO3bwPf-T5Xxj_xH2-PTinQA_4itRWSrhG5kEU-zQHWGL72SiGzwOOoPnzZZv2X_9djpWGEz1gyNl5ionns8IfuQrvikSEMxm-E6Z9RfKNhl_rEHgnOR4gl0ju5kg_n9tnuUeXXP +signPublicKey=AAEABAAEAHIAAAAQABQACwgAAAEAAQEArjUwXvR8QvkWcplKOqMhU-tK4YxPHdkkm9IN7azBolMoAs41uR32xp070AW5LfhQokuEskOF_dvRrqHw4JzWMXDRVSpBrW_k-OwLzNfeFvuKQ9JTAXdzKUOXbPgcLY1B5bJe9E7fn-gPKYki35RgwphHraSKaYZ1yELpXiT3KPoWXzDvZE5Lqx317bgMGh2RPkf80alJks-iv-aEPDWlSWE5jr3t68gUYx4r_eixdw6tx1ADGCqK1ZEKCul73ptnR8eWorN1njcxlxUaoECvf3rCEuvfZAprBKSWBEnaFPkfgc9lYSBwtP4YKJHttmPX0Dzc85wa6V17SIwNVEiCsQ +headless=no +docker=yes +langcode=[{"language":"tam","value":"தமிழ\uFFFD"},{"language":"kan","value":"\u2022ನ\uFFFDನಡ"},{"language":"hin","value":"hin"},{"language":"eng1","value":"English"},{"language":"eng","value":"English"},{"language":"fra","value":"Français"},{"language":"ara","value":"Arabic"}] + \ No newline at end of file diff --git a/admintest/src/main/resources/delete.sql b/admintest/src/main/resources/delete.sql new file mode 100644 index 00000000..6e3afb3f --- /dev/null +++ b/admintest/src/main/resources/delete.sql @@ -0,0 +1,44 @@ +delete from applicant_valid_document where cr_by ='adminui-auto10'; +delete from appl_form_type where cr_by ='adminui-auto10'; +delete from biometric_attribute where cr_by ='adminui-auto10'; +delete from biometric_type where cr_by ='adminui-auto10'; +delete from blocklisted_words where cr_by ='adminui-auto10'; +delete from daysofweek_list where cr_by ='adminui-auto10'; +delete from device_master where cr_by ='adminui-auto10'; +delete from device_master_h where cr_by ='adminui-auto10'; +delete from device_spec where cr_by ='adminui-auto10'; +delete from device_type where cr_by ='adminui-auto10'; +delete from doc_category where cr_by ='adminui-auto10'; +delete from doc_type where cr_by ='adminui-auto10'; +delete from dynamic_field where cr_by ='adminui-auto10'; +delete from gender where cr_by ='adminui-auto10'; +delete from id_type where cr_by ='adminui-auto10'; +delete from individual_type where cr_by ='adminui-auto10'; +delete from language where cr_by ='adminui-auto10'; +delete from location where cr_by ='adminui-auto10'; +delete from loc_hierarchy_list where cr_by ='adminui-auto10'; +delete from loc_holiday where cr_by ='adminui-auto10'; +delete from machine_master where cr_by ='adminui-auto10'; +delete from machine_master_h where cr_by ='adminui-auto10'; +delete from machine_spec where cr_by ='adminui-auto10'; +delete from machine_type where cr_by ='adminui-auto10'; +delete from module_detail where cr_by ='adminui-auto10'; +delete from reason_category where cr_by ='adminui-auto10'; +delete from reason_list where cr_by ='adminui-auto10'; +delete from registration_center where cr_by ='adminui-auto10'; +delete from registration_center_h where cr_by ='adminui-auto10'; +delete from reg_center_type where cr_by ='adminui-auto10'; +delete from reg_device_type where cr_by ='adminui-auto10'; +delete from reg_exceptional_holiday where cr_by ='adminui-auto10'; +delete from reg_working_nonworking where cr_by ='adminui-auto10'; +delete from template where cr_by ='adminui-auto10'; +delete from template_file_format where cr_by ='adminui-auto10'; +delete from template_type where cr_by ='adminui-auto10'; +delete from title where cr_by ='adminui-auto10'; +delete from user_detail where cr_by ='adminui-auto10'; +delete from user_detail_h where cr_by ='adminui-auto10'; +delete from valid_document where cr_by ='adminui-auto10'; +delete from zone where cr_by ='adminui-auto10'; +delete from zone_user where cr_by ='adminui-auto10'; +delete from zone_user_h where cr_by ='adminui-auto10'; +delete from blocklisted_words where cr_by ='adminui-auto10'; \ No newline at end of file diff --git a/admintest/src/main/resources/logback.xml b/admintest/src/main/resources/logback.xml index 37c88d0a..9946619a 100644 --- a/admintest/src/main/resources/logback.xml +++ b/admintest/src/main/resources/logback.xml @@ -19,9 +19,9 @@ - + - \ No newline at end of file + diff --git a/admintest/src/main/resources/testngFile/testng.xml b/admintest/src/main/resources/testngFile/testng.xml new file mode 100644 index 00000000..1a853b3d --- /dev/null +++ b/admintest/src/main/resources/testngFile/testng.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/automation/pom.xml b/automation/pom.xml deleted file mode 100644 index d68911ac..00000000 --- a/automation/pom.xml +++ /dev/null @@ -1,154 +0,0 @@ - - 4.0.0 - admin-ui-automation - admin-ui-automation - 0.0.1-SNAPSHOT - admin-ui-automation - admin-ui-automation - - 11 - 11 - - - - - - - - selenium-tests - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.12.4 - - - testng.xml - - - - - - - - - - - - - - org.seleniumhq.selenium - selenium-java - 3.141.59 - - - - - - org.json - json - 20210307 - - - - - com.fasterxml.jackson.core - jackson-core - 2.12.5 - - - - com.fasterxml.jackson.core - jackson-databind - 2.12.5 - - - - - - org.awaitility - awaitility - 4.0.3 - - - ch.qos.logback - logback-core - 1.2.6 - - - org.slf4j - slf4j-api - 1.7.30 - - - - - ch.qos.logback - logback-classic - 1.2.6 - - - com.paulhammant - ngwebdriver - 1.1.5 - - - - - - - - - org.testng - testng - 7.1.0 - - - - - - commons-io - commons-io - 2.6 - - - - - - - - - - - org.apache.maven.plugins - maven-assembly-plugin - 3.1.1 - - - jar-with-dependencies - - - - true - automation.utility.TestRunner - - - - - - make-assembly - package - - single - - - - - - - - \ No newline at end of file diff --git a/automation/src/main/java/automation/testcase/BlockListTest.java b/automation/src/main/java/automation/testcase/BlockListTest.java deleted file mode 100644 index da9d031e..00000000 --- a/automation/src/main/java/automation/testcase/BlockListTest.java +++ /dev/null @@ -1,59 +0,0 @@ -package automation.testcase; - -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.TimeUnit; - -import org.openqa.selenium.By; -import org.openqa.selenium.Dimension; -import org.openqa.selenium.JavascriptExecutor; -import org.openqa.selenium.StaleElementReferenceException; -import org.openqa.selenium.TimeoutException; -import org.openqa.selenium.WebDriver; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.chrome.ChromeDriver; -import org.openqa.selenium.interactions.Actions; -import org.openqa.selenium.support.ui.ExpectedConditions; -import org.openqa.selenium.support.ui.WebDriverWait; -import org.testng.Assert; -// Generated by Selenium IDE -//import org.junit.Test; -//import org.junit.Before; -//import org.junit.After; -import org.testng.annotations.AfterClass; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; - -import automation.utility.BaseClass; -import automation.utility.Commons; - -public class BlockListTest extends BaseClass { - - @Test(groups = "BL") - public void blocklistedwordsCRUD() { - - String idBlocklisted="admin/masterdata/blocklisted-words/view"; - Commons.click(driver, By.xpath("//a[@href='#/admin/masterdata']")); - - Commons.click(driver, By.id(idBlocklisted)); - - Commons.click(driver, By.id("Create")); //FIX - Commons.enter(driver, By.id("word"), data); - Commons.enter(driver, By.id("description"), data); - - - Commons.create(driver); - Commons.filter(driver, By.id("word"), data); - - - Commons.edit(driver,data+1,By.id("word")); - Commons.filter(driver, By.id("word"), data+1); - - Commons.activate(driver); - Commons.edit(driver,data+2,By.id("word")); - Commons.filter(driver, By.id("word"), data+2); - Commons.deactivate(driver); - - - } -} diff --git a/automation/src/main/java/automation/testcase/CenterTest.java b/automation/src/main/java/automation/testcase/CenterTest.java deleted file mode 100644 index 525d8c74..00000000 --- a/automation/src/main/java/automation/testcase/CenterTest.java +++ /dev/null @@ -1,100 +0,0 @@ -package automation.testcase; -import static org.testng.Assert.assertNotEquals; - -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.TimeUnit; - -import org.openqa.selenium.By; -import org.openqa.selenium.Dimension; -import org.openqa.selenium.JavascriptExecutor; -import org.openqa.selenium.StaleElementReferenceException; -import org.openqa.selenium.TimeoutException; -import org.openqa.selenium.WebDriver; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.chrome.ChromeDriver; -import org.openqa.selenium.interactions.Actions; -import org.openqa.selenium.support.ui.ExpectedConditions; -import org.openqa.selenium.support.ui.WebDriverWait; -import org.testng.annotations.AfterClass; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; - -import automation.utility.BaseClass; -import automation.utility.Commons; -public class CenterTest extends BaseClass{ - - @Test(groups = "CTR") - - public void centerCRUD() throws InterruptedException { - - - Commons.click(driver,By.id("admin/resources")); - - Commons.click(driver,By.id("/admin/resources/centers")); - - Commons.click(driver, By.id("Create Center")); - /* - * Select Registration Center Type - */ - - /** - * centerTypeCode dropdown - */ - Commons.enter(driver, By.id("name"), data); - - Commons.dropdown(driver,By.id("centerTypeCode")); - Commons.enter(driver, By.id("contactPerson"),data); - Commons.enter(driver,By.id("contactPhone"),data); - - Commons.enter(driver,By.id("longitude"),"1.1234"); - Commons.enter(driver,By.id("latitude"),"2.2345"); - Commons.enter(driver,By.id("addressLine1"),data); - Commons.enter(driver,By.id("addressLine2"),data); - Commons.enter(driver,By.id("addressLine3"),data); - - Commons.dropdown(driver, By.xpath("(//*[@id='fieldName'])[1]")); - Commons.dropdown(driver, By.xpath("(//*[@id='fieldName'])[2]")); - Commons.dropdown(driver, By.xpath("(//*[@id='fieldName'])[3]")); - Commons.dropdown(driver, By.xpath("(//*[@id='fieldName'])[4]")); - Commons.dropdown(driver, By.xpath("(//*[@id='fieldName'])[5]")); - - - Commons.dropdown(driver, By.id("zone")); - Commons.dropdown(driver, By.id("holidayZone")); - - - - - Commons.enter(driver,By.id("noKiosk"),"10"); - - Commons.dropdown(driver,By.id("processingTime"),"45"); - Commons.dropdown(driver,By.id("startTime"),"9:00 AM"); - Commons.dropdown(driver,By.id("endTime"),"5:00 PM"); - Commons.dropdown(driver,By.id("lunchStartTime"),"1:00 PM"); - Commons.dropdown(driver,By.id("lunchEndTime"),"2:00 PM"); - - Commons.click(driver,By.cssSelector(".mat-list-item:nth-child(1) .mat-pseudo-checkbox")); - Commons.click(driver,By.cssSelector(".mat-list-item:nth-child(2) .mat-pseudo-checkbox")); - Commons.click(driver,By.cssSelector(".mat-list-item:nth-child(3) > .mat-list-item-content")); - Commons.click(driver,By.cssSelector(".mat-list-item:nth-child(4) > .mat-list-item-content")); - Commons.click(driver,By.cssSelector(".mat-list-item:nth-child(5) > .mat-list-item-content")); - - Commons.enter(driver,By.id("holidayDate"),"27/11/2022"); - Commons.click(driver, By.id("createExceptionalHoliday")); - - Commons.createRes(driver); - Commons.filterCenter(driver, By.id("name"), data); - - - Commons.editCenter(driver,data+1,By.id("name")); - - Commons.filterCenter(driver, By.id("name"), data+1); - - Commons.activate(driver); - Commons.editCenter(driver,data+2,By.id("name")); - Commons.filterCenter(driver, By.id("name"), data+2); - Commons.deactivate(driver); - Commons.decommission(driver); - } -} diff --git a/automation/src/main/java/automation/testcase/CenterTypeTest.java b/automation/src/main/java/automation/testcase/CenterTypeTest.java deleted file mode 100644 index 219162db..00000000 --- a/automation/src/main/java/automation/testcase/CenterTypeTest.java +++ /dev/null @@ -1,56 +0,0 @@ -package automation.testcase; -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.TimeUnit; - -import org.openqa.selenium.By; -import org.openqa.selenium.Dimension; -import org.openqa.selenium.JavascriptExecutor; -import org.openqa.selenium.StaleElementReferenceException; -import org.openqa.selenium.TimeoutException; -import org.openqa.selenium.WebDriver; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.chrome.ChromeDriver; -import org.openqa.selenium.interactions.Actions; -import org.openqa.selenium.support.ui.ExpectedConditions; -import org.openqa.selenium.support.ui.WebDriverWait; -import org.testng.Assert; -// Generated by Selenium IDE -//import org.junit.Test; -//import org.junit.Before; -//import org.junit.After; -import org.testng.annotations.AfterClass; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; - -import automation.utility.BaseClass; -import automation.utility.Commons; -public class CenterTypeTest extends BaseClass{ - @Test(groups = "CT") - public void centerTypeCRUD() { - - String idCenterTypeCard="admin/masterdata/center-type/view"; - - Commons.click(driver,By.xpath("//a[@href='#/admin/masterdata']")); - - Commons.click(driver,By.id(idCenterTypeCard)); - Commons.click(driver,By.id("Create")); - - Commons.enter(driver,By.id("code"),data); - Commons.enter(driver,By.id("name"),data); - Commons.enter(driver,By.id("descr"),data); - - Commons.create(driver); - Commons.filter(driver, By.id("name"), data); - - - Commons.edit(driver,data+1,By.id("name")); - Commons.filter(driver, By.id("name"), data+1); - - Commons.activate(driver); - Commons.edit(driver,data+2,By.id("name")); - Commons.filter(driver, By.id("name"), data+2); - Commons.deactivate(driver); - - } -} diff --git a/automation/src/main/java/automation/testcase/DeviceSpecificationTest.java b/automation/src/main/java/automation/testcase/DeviceSpecificationTest.java deleted file mode 100644 index 29a770dc..00000000 --- a/automation/src/main/java/automation/testcase/DeviceSpecificationTest.java +++ /dev/null @@ -1,63 +0,0 @@ -package automation.testcase; -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.TimeUnit; - -import org.openqa.selenium.By; -import org.openqa.selenium.Dimension; -import org.openqa.selenium.JavascriptExecutor; -import org.openqa.selenium.StaleElementReferenceException; -import org.openqa.selenium.TimeoutException; -import org.openqa.selenium.WebDriver; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.chrome.ChromeDriver; -import org.openqa.selenium.interactions.Actions; -import org.openqa.selenium.support.ui.ExpectedConditions; -import org.openqa.selenium.support.ui.WebDriverWait; -import org.testng.Assert; -// Generated by Selenium IDE -//import org.junit.Test; -//import org.junit.Before; -//import org.junit.After; -import org.testng.annotations.AfterClass; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; - -import automation.utility.BaseClass; -import automation.utility.Commons; - -public class DeviceSpecificationTest extends BaseClass{ - - - @Test(groups = "DS") - public void deviceSpecCRUD() { - String devicespec="admin/masterdata/device-specs/view"; - - Commons.click(driver,By.xpath("//a[@href='#/admin/masterdata']")); - - Commons.click(driver,By.id(devicespec)); - Commons.click(driver,By.id("Create")); - - - Commons.enter(driver,By.id("name"),data); - Commons.enter(driver,By.id("description"),data); - Commons.enter(driver,By.id("brand"),data); - Commons.enter(driver,By.id("model"),data); - Commons.enter(driver,By.id("minDriverversion"),data); - Commons.dropdown(driver,By.id("deviceTypeCode")); - - - Commons.create(driver); - Commons.filter(driver, By.id("name"), data); - - - Commons.edit(driver,data+1,By.id("name")); - Commons.filter(driver, By.id("name"), data+1); - - Commons.activate(driver); - Commons.edit(driver,data+2,By.id("name")); - Commons.filter(driver, By.id("name"), data+2); - Commons.deactivate(driver); - - } - } diff --git a/automation/src/main/java/automation/testcase/DeviceTest.java b/automation/src/main/java/automation/testcase/DeviceTest.java deleted file mode 100644 index 83bf9793..00000000 --- a/automation/src/main/java/automation/testcase/DeviceTest.java +++ /dev/null @@ -1,64 +0,0 @@ -package automation.testcase; -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.TimeUnit; - -import org.openqa.selenium.By; -import org.openqa.selenium.Dimension; -import org.openqa.selenium.JavascriptExecutor; -import org.openqa.selenium.StaleElementReferenceException; -import org.openqa.selenium.TimeoutException; -import org.openqa.selenium.WebDriver; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.chrome.ChromeDriver; -import org.openqa.selenium.interactions.Actions; -import org.openqa.selenium.support.ui.ExpectedConditions; -import org.openqa.selenium.support.ui.WebDriverWait; -// Generated by Selenium IDE -//import org.junit.Test; -//import org.junit.Before; -//import org.junit.After; -import org.testng.annotations.AfterClass; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; - -import com.paulhammant.ngwebdriver.NgWebDriver; - -import automation.utility.BaseClass; -import automation.utility.Commons; -public class DeviceTest extends BaseClass{ - @Test(groups = "D") - public void deviceCRUD() throws InterruptedException { - - Commons.click(driver,By.id("admin/resources")); - Commons.click(driver,By.id("/admin/resources/devices")); - Commons.click(driver,By.id("Create Device")); - - - Commons.enter(driver, By.id("name"),data); - Commons.enter(driver, By.id("serialNumber"),data); - - Commons.enter(driver, By.id("macAddress"),"1.1234"); - - Commons.enter(driver, By.id("ipAddress"),"2.2345"); - Commons.enter(driver, By.id("validity"),"3/3/2023"); - - Commons.dropdown(driver,By.id("deviceSpecId")); - Commons.dropdown(driver,By.id("zone")); - Commons.dropdown(driver,By.id("regCenterId")); - - - Commons.createRes(driver); - Commons.filter(driver, By.id("name"), data); - - - Commons.editRes(driver,data+1,By.id("name")); - Commons.filter(driver, By.id("name"), data+1); - - Commons.activate(driver); - Commons.editRes(driver,data+2,By.id("name")); - Commons.filter(driver, By.id("name"), data+2); - Commons.deactivate(driver); - Commons.decommission(driver); - } - } diff --git a/automation/src/main/java/automation/testcase/DeviceTypesTest.java b/automation/src/main/java/automation/testcase/DeviceTypesTest.java deleted file mode 100644 index 0b0ef76d..00000000 --- a/automation/src/main/java/automation/testcase/DeviceTypesTest.java +++ /dev/null @@ -1,57 +0,0 @@ -package automation.testcase; -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.TimeUnit; - -import org.openqa.selenium.By; -import org.openqa.selenium.Dimension; -import org.openqa.selenium.JavascriptExecutor; -import org.openqa.selenium.StaleElementReferenceException; -import org.openqa.selenium.TimeoutException; -import org.openqa.selenium.WebDriver; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.chrome.ChromeDriver; -import org.openqa.selenium.interactions.Actions; -import org.openqa.selenium.support.ui.ExpectedConditions; -import org.openqa.selenium.support.ui.WebDriverWait; -import org.testng.Assert; -// Generated by Selenium IDE -//import org.junit.Test; -//import org.junit.Before; -//import org.junit.After; -import org.testng.annotations.AfterClass; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; - -import automation.utility.BaseClass; -import automation.utility.Commons; - -public class DeviceTypesTest extends BaseClass{ - - @Test(groups = "DT" ) - public void deviceTypesCRUD() { - String deviceTypes="admin/masterdata/device-types/view"; - Commons.click(driver,By.xpath("//a[@href='#/admin/masterdata']")); - - Commons.click(driver,By.id(deviceTypes)); - Commons.click(driver,By.id("Create")); - - - Commons.enter(driver,By.id("code"),data); - Commons.enter(driver,By.id("name"),data); - Commons.enter(driver,By.id("description"),data); - - Commons.create(driver); - Commons.filter(driver, By.id("name"), data); - - - Commons.edit(driver,data+1,By.id("name")); - Commons.filter(driver, By.id("name"), data+1); - - Commons.activate(driver); - Commons.edit(driver,data+2,By.id("name")); - Commons.filter(driver, By.id("name"), data+2); - Commons.deactivate(driver); - - } - } diff --git a/automation/src/main/java/automation/testcase/DocumentCategoriesTest.java b/automation/src/main/java/automation/testcase/DocumentCategoriesTest.java deleted file mode 100644 index 689722ef..00000000 --- a/automation/src/main/java/automation/testcase/DocumentCategoriesTest.java +++ /dev/null @@ -1,56 +0,0 @@ -package automation.testcase; -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.TimeUnit; - -import org.openqa.selenium.By; -import org.openqa.selenium.Dimension; -import org.openqa.selenium.JavascriptExecutor; -import org.openqa.selenium.StaleElementReferenceException; -import org.openqa.selenium.TimeoutException; -import org.openqa.selenium.WebDriver; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.chrome.ChromeDriver; -import org.openqa.selenium.interactions.Actions; -import org.openqa.selenium.support.ui.ExpectedConditions; -import org.openqa.selenium.support.ui.WebDriverWait; -import org.testng.Assert; -// Generated by Selenium IDE -//import org.junit.Test; -//import org.junit.Before; -//import org.junit.After; -import org.testng.annotations.AfterClass; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; - -import automation.utility.BaseClass; -import automation.utility.Commons; - -public class DocumentCategoriesTest extends BaseClass{ - @Test(groups = "DOC") - public void documentCategoriesCRUD() { - String documentCategories="admin/masterdata/document-categories/view"; - Commons.click(driver,By.xpath("//a[@href='#/admin/masterdata']")); - - Commons.click(driver,By.id(documentCategories)); - Commons.click(driver,By.id("Create")); - - Commons.enter(driver,By.id("code"),data); - Commons.enter(driver,By.id("name"),data); - Commons.enter(driver,By.id("description"),data); - - - Commons.create(driver); - Commons.filter(driver, By.id("name"), data); - - - Commons.edit(driver,data+1,By.id("name")); - Commons.filter(driver, By.id("name"), data+1); - - Commons.activate(driver); - Commons.edit(driver,data+2,By.id("name")); - Commons.filter(driver, By.id("name"), data+2); - Commons.deactivate(driver); - - } - } diff --git a/automation/src/main/java/automation/testcase/DocumentTypes.java b/automation/src/main/java/automation/testcase/DocumentTypes.java deleted file mode 100644 index a395825c..00000000 --- a/automation/src/main/java/automation/testcase/DocumentTypes.java +++ /dev/null @@ -1,58 +0,0 @@ -package automation.testcase; -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.TimeUnit; - -import org.openqa.selenium.By; -import org.openqa.selenium.Dimension; -import org.openqa.selenium.JavascriptExecutor; -import org.openqa.selenium.StaleElementReferenceException; -import org.openqa.selenium.TimeoutException; -import org.openqa.selenium.WebDriver; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.chrome.ChromeDriver; -import org.openqa.selenium.interactions.Actions; -import org.openqa.selenium.support.ui.ExpectedConditions; -import org.openqa.selenium.support.ui.WebDriverWait; -import org.testng.Assert; -// Generated by Selenium IDE -//import org.junit.Test; -//import org.junit.Before; -//import org.junit.After; -import org.testng.annotations.AfterClass; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; - -import automation.utility.BaseClass; -import automation.utility.Commons; - -public class DocumentTypes extends BaseClass{ - @Test(groups = "DOCT") - public void documentTypesCRUD() { - String documentTypes="admin/masterdata/document-type/view"; - Commons.click(driver,By.xpath("//a[@href='#/admin/masterdata']")); - - Commons.click(driver,By.id(documentTypes)); - - Commons.click(driver,By.id("Create")); - - Commons.enter(driver,By.id("code"),data); - Commons.enter(driver,By.id("name"),data); - Commons.enter(driver,By.id("description"),data); - - - - Commons.create(driver); - Commons.filter(driver, By.id("name"), data); - - - Commons.edit(driver,data+1,By.id("name")); - Commons.filter(driver, By.id("name"), data+1); - - Commons.activate(driver); - Commons.edit(driver,data+2,By.id("name")); - Commons.filter(driver, By.id("name"), data+2); - Commons.deactivate(driver); - - } - } diff --git a/automation/src/main/java/automation/testcase/DynamicFieldTest.java b/automation/src/main/java/automation/testcase/DynamicFieldTest.java deleted file mode 100644 index 58bd4c9a..00000000 --- a/automation/src/main/java/automation/testcase/DynamicFieldTest.java +++ /dev/null @@ -1,63 +0,0 @@ -package automation.testcase; -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.TimeUnit; - -import org.openqa.selenium.By; -import org.openqa.selenium.Dimension; -import org.openqa.selenium.JavascriptExecutor; -import org.openqa.selenium.StaleElementReferenceException; -import org.openqa.selenium.TimeoutException; -import org.openqa.selenium.WebDriver; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.chrome.ChromeDriver; -import org.openqa.selenium.interactions.Actions; -import org.openqa.selenium.support.ui.ExpectedConditions; -import org.openqa.selenium.support.ui.WebDriverWait; -import org.testng.Assert; -// Generated by Selenium IDE -//import org.junit.Test; -//import org.junit.Before; -//import org.junit.After; -import org.testng.annotations.AfterClass; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; - -import automation.utility.BaseClass; -import automation.utility.Commons; - -public class DynamicFieldTest extends BaseClass{ - - - @Test(groups = "DF") - public void dynamicFieldCRUD() { - - - Commons.click(driver,By.xpath("//a[@href='#/admin/masterdata']")); - - Commons.click(driver,By.id("createDynamicField")); - - - - Commons.enter(driver,By.id("code"),data); - - Commons.enter(driver,By.id("name"),"Automation"); - Commons.enter(driver,By.id("description"),data); - - Commons.enter(driver,By.id("value"),data); - - - Commons.create(driver); - Commons.filter(driver, By.id("description"), data); - - - Commons.edit(driver,data+1,By.id("description")); - Commons.filter(driver, By.id("description"), data+1); - - Commons.activate(driver); - Commons.edit(driver,data+2,By.id("description")); - Commons.filter(driver, By.id("description"), data+2); - Commons.deactivate(driver); - - } -} diff --git a/automation/src/main/java/automation/testcase/HolidaysTest.java b/automation/src/main/java/automation/testcase/HolidaysTest.java deleted file mode 100644 index a3682be9..00000000 --- a/automation/src/main/java/automation/testcase/HolidaysTest.java +++ /dev/null @@ -1,60 +0,0 @@ -package automation.testcase; -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.TimeUnit; - -import org.openqa.selenium.By; -import org.openqa.selenium.Dimension; -import org.openqa.selenium.JavascriptExecutor; -import org.openqa.selenium.StaleElementReferenceException; -import org.openqa.selenium.TimeoutException; -import org.openqa.selenium.WebDriver; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.chrome.ChromeDriver; -import org.openqa.selenium.interactions.Actions; -import org.openqa.selenium.support.ui.ExpectedConditions; -import org.openqa.selenium.support.ui.WebDriverWait; -import org.testng.Assert; -// Generated by Selenium IDE -//import org.junit.Test; -//import org.junit.Before; -//import org.junit.After; -import org.testng.annotations.AfterClass; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; - -import automation.utility.BaseClass; -import automation.utility.Commons; - -public class HolidaysTest extends BaseClass{ - - @Test(groups = "H") - public void holidaysCRUD() { - String listofholidays="admin/masterdata/holiday/view"; - - Commons.click(driver,By.xpath("//a[@href='#/admin/masterdata']")); - - Commons.click(driver,By.id(listofholidays)); - Commons.click(driver,By.id("Create")); - - - Commons.enter(driver,By.id("holidayName"),data); - Commons.enter(driver,By.id("holidayDesc"),data); - Commons.enter(driver,By.id("holidayDate"),"12/27/2021"); - Commons.dropdown(driver,By.id("locationCode")); - - - Commons.create(driver); - Commons.filter(driver, By.id("holidayName"), data); - - - Commons.edit(driver,data+1,By.id("holidayName")); - Commons.filter(driver, By.id("holidayName"), data+1); - - Commons.activate(driver); - Commons.edit(driver,data+2,By.id("holidayName")); - Commons.filter(driver, By.id("holidayName"), data+2); - Commons.deactivate(driver); - - } -} diff --git a/automation/src/main/java/automation/testcase/LoginTest.java b/automation/src/main/java/automation/testcase/LoginTest.java deleted file mode 100644 index 1692e7f0..00000000 --- a/automation/src/main/java/automation/testcase/LoginTest.java +++ /dev/null @@ -1,113 +0,0 @@ -package automation.testcase; -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.TimeUnit; - -import org.openqa.selenium.By; -import org.openqa.selenium.Dimension; -import org.openqa.selenium.JavascriptExecutor; -import org.openqa.selenium.StaleElementReferenceException; -import org.openqa.selenium.TimeoutException; -import org.openqa.selenium.WebDriver; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.chrome.ChromeDriver; -import org.openqa.selenium.interactions.Actions; -import org.openqa.selenium.support.ui.ExpectedConditions; -import org.openqa.selenium.support.ui.WebDriverWait; -import org.testng.Assert; -// Generated by Selenium IDE -//import org.junit.Test; -//import org.junit.Before; -//import org.junit.After; -import org.testng.annotations.AfterClass; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; - -import automation.utility.BaseClass; -import automation.utility.Commons; - -public class LoginTest extends BaseClass{ - - @Test(priority = 0) - public void loginTest() throws Exception { - String envPath = System.getProperty("path"); - String userid = System.getProperty("userid"); - String password = System.getProperty("password"); - String language = null; - driver.get(envPath); - driver.manage().window().setSize(new Dimension(1050, 708)); - driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS); - driver.findElement(By.linkText("Admin")).click(); - - try { - language=Commons.getFieldData("langcode"); - - System.out.println(language); - } catch (Exception e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - Commons.click(driver,By.xpath("//*[@class='kc-dropdown']")); - String var="//*[@class='kc-dropdown-item']/a[contains(text(),'"+language+"')]"; - Commons.click(driver,By.xpath(var)); - driver.findElement(By.id("username")).sendKeys(userid); - driver.findElement(By.id("password")).sendKeys(password); - driver.findElement(By.xpath("//input[@name=\'login\']")).click(); - - /* - Commons.click(driver,By.xpath("//a[@href='#/admin/masterdata']")); - - Commons.click(driver,By.xpath("//mat-card-content/span[contains(text(),'Blocklisted Words')]")); - Commons.click(driver,By.xpath("//span[contains(text(),'Create')]")); - String data=Commons.appendDate; - - Commons.enter(driver,By.xpath("//input[@placeholder='Blocklisted Words']"),data); - Commons.enter(driver,By.xpath("//textarea[@placeholder='Description']"),data); - - - Commons.click(driver,By.xpath("//button[@id='createButton']")); - Commons.click(driver,By.xpath("//span[contains(text(),'OK')]")); - - Commons.click(driver,By.xpath("//span[contains(text(),'Filter')]")); - - Commons.enter(driver,By.xpath("//input[@placeholder=' Blocklisted Words']"),data); - - Commons.click(driver,By.xpath("//span[contains(text(),'Apply')]")); - - Commons.click(driver,By.cssSelector(".ellipsis-button")); - - - Commons.click(driver,By.xpath("//span[contains(text(),'Activate')]")); - - Commons.click(driver,By.xpath("//span[contains(text(),'Confirm')]")); - - Commons.click(driver,By.xpath("//span[contains(text(),'Done')]")); - - driver.findElement(By.cssSelector(".ellipsis-button")).click(); - - Commons.click(driver,By.xpath("//span[contains(text(),'Edit')]")); - - Assert.assertNotEquals(data, driver.findElement(By.xpath("//input[@placeholder='Blocklisted Words']")).getText()); - driver.findElement(By.xpath("//input[@placeholder='Blocklisted Words']")).clear(); - - Commons.enter(driver,By.xpath("//input[@placeholder='Blocklisted Words']"),data+1); - - Commons.click(driver,By.id("createButton")); - - - Commons.click(driver,By.xpath("//button/span[contains(text(),'OK')]")); - - Commons.click(driver,By.xpath("//span[contains(text(),'Filter')]")); - Commons.enter(driver,By.xpath("//input[@placeholder='Blocklisted Words']"),data+1); - Commons.click(driver,By.xpath("//span[contains(text(),'Apply')]")); - - Commons.click(driver,By.cssSelector(".ellipsis-button")); - Commons.click(driver,By.xpath("//span[contains(text(),'Deactivate')]")); - - Commons.clickSpan(driver,"Confirm"); - Commons.clickSpan(driver,"Done"); - - */ - } -} diff --git a/automation/src/main/java/automation/testcase/MachineSpecificationTest.java b/automation/src/main/java/automation/testcase/MachineSpecificationTest.java deleted file mode 100644 index d64f3dbe..00000000 --- a/automation/src/main/java/automation/testcase/MachineSpecificationTest.java +++ /dev/null @@ -1,60 +0,0 @@ -package automation.testcase; -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.TimeUnit; - -import org.openqa.selenium.By; -import org.openqa.selenium.Dimension; -import org.openqa.selenium.JavascriptExecutor; -import org.openqa.selenium.StaleElementReferenceException; -import org.openqa.selenium.TimeoutException; -import org.openqa.selenium.WebDriver; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.chrome.ChromeDriver; -import org.openqa.selenium.interactions.Actions; -import org.openqa.selenium.support.ui.ExpectedConditions; -import org.openqa.selenium.support.ui.WebDriverWait; -import org.testng.Assert; -// Generated by Selenium IDE -//import org.junit.Test; -//import org.junit.Before; -//import org.junit.After; -import org.testng.annotations.AfterClass; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; - -import automation.utility.BaseClass; -import automation.utility.Commons; - -public class MachineSpecificationTest extends BaseClass{ - - @Test(groups = "MS") - public void machineSpecCRUD() { - String machinespec="admin/masterdata/machine-specs/view"; - - Commons.click(driver,By.xpath("//a[@href='#/admin/masterdata']")); - Commons.click(driver,By.id(machinespec)); - Commons.click(driver,By.id("Create")); - - Commons.enter(driver,By.id("name"),data); - Commons.enter(driver,By.id("brand"),data); - Commons.enter(driver,By.id("model"),data); - Commons.enter(driver,By.id("minDriverversion"),data); - Commons.enter(driver,By.id("description"),data); - Commons.dropdown(driver,By.id("machineTypeCode")); - - - Commons.create(driver); - Commons.filter(driver, By.id("name"), data); - - - Commons.edit(driver,data+1,By.id("name")); - Commons.filter(driver, By.id("name"), data+1); - - Commons.activate(driver); - Commons.edit(driver,data+2,By.id("name")); - Commons.filter(driver, By.id("name"), data+2); - Commons.deactivate(driver); - - } - } diff --git a/automation/src/main/java/automation/testcase/MachineTest.java b/automation/src/main/java/automation/testcase/MachineTest.java deleted file mode 100644 index c068b6fc..00000000 --- a/automation/src/main/java/automation/testcase/MachineTest.java +++ /dev/null @@ -1,64 +0,0 @@ -package automation.testcase; -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.TimeUnit; - -import org.openqa.selenium.By; -import org.openqa.selenium.Dimension; -import org.openqa.selenium.JavascriptExecutor; -import org.openqa.selenium.StaleElementReferenceException; -import org.openqa.selenium.TimeoutException; -import org.openqa.selenium.WebDriver; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.chrome.ChromeDriver; -import org.openqa.selenium.interactions.Actions; -import org.openqa.selenium.support.ui.ExpectedConditions; -import org.openqa.selenium.support.ui.WebDriverWait; -import org.testng.Assert; -// Generated by Selenium IDE -//import org.junit.Test; -//import org.junit.Before; -//import org.junit.After; -import org.testng.annotations.AfterClass; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; - -import automation.utility.BaseClass; -import automation.utility.Commons; -public class MachineTest extends BaseClass{ - @Test(groups = "M") - public void machineCRUD() { - Commons.click(driver,By.id("admin/resources")); - Commons.click(driver,By.xpath("//a[@href='#/admin/resources/machines']")); - Commons.click(driver,By.id("Create Machine")); - - Commons.enter(driver,By.id("name"),data); - Commons.enter(driver,By.id("serialNumber"),"1234567"); - Commons.enter(driver,By.id("macAddress"),"1.2.3.4.5.6"); - Commons.enter(driver,By.id("ipAddress"),"2.3.4.5.6"); - Commons.enter(driver,By.id("validity"),"27/11/2022"); - Commons.dropdown(driver,By.id("machineSpecId")); - Commons.enter(driver,By.id("publicKey"), - "AAEACwACAHIAIINxl2dEhLP4GpDMjUal1yT9UtduBlILZPKh2hszFGmqABAAFwALCAAAAQABAQDCHegKJ3vRn__8h1knXKiLA8qfO5LebzBlRO2tAcI3HvLyL9rPkVrXWYQ6wAn4VQk015C1hViU-7k752dYE5WUAUbgsxOHvvDPH1t72CNHNj9dyE86wGqR9AtK3yz0yf1IP_xgtWpiaQ2V9t2d3LtgPYWnRuPJbcl97nLXXL6PGfh1mRwsQUi94coEBPMZ9YLLOAFckPuDZt-lEcXIMkj8r0uNwAZUSEvGifTNWbLjC5BRlJBmvScIlptXqIwBaq2kSMVK2X1KbQ6TM8zkA_co4LEAIZfcpMgPn6RdW0yFtcx24HqrCY8v0DHregwoCPPpw8HvB-r5aR09mXG64zsJ"); - - Commons.enter(driver,By.id("signPublicKey"), - "AAEABAAEAHIAAAAQABQACwgAAAEAAQEAr93rKokeZGIzcCtFX3iyCvwpmfnd9jz0nF__0bxWr0mH8Zs0rhlG6vKRagx31I4CdrLAECOwMZ0r7Y3utTqHqelQE3MJLtboKITOqYRpBkqHSm1jGaEb8a1E9yoJri3tZrBCrAShimrN_SbtS1uKbJUG3cuVuE0gtGLI1d5wMfS_4PSz3RwvZtGHisEb3zbV6SLcJkgcDeMbUD7P25SVJd1xrJybuGIgyeSZxOgLzy1P-qHCiOXiAO9o06fwyIhIYbeZYz5th4rq7Rb6mRK9EWFpLrLvBL0F6USiidl8qNCxxZZFUp3W5xFANVYfRvgLKI33zBYniZ7aTE8PgrYa2w"); - Commons.dropdown(driver,By.id("zone")); - Commons.dropdown(driver,By.id("regCenterId")); - - - - Commons.createRes(driver); - Commons.filter(driver, By.id("name"), data); - - - Commons.editRes(driver,data+1,By.id("name")); - Commons.filter(driver, By.id("name"), data+1); - - Commons.activate(driver); - Commons.editRes(driver,data+2,By.id("name")); - Commons.filter(driver, By.id("name"), data+2); - Commons.deactivate(driver); - Commons.decommission(driver); - } -} diff --git a/automation/src/main/java/automation/testcase/MachineTypesTest.java b/automation/src/main/java/automation/testcase/MachineTypesTest.java deleted file mode 100644 index b7d442e8..00000000 --- a/automation/src/main/java/automation/testcase/MachineTypesTest.java +++ /dev/null @@ -1,58 +0,0 @@ -package automation.testcase; -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.TimeUnit; - -import org.openqa.selenium.By; -import org.openqa.selenium.Dimension; -import org.openqa.selenium.JavascriptExecutor; -import org.openqa.selenium.StaleElementReferenceException; -import org.openqa.selenium.TimeoutException; -import org.openqa.selenium.WebDriver; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.chrome.ChromeDriver; -import org.openqa.selenium.interactions.Actions; -import org.openqa.selenium.support.ui.ExpectedConditions; -import org.openqa.selenium.support.ui.WebDriverWait; -import org.testng.Assert; -// Generated by Selenium IDE -//import org.junit.Test; -//import org.junit.Before; -//import org.junit.After; -import org.testng.annotations.AfterClass; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; - -import automation.utility.BaseClass; -import automation.utility.Commons; - -public class MachineTypesTest extends BaseClass{ - - @Test(groups = "MT") - public void machineTypesCRUD() { - String machinetypes="admin/masterdata/machine-type/view" ; - Commons.click(driver,By.xpath("//a[@href='#/admin/masterdata']")); - - Commons.click(driver,By.id(machinetypes)); - Commons.click(driver,By.id("Create")); - - - Commons.enter(driver,By.id("code"),data); - Commons.enter(driver,By.id("name"),data); - Commons.enter(driver,By.id("description"),data); - - - Commons.create(driver); - Commons.filter(driver, By.id("name"), data); - - - Commons.edit(driver,data+1,By.id("name")); - Commons.filter(driver, By.id("name"), data+1); - - Commons.activate(driver); - Commons.edit(driver,data+2,By.id("name")); - Commons.filter(driver, By.id("name"), data+2); - Commons.deactivate(driver); - - } -} diff --git a/automation/src/main/java/automation/testcase/TemplateTest.java b/automation/src/main/java/automation/testcase/TemplateTest.java deleted file mode 100644 index 4f6c0cb9..00000000 --- a/automation/src/main/java/automation/testcase/TemplateTest.java +++ /dev/null @@ -1,71 +0,0 @@ -package automation.testcase; -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.TimeUnit; - -import org.openqa.selenium.By; -import org.openqa.selenium.Dimension; -import org.openqa.selenium.JavascriptExecutor; -import org.openqa.selenium.StaleElementReferenceException; -import org.openqa.selenium.TimeoutException; -import org.openqa.selenium.WebDriver; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.chrome.ChromeDriver; -import org.openqa.selenium.interactions.Actions; -import org.openqa.selenium.support.ui.ExpectedConditions; -import org.openqa.selenium.support.ui.WebDriverWait; -import org.testng.Assert; -// Generated by Selenium IDE -//import org.junit.Test; -//import org.junit.Before; -//import org.junit.After; -import org.testng.annotations.AfterClass; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; - -import automation.utility.BaseClass; -import automation.utility.Commons; - -public class TemplateTest extends BaseClass{ - - - @Test(groups = "T") - public void templateCRUD() { - String templatesid="admin/masterdata/templates/view"; - - Commons.click(driver,By.xpath("//a[@href='#/admin/masterdata']")); - - Commons.click(driver,By.id(templatesid)); - Commons.click(driver,By.id("Create")); - - Commons.enter(driver,By.id("name"),data); - Commons.enter(driver,By.id("description"),data); - - Commons.enter(driver,By.id("model"),data); - Commons.enter(driver,By.id("fileText"),data); - - - Commons.dropdown(driver,By.id("fileFormatCode")); - - Commons.dropdown(driver,By.id("templateTypeCode")); - - Commons.dropdown(driver,By.id("moduleId")); - - - - - Commons.create(driver); - Commons.filter(driver, By.id("name"), data); - - - Commons.edit(driver,data+1,By.id("name")); - Commons.filter(driver, By.id("name"), data+1); - - Commons.activate(driver); - Commons.edit(driver,data+2,By.id("name")); - Commons.filter(driver, By.id("name"), data+2); - Commons.deactivate(driver); - - - } -} diff --git a/automation/src/main/java/automation/utility/BaseClass.java b/automation/src/main/java/automation/utility/BaseClass.java deleted file mode 100644 index 584f8a50..00000000 --- a/automation/src/main/java/automation/utility/BaseClass.java +++ /dev/null @@ -1,133 +0,0 @@ -package automation.utility; - -import java.io.File; -import java.io.IOException; -import java.lang.reflect.Method; -import java.nio.file.Path; -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.TimeUnit; - -import org.openqa.selenium.By; -import org.openqa.selenium.Dimension; -import org.openqa.selenium.JavascriptExecutor; -import org.openqa.selenium.StaleElementReferenceException; -import org.openqa.selenium.TimeoutException; -import org.openqa.selenium.WebDriver; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.chrome.ChromeDriver; -import org.openqa.selenium.chrome.ChromeOptions; -import org.openqa.selenium.interactions.Actions; -import org.openqa.selenium.support.ui.ExpectedConditions; -import org.openqa.selenium.support.ui.WebDriverWait; -import org.testng.Assert; -import org.testng.ITest; -// Generated by Selenium IDE -//import org.junit.Test; -//import org.junit.Before; -//import org.junit.After; -import org.testng.annotations.AfterClass; -import org.testng.annotations.AfterMethod; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.BeforeMethod; -import org.testng.annotations.BeforeSuite; -import org.testng.annotations.BeforeTest; -import org.testng.annotations.Test; - -import org.testng.annotations.DataProvider; -import org.testng.annotations.Optional; -import org.testng.annotations.Parameters; -import org.testng.annotations.Test; - -public class BaseClass { - protected WebDriver driver; - protected Map vars; - protected JavascriptExecutor js; - protected String langcode; - protected String envPath = System.getProperty("path"); - protected String userid = System.getProperty("userid"); - protected String password = System.getProperty("password"); - protected String data = Commons.appendDate; - - public void setLangcode(String langcode) throws IOException { - this.langcode = PropertiesUtil.getKeyValue("langcode"); - } - - @BeforeMethod - public void setUp() throws InterruptedException { - System.out.println(System.getProperty("user.dir")); - String configFilePath = System.getProperty("user.dir") + "\\chromedriver\\chromedriver.exe"; - System.setProperty("webdriver.chrome.driver", configFilePath); - -// ChromeOptions options = new ChromeOptions(); -// options.addArguments("--headless"); -// driver = new ChromeDriver(options); - - - - driver = new ChromeDriver(); - js = (JavascriptExecutor) driver; - vars = new HashMap(); - driver.get(envPath); - driver.manage().window().maximize(); - Thread.sleep(500); - driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS); - driver.findElement(By.linkText("Admin")).click(); - String language1 = null; - try { - language1 = Commons.getFieldData("langcode"); - - System.out.println(language1); - if(!language1.equals("sin")) - {Commons.click(driver, By.xpath("//*[@class='kc-dropdown']")); - String var = "//*[@class='kc-dropdown-item']/a[contains(text(),'" + language1 + "')]"; - Commons.click(driver, By.xpath(var)); - } - } catch (Exception e) { - e.getMessage(); - } - driver.findElement(By.id("username")).sendKeys(userid); - driver.findElement(By.id("password")).sendKeys(password); - driver.findElement(By.xpath("//input[@name=\'login\']")).click(); - - } - - @AfterMethod - public void tearDown() { - - driver.quit(); - } - - @DataProvider(name = "data-provider") - public Object[] dpMethod() { - String listFilename[] = readFolderJsonList(); - String s[][] = null; - String temp[] = null; - for (int count = 0; count < listFilename.length; count++) { - listFilename[count] = listFilename[count].replace(".csv", ""); - - } - - return listFilename; - } - - public static String[] readFolderJsonList() { - String contents[] = null; - try { - String langcode = PropertiesUtil.getKeyValue("langcode"); - File directoryPath = new File(System.getProperty("user.dir") + "\\BulkUploadFiles\\" + langcode + "\\"); - - if (directoryPath.exists()) { - - contents = directoryPath.list(); - System.out.println("List of files and directories in the specified directory:"); - for (int i = 0; i < contents.length; i++) { - System.out.println(contents[i]); - } - } - } catch (Exception e) { - e.printStackTrace(); - } - return contents; - } -} diff --git a/automation/src/main/java/automation/utility/Commons.java b/automation/src/main/java/automation/utility/Commons.java deleted file mode 100644 index 946ad7f4..00000000 --- a/automation/src/main/java/automation/utility/Commons.java +++ /dev/null @@ -1,296 +0,0 @@ -package automation.utility; - -import java.time.LocalDateTime; -import java.time.format.DateTimeFormatter; - -import org.openqa.selenium.By; -import org.openqa.selenium.JavascriptExecutor; -import org.openqa.selenium.StaleElementReferenceException; -import org.openqa.selenium.TimeoutException; -import org.openqa.selenium.WebDriver; -import org.openqa.selenium.support.ui.ExpectedConditions; -import org.openqa.selenium.support.ui.WebDriverWait; -import org.testng.Assert; - -public class Commons { - private static final org.slf4j.Logger logger= org.slf4j.LoggerFactory.getLogger(Commons.class); - - public static String appendDate="Z"+getDateTime(); - - public static String getDateTime() - { - - - DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyyMMddHHmm"); - LocalDateTime now = LocalDateTime.now(); - return dtf.format(now); - } - - public static void filter(WebDriver driver, By by,String data) { - logger.info("Inside Filter " + by + data); - Commons.click(driver, By.id("Filter")); - - Commons.enter(driver, by, data); - Commons.click(driver, By.id("applyTxt")); - } - - public static void filterCenter(WebDriver driver, By by,String data) { - logger.info("Inside filterCenter " + by + data); - Commons.click(driver, By.id("Filter")); - - Commons.dropdowncenter(driver, by, data); - - Commons.click(driver, By.id("applyTxt")); - } - public static void click(WebDriver driver, By by) { - logger.info("Clicking " + by ); - try { - (new WebDriverWait(driver, 20)).until(ExpectedConditions.elementToBeClickable(by)); - Thread.sleep(500); - driver.findElement(by).click(); - Thread.sleep(500); - }catch (StaleElementReferenceException sere) { - // simply retry finding the element in the refreshed DOM - driver.findElement(by).click(); - } - catch (TimeoutException toe) { - driver.findElement(by).click(); - try { - Thread.sleep(500); - } catch (InterruptedException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - System.out.println( "Element identified by " + by.toString() + " was not clickable after 20 seconds"); - } catch (Exception e) { - - JavascriptExecutor executor = (JavascriptExecutor) driver; - executor.executeScript("arguments[0].click();", driver.findElement(by)); - - }} - - public static void enter(WebDriver driver, By by,String value) { - logger.info("Entering " + by +value); - try { - (new WebDriverWait(driver, 20)).until(ExpectedConditions.visibilityOfElementLocated(by)); - driver.findElement(by).clear(); - driver.findElement(by).sendKeys(value); - try { - Thread.sleep(8); - } catch (InterruptedException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - }catch (StaleElementReferenceException sere) { - // simply retry finding the element in the refreshed DOM - driver.findElement(by).sendKeys(value); - } - catch (TimeoutException toe) { - driver.findElement(by).sendKeys(value); - System.out.println( "Element identified by " + by.toString() + " was not clickable after 20 seconds"); - } } - - public static void dropdown(WebDriver driver, By by) - { - logger.info("Selecting DropDown Index Zero Value " + by ); - - try { - Thread.sleep(500); - click(driver,by);//REGION - Thread.sleep(500); - - String att= driver.findElement(by).getAttribute("aria-owns"); - String[] list=att.split(" "); - click( driver,By.id(list[0])); - try { - Thread.sleep(500); - } catch (InterruptedException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - }catch(Exception e) - - { - e.getMessage(); - } - } - - public static void dropdown(WebDriver driver, By by,String value) - { - logger.info("Selecting DropDown By Value " + by +value ); - - try { - Thread.sleep(500); - click(driver,by); - Thread.sleep(500); - String val="'"+value +"'"; - - click( driver,By.xpath("//span[contains(text(),"+val+")]")); - try { - Thread.sleep(500); - } catch (InterruptedException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - }catch(Exception e) - - { - e.getMessage(); - } - } - - public static void dropdowncenter(WebDriver driver, By by,String value) - { - logger.info("Selecting DropDown By Value " + by +value ); - - try { - Thread.sleep(500); - click(driver,by); - Thread.sleep(500); - String val="'"+value +"'"; - - click( driver,By.id(value)); - try { - Thread.sleep(500); - } catch (InterruptedException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - }catch(Exception e) - - { - e.getMessage(); - } - } - - public static void dropdown(WebDriver driver, By by,By value) - { - logger.info("Selecting DropDown By Value " + by +value ); - try { - Thread.sleep(500); - click(driver,by); - Thread.sleep(500); - click( driver,value); - - Thread.sleep(500); - - }catch(Exception e) - - { - e.getMessage(); - } - } - public static String getTestData() - { - return JsonUtil.readJsonFileText("TestData.json"); - } - public static String getFieldData(String idfield) throws Exception - { - return JsonUtil.JsonObjSimpleParsing(getTestData(), idfield); - - } - - public static void clickSpan(WebDriver driver,String key) throws Exception { - - String val=Commons.getFieldData(key); - String var="//span[contains(text(),'"+ val+ "')]"; - Commons.click(driver,By.xpath(var)); - logger.info("clickSpan" + var ); - } - - public static void deactivate(WebDriver driver) { - Commons.click(driver,By.id("ellipsis-button0")); - Commons.click(driver, By.id("Deactivate0")); - - Commons.click(driver,By.id("confirmpopup")); - Commons.click(driver, By.id("confirmmessagepopup")); - logger.info("Click deactivate and Confirm"); - } - - public static void activate(WebDriver driver) { - Commons.click(driver,By.id("ellipsis-button0")); - Commons.click(driver, By.id("Activate0")); - - Commons.click(driver,By.id("confirmpopup")); - Commons.click(driver, By.id("confirmmessagepopup")); - logger.info("Click activate and Confirm"); - } - - public static void edit(WebDriver driver,String data,By by) { - Commons.click(driver,By.id("ellipsis-button0")); - Commons.click(driver, By.id("Edit0")); - - Assert.assertNotEquals(data, - driver.findElement(by).getText()); - driver.findElement(by).clear(); - - Commons.enter(driver, by, data); - - Commons.click(driver, By.id("createButton")); - Commons.click(driver, By.id("confirmmessagepopup")); - - logger.info("Click Edit and Confirm" + by + data); - } - - public static void editRes(WebDriver driver,String data,By by) { - Commons.click(driver,By.id("ellipsis-button0")); - Commons.click(driver, By.id("Edit0")); - - Assert.assertNotEquals(data, - driver.findElement(by).getText()); - driver.findElement(by).clear(); - - Commons.enter(driver, by, data); - - Commons.click(driver, By.id("createButton")); - - Commons.click(driver,By.id("confirmpopup")); - Commons.click(driver, By.id("confirmmessagepopup")); - - logger.info("Click Edit and Confirm" + by + data); - } - public static void editCenter(WebDriver driver,String data,By by) { - Commons.click(driver,By.id("ellipsis-button0")); - Commons.click(driver, By.id("Edit0")); - - Assert.assertNotEquals(data, - driver.findElement(by).getText()); - driver.findElement(by).clear(); - - Commons.enter(driver, by, data); - - Commons.click(driver, By.xpath("(//*[@id='createButton'])[1]")); - - Commons.click(driver,By.id("confirmpopup")); - Commons.click(driver, By.id("confirmmessagepopup")); - - Commons.click(driver, By.xpath("(//*[@id='cancel'])[1]")); - Commons.click(driver, By.xpath("(//*[@id='cancel'])[1]")); - logger.info("Click editCenter and Confirm" + by + data); - } - - public static void create(WebDriver driver) { - Commons.click(driver, By.xpath("//button[@id='createButton']")); - Commons.click(driver, By.id("confirmmessagepopup")); - - logger.info("Click create"); - } - public static void createRes(WebDriver driver) { - Commons.click(driver, By.xpath("//button[@id='createButton']")); - Commons.click(driver,By.id("confirmpopup")); - Commons.click(driver, By.id("confirmmessagepopup")); - logger.info("Click and confirm"); - } - - public static void decommission(WebDriver driver) { - Commons.click(driver,By.id("ellipsis-button0")); - Commons.click(driver,By.id("Decommission0")); - - Commons.click(driver,By.id("confirmpopup")); - Commons.click(driver, By.id("confirmmessagepopup")); - logger.info("Click decommission and confirm"); - } - - - -} diff --git a/automation/src/main/java/automation/utility/DateUtil.java b/automation/src/main/java/automation/utility/DateUtil.java deleted file mode 100644 index 7195c1b7..00000000 --- a/automation/src/main/java/automation/utility/DateUtil.java +++ /dev/null @@ -1,15 +0,0 @@ -package automation.utility; - -import java.time.LocalDateTime; -import java.time.format.DateTimeFormatter; - -public class DateUtil { - - public static String getDateTime() - { - - DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyyMMddHHmm"); - LocalDateTime now = LocalDateTime.now(); - return dtf.format(now); - } -} diff --git a/automation/src/main/java/automation/utility/JsonUtil.java b/automation/src/main/java/automation/utility/JsonUtil.java deleted file mode 100644 index a7f051ed..00000000 --- a/automation/src/main/java/automation/utility/JsonUtil.java +++ /dev/null @@ -1,203 +0,0 @@ -package automation.utility; - -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; - - -import org.apache.commons.io.IOUtils; -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.util.LinkedHashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.Set; - -import org.json.JSONArray; -import org.json.JSONObject; - -public class JsonUtil { - private static final org.slf4j.Logger logger= org.slf4j.LoggerFactory.getLogger(JsonUtil.class); - - private static ObjectMapper mapper; - - static { - mapper = new ObjectMapper(); - } - - public static String convertJavaToJson(Object object) { - - String jsonResult = ""; - try { - jsonResult = mapper.writeValueAsString(object); - } catch (JsonParseException e) { - logger.error("", e); - } catch (JsonMappingException e) { - logger.error("", e); - } catch (IOException e) { - logger.error("", e); - } - return jsonResult; - } - - public static T convertJsonintoJava(String jsonString, Class cls) { - T payload = null; - try { - payload = mapper.readValue(jsonString, cls); - } catch (JsonParseException e) { - e.printStackTrace(); - } catch (JsonMappingException e) { - e.printStackTrace(); - } catch (IOException e) { - e.printStackTrace(); - } - return payload; - } - - public static String JsonObjSimpleParsing(String jsonIdentity, String idfield) - throws Exception { - String val =null; - JSONObject json = new JSONObject(jsonIdentity); - - JSONObject identity = json.getJSONObject(PropertiesUtil.getKeyValue("jsonObjName")); - - JSONArray identityitems = identity.getJSONArray(idfield); - - for (int i = 0, size = identityitems.length(); i < size; i++) { - JSONObject idItem = identityitems.getJSONObject(i); - String lang = idItem.getString("language"); - val = idItem.getString("value"); - if (lang.equalsIgnoreCase(PropertiesUtil.getKeyValue(idfield))) - return val; - } - return "sin"; - } - - public static LinkedHashMap JsonObjSimpleParsingWithCode(String jsonIdentity, String idfield) - throws Exception { - LinkedHashMap mapLang = new LinkedHashMap(); - LinkedHashMap mapLangorder = new LinkedHashMap(); - JSONObject json = new JSONObject(jsonIdentity); - - JSONObject identity = json.getJSONObject(PropertiesUtil.getKeyValue("jsonObjName")); - - JSONArray identityitems = identity.getJSONArray(idfield); - - for (int i = 0, size = identityitems.length(); i < size; i++) { - JSONObject idItem = identityitems.getJSONObject(i); - String lang = idItem.getString("language"); - String val = idItem.getString("value"); - String code = idItem.getString("code"); - String valcode = val + "@@" + code; - mapLang.put(lang, valcode); - } - String[] listLang = PropertiesUtil.getKeyValue("langcode").split("@@"); - Set keys = mapLang.keySet(); - - for (String list : listLang) { - for (String ky : keys) { - if (list.equals(ky)) { - mapLangorder.put(list, mapLang.get(ky)); - } - } - - } - - return mapLangorder; - } - - public static LinkedHashMap JsonObjSimpleParsingnoTranslate(String jsonIdentity, String idfield) - throws Exception { - LinkedHashMap mapLang = new LinkedHashMap(); - JSONObject json = new JSONObject(jsonIdentity); - - JSONObject identity = json.getJSONObject(PropertiesUtil.getKeyValue("jsonObjName")); - - JSONArray identityitems = identity.getJSONArray(idfield); - - for (int i = 0, size = identityitems.length(); i < size; i++) { - JSONObject idItem = identityitems.getJSONObject(i); - String lang = idItem.getString("language"); - String val = idItem.getString("value"); - String[] listLang = PropertiesUtil.getKeyValue("langcode").split("@@"); - for (String list : listLang) { - if (lang.equals(list)) { - mapLang.put(list, val); - return mapLang; - - } - } - - } - return mapLang; - } - - /** - * Direct String - * - * @param json - * @param jsonObjName - * @param idfield - * @return - * @throws Exception - */ - public static String JsonObjParsing(String jsonIdentity, String idfield) throws Exception { - String value = null; - JSONObject json = new JSONObject(jsonIdentity); - JSONObject identity = json.getJSONObject(PropertiesUtil.getKeyValue("jsonObjName")); - - value = identity.getString(idfield); - - return value; - } - - public static double JsonObjDoubleParsing(String jsonIdentity, String idfield) throws Exception { - double value = 0; - JSONObject json = new JSONObject(jsonIdentity); - JSONObject identity = json.getJSONObject(PropertiesUtil.getKeyValue("jsonObjName")); - - value = identity.getDouble(idfield); - - return value; - } - - public static List JsonObjArrayListParsing(String jsonIdentity, String idfield) throws Exception { - List list = new LinkedList(); - JSONObject json = new JSONObject(jsonIdentity); - - JSONObject identity = json.getJSONObject(PropertiesUtil.getKeyValue("jsonObjName")); - - JSONArray identityitems = identity.getJSONArray(idfield); - if (identityitems != null) { - for (int i = 0; i < identityitems.length(); i++) { - list.add(identityitems.getString(i)); - } - } - return list; - - } - - public static String readJsonFileText(String document) { - - String jsonTxt = null; - - try { - - File f = new File(System.getProperty("user.dir") + "\\"+document); - - if (f.exists()) { - InputStream is = new FileInputStream(f); - jsonTxt = IOUtils.toString(is, "UTF-8"); - System.out.println(jsonTxt); - logger.info("readJsonFileText"); - } - } catch (Exception e) { - logger.error("", e); - } - return jsonTxt; - } - - -} diff --git a/automation/src/main/java/automation/utility/PropertiesUtil.java b/automation/src/main/java/automation/utility/PropertiesUtil.java deleted file mode 100644 index d451d01b..00000000 --- a/automation/src/main/java/automation/utility/PropertiesUtil.java +++ /dev/null @@ -1,33 +0,0 @@ - -package automation.utility; - - -import java.io.*; -import java.util.Properties; - - -public class PropertiesUtil { - // private static final Logger logger = LogManager.getLogger(PropertiesUtil.class); - - public static String getKeyValue(String key) throws IOException { - - String configFilePath = System.getProperty("user.dir") + "\\config.properties"; - - FileReader reader = new FileReader(configFilePath); - // create properties object - Properties p = new Properties(); - - // Add a wrapper around reader object - p.load(reader); - - // access properties data - return p.getProperty(key); - - } - - public static void main(String[] args) throws IOException { - String value = getKeyValue("PropertyFilePath"); - System.out.println(value); - } - -} diff --git a/automation/src/main/java/automation/utility/SetTestName.java b/automation/src/main/java/automation/utility/SetTestName.java deleted file mode 100644 index dd5d1d12..00000000 --- a/automation/src/main/java/automation/utility/SetTestName.java +++ /dev/null @@ -1,9 +0,0 @@ -package automation.utility; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; - -@Retention(RetentionPolicy.RUNTIME) -public @interface SetTestName { - int idx() default 0; -} \ No newline at end of file diff --git a/automation/src/main/java/automation/utility/TestRunner.java b/automation/src/main/java/automation/utility/TestRunner.java deleted file mode 100644 index ce06f80b..00000000 --- a/automation/src/main/java/automation/utility/TestRunner.java +++ /dev/null @@ -1,44 +0,0 @@ -package automation.utility; - -import java.util.List; - -import org.testng.TestListenerAdapter; -import org.testng.TestNG; - -import automation.testcase.*; - - -public class TestRunner { - static TestListenerAdapter tla = new TestListenerAdapter(); - - - static TestNG testNg; - - public static void main(String[] args) throws Exception { - - testNg=new TestNG(); - - String listExcludedGroups=JsonUtil.JsonObjParsing(Commons.getTestData(),"setExcludedGroups"); - testNg.setExcludedGroups(listExcludedGroups); - testNg.setTestClasses(new Class[] { - - CenterTest.class,HolidaysTest.class,TemplateTest.class - - , - - DeviceTest.class,MachineTest.class - ,BlockListTest.class,CenterTypeTest.class, - DeviceSpecificationTest.class,DeviceTypesTest.class, - MachineSpecificationTest.class,MachineTypesTest.class, - DynamicFieldTest.class,DocumentCategoriesTest.class,DocumentTypes.class, - - BulkUploadTest.class - - }); - // testNg.addListener(tla); - testNg.run(); - - } - - -} diff --git a/automation/src/main/resources/BulkUploadFiles/ara/device_type.csv b/automation/src/main/resources/BulkUploadFiles/ara/device_type.csv deleted file mode 100644 index fad07c85..00000000 --- a/automation/src/main/resources/BulkUploadFiles/ara/device_type.csv +++ /dev/null @@ -1,2 +0,0 @@ -code,name,name,description,langCode,isActive -ABhGH,ABChjJH,ABChjJH,For printing Documents,eng,TRUE diff --git a/automation/src/main/resources/BulkUploadFiles/ara/machine_master.csv b/automation/src/main/resources/BulkUploadFiles/ara/machine_master.csv deleted file mode 100644 index 2e614b94..00000000 --- a/automation/src/main/resources/BulkUploadFiles/ara/machine_master.csv +++ /dev/null @@ -1,2 +0,0 @@ -id,name,macAddress,serialNum,ipAddress,validityDateTime,machineSpecId,publicKey,keyIndex,signPublicKey,signKeyIndex,zoneCode,regCenterId,langCode,isActive -58755,technoABCH,3C-2C-30-D1-E5-65,FB5962911688,192.168.0.408,2022-11-17T09:50:23.637Z,1001,AAEACwACAHIAIINxl2dEhLP4GpDMjUal1yT9UtduBlILZPKh2hszFGmqABAAFwALCAAAAQABAQDCHegKJ3vRn__8h1knXKiLA8qfO5LebzBlRO2tAcI3HvLyL9rPkVrXWYQ6wAn4VQk015C1hViU-7k752dYE5WUAUbgsxOHvvDPH1t72CNHNj9dyE86wGqR9AtK3yz0yf1IP_xgtWpiaQ2V9t2d3LtgPYWnRuPJbcl97nLXXL6PGfh1mRwsQUi94coEBPMZ9YLLOAFckPuDZt-lEcXIMkj8r0uNwAZUSEvGifTNWbLjC5BRlJBmvScIlptXqIwBaq2kSMVK2X1KbQ6TM8zkA_co4LEAIZfcpMgPn6RdW0yFtcx24HqrCY8v0DHregwoCPPpw8HvB-r5aR09mXG64zsJ,B9:6A:BF:7B:31:4F:9F:52:B1:24:B1:E4:2B:20:DD:5C:6A:BD:43:6E:20:51:5C:EB:73:E0:84:3D:06:5E:2C:45,AAEABAAEAHIAAAAQABQACwgAAAEAAQEAr93rKokeZGIzcCtFX3iyCvwpmfnd9jz0nF__0bxWr0mH8Zs0rhlG6vKRagx31I4CdrLAECOwMZ0r7Y3utTqHqelQE3MJLtboKITOqYRpBkqHSm1jGaEb8a1E9yoJri3tZrBCrAShimrN_SbtS1uKbJUG3cuVuE0gtGLI1d5wMfS_4PSz3RwvZtGHisEb3zbV6SLcJkgcDeMbUD7P25SVJd1xrJybuGIgyeSZxOgLzy1P-qHCiOXiAO9o06fwyIhIYbeZYz5th4rq7Rb6mRK9EWFpLrLvBL0F6USiidl8qNCxxZZFUp3W5xFANVYfRvgLKI33zBYniZ7aTE8PgrYa2w,CE:19:36:5F:89:6D:D3:3E:6D:1B:64:EF:CE:04:F1:14:D5:73:9D:FF:EC:18:FB:CC:DF:C8:74:8E:1E:DC:BF:73,NTH,10002,eng,TRUE diff --git a/automation/src/main/resources/BulkUploadFiles/eng/device_type.csv b/automation/src/main/resources/BulkUploadFiles/eng/device_type.csv deleted file mode 100644 index fad07c85..00000000 --- a/automation/src/main/resources/BulkUploadFiles/eng/device_type.csv +++ /dev/null @@ -1,2 +0,0 @@ -code,name,name,description,langCode,isActive -ABhGH,ABChjJH,ABChjJH,For printing Documents,eng,TRUE diff --git a/automation/src/main/resources/BulkUploadFiles/eng/machine_master.csv b/automation/src/main/resources/BulkUploadFiles/eng/machine_master.csv deleted file mode 100644 index 2e614b94..00000000 --- a/automation/src/main/resources/BulkUploadFiles/eng/machine_master.csv +++ /dev/null @@ -1,2 +0,0 @@ -id,name,macAddress,serialNum,ipAddress,validityDateTime,machineSpecId,publicKey,keyIndex,signPublicKey,signKeyIndex,zoneCode,regCenterId,langCode,isActive -58755,technoABCH,3C-2C-30-D1-E5-65,FB5962911688,192.168.0.408,2022-11-17T09:50:23.637Z,1001,AAEACwACAHIAIINxl2dEhLP4GpDMjUal1yT9UtduBlILZPKh2hszFGmqABAAFwALCAAAAQABAQDCHegKJ3vRn__8h1knXKiLA8qfO5LebzBlRO2tAcI3HvLyL9rPkVrXWYQ6wAn4VQk015C1hViU-7k752dYE5WUAUbgsxOHvvDPH1t72CNHNj9dyE86wGqR9AtK3yz0yf1IP_xgtWpiaQ2V9t2d3LtgPYWnRuPJbcl97nLXXL6PGfh1mRwsQUi94coEBPMZ9YLLOAFckPuDZt-lEcXIMkj8r0uNwAZUSEvGifTNWbLjC5BRlJBmvScIlptXqIwBaq2kSMVK2X1KbQ6TM8zkA_co4LEAIZfcpMgPn6RdW0yFtcx24HqrCY8v0DHregwoCPPpw8HvB-r5aR09mXG64zsJ,B9:6A:BF:7B:31:4F:9F:52:B1:24:B1:E4:2B:20:DD:5C:6A:BD:43:6E:20:51:5C:EB:73:E0:84:3D:06:5E:2C:45,AAEABAAEAHIAAAAQABQACwgAAAEAAQEAr93rKokeZGIzcCtFX3iyCvwpmfnd9jz0nF__0bxWr0mH8Zs0rhlG6vKRagx31I4CdrLAECOwMZ0r7Y3utTqHqelQE3MJLtboKITOqYRpBkqHSm1jGaEb8a1E9yoJri3tZrBCrAShimrN_SbtS1uKbJUG3cuVuE0gtGLI1d5wMfS_4PSz3RwvZtGHisEb3zbV6SLcJkgcDeMbUD7P25SVJd1xrJybuGIgyeSZxOgLzy1P-qHCiOXiAO9o06fwyIhIYbeZYz5th4rq7Rb6mRK9EWFpLrLvBL0F6USiidl8qNCxxZZFUp3W5xFANVYfRvgLKI33zBYniZ7aTE8PgrYa2w,CE:19:36:5F:89:6D:D3:3E:6D:1B:64:EF:CE:04:F1:14:D5:73:9D:FF:EC:18:FB:CC:DF:C8:74:8E:1E:DC:BF:73,NTH,10002,eng,TRUE diff --git a/automation/src/main/resources/BulkUploadFiles/sin/device_type.csv b/automation/src/main/resources/BulkUploadFiles/sin/device_type.csv deleted file mode 100644 index fad07c85..00000000 --- a/automation/src/main/resources/BulkUploadFiles/sin/device_type.csv +++ /dev/null @@ -1,2 +0,0 @@ -code,name,name,description,langCode,isActive -ABhGH,ABChjJH,ABChjJH,For printing Documents,eng,TRUE diff --git a/automation/src/main/resources/BulkUploadFiles/sin/machine_master.csv b/automation/src/main/resources/BulkUploadFiles/sin/machine_master.csv deleted file mode 100644 index 2e614b94..00000000 --- a/automation/src/main/resources/BulkUploadFiles/sin/machine_master.csv +++ /dev/null @@ -1,2 +0,0 @@ -id,name,macAddress,serialNum,ipAddress,validityDateTime,machineSpecId,publicKey,keyIndex,signPublicKey,signKeyIndex,zoneCode,regCenterId,langCode,isActive -58755,technoABCH,3C-2C-30-D1-E5-65,FB5962911688,192.168.0.408,2022-11-17T09:50:23.637Z,1001,AAEACwACAHIAIINxl2dEhLP4GpDMjUal1yT9UtduBlILZPKh2hszFGmqABAAFwALCAAAAQABAQDCHegKJ3vRn__8h1knXKiLA8qfO5LebzBlRO2tAcI3HvLyL9rPkVrXWYQ6wAn4VQk015C1hViU-7k752dYE5WUAUbgsxOHvvDPH1t72CNHNj9dyE86wGqR9AtK3yz0yf1IP_xgtWpiaQ2V9t2d3LtgPYWnRuPJbcl97nLXXL6PGfh1mRwsQUi94coEBPMZ9YLLOAFckPuDZt-lEcXIMkj8r0uNwAZUSEvGifTNWbLjC5BRlJBmvScIlptXqIwBaq2kSMVK2X1KbQ6TM8zkA_co4LEAIZfcpMgPn6RdW0yFtcx24HqrCY8v0DHregwoCPPpw8HvB-r5aR09mXG64zsJ,B9:6A:BF:7B:31:4F:9F:52:B1:24:B1:E4:2B:20:DD:5C:6A:BD:43:6E:20:51:5C:EB:73:E0:84:3D:06:5E:2C:45,AAEABAAEAHIAAAAQABQACwgAAAEAAQEAr93rKokeZGIzcCtFX3iyCvwpmfnd9jz0nF__0bxWr0mH8Zs0rhlG6vKRagx31I4CdrLAECOwMZ0r7Y3utTqHqelQE3MJLtboKITOqYRpBkqHSm1jGaEb8a1E9yoJri3tZrBCrAShimrN_SbtS1uKbJUG3cuVuE0gtGLI1d5wMfS_4PSz3RwvZtGHisEb3zbV6SLcJkgcDeMbUD7P25SVJd1xrJybuGIgyeSZxOgLzy1P-qHCiOXiAO9o06fwyIhIYbeZYz5th4rq7Rb6mRK9EWFpLrLvBL0F6USiidl8qNCxxZZFUp3W5xFANVYfRvgLKI33zBYniZ7aTE8PgrYa2w,CE:19:36:5F:89:6D:D3:3E:6D:1B:64:EF:CE:04:F1:14:D5:73:9D:FF:EC:18:FB:CC:DF:C8:74:8E:1E:DC:BF:73,NTH,10002,eng,TRUE diff --git a/automation/src/main/resources/README b/automation/src/main/resources/README deleted file mode 100644 index b8427cd9..00000000 --- a/automation/src/main/resources/README +++ /dev/null @@ -1,31 +0,0 @@ -This Repsitory is used for Admin Portal Automation. - -How To run : - First Build Jar - Place VM args- java -Dpath=https://env.mosip.net/ -Duserid=user -Dpassword=pwd -jar nameofAdminJar.jar - Place jar in one folder along with src/main/resources files and folder and then run jar - -TestData Setup: - Config.properties - langcode:eng -- This is Admin login page language selection description placed in TestData.json - bulkwait:10000 -- This is Bulk upload wait - TestData.json - Keep setExcludedGroups="" -- To run all the scenario mentioned below - Keep setExcludedGroups="BL,CT" -- To Exclude testcases execution based on below tags. - -Includes: Below Scenarios and their tags. - "blocklistedwordsCRUD": "BL", - "bulkUploadCRUD": "BU", - "centerCRUD": "CTR", - "centerTypeCRUD": "CT", - "deviceSpecCRUD": "DS", - "deviceCRUD": "D", - "deviceTypesCRUD": "DT", - "documentCategoriesCRUD": "DOC", - "documentTypesCRUD": "DOCT", - "dynamicFieldCRUD": "DF", - "holidaysCRUD": "H", - "machineSpecCRUD": "MS", - "machineCRUD": "M", - "machineTypesCRUD": "MT", - "templateCRUD": "T" \ No newline at end of file diff --git a/automation/src/main/resources/TestData.json b/automation/src/main/resources/TestData.json deleted file mode 100644 index 66381415..00000000 --- a/automation/src/main/resources/TestData.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "identity": { - "BELOW_ARE_KEYWORDS_FOR_HELP": "Below Keys use to put in setExcludedGroups to exclude scenarios eg BL for blocklistedwordsCRUD to ignore this execution", - "setExcludedGroupsAll": "BL,BU,CTR,CT,DS,D,DT,DOC,DOCT,DF,H,MS,M,MT,T", - "blocklistedwordsCRUD": "BL", - "bulkUploadCRUD": "BU", - "centerCRUD": "CTR", - "centerTypeCRUD": "CT", - "deviceSpecCRUD": "DS", - "deviceCRUD": "D", - "deviceTypesCRUD": "DT", - "documentCategoriesCRUD": "DOC", - "documentTypesCRUD": "DOCT", - "dynamicFieldCRUD": "DF", - "holidaysCRUD": "H", - "machineSpecCRUD": "MS", - "machineCRUD": "M", - "machineTypesCRUD": "MT", - "templateCRUD": "T", - "BELOW_ARE_STATIC_KEYWORDS": "We are using this setExcludedGroups to exclude scenarios", - "setExcludedGroups": "BL,BU,CTR,CT,DS,D,DT,DOC,DOCT,DF,H,MS,M,MT", - "langcode": [ - { - "language": "tam", - "value": "தமிழ்" - }, - { - "language": "kan", - "value": "ಕನ್ನಡ" - }, - { - "language": "hin", - "value": "हिंदी" - }, - { - "language": "eng", - "value": "English" - }, - { - "language": "fra", - "value": "Français" - }, - { - "language": "ara", - "value": "Arabic" - } - ] - } -} \ No newline at end of file diff --git a/automation/src/main/resources/chromedriver/chromedriver.exe b/automation/src/main/resources/chromedriver/chromedriver.exe deleted file mode 100644 index 60449ae1..00000000 Binary files a/automation/src/main/resources/chromedriver/chromedriver.exe and /dev/null differ diff --git a/automation/src/main/resources/config.properties b/automation/src/main/resources/config.properties deleted file mode 100644 index e9f758a5..00000000 --- a/automation/src/main/resources/config.properties +++ /dev/null @@ -1,3 +0,0 @@ -langcode:eng -jsonObjName:identity -bulkwait:10000 \ No newline at end of file diff --git a/automation/src/main/resources/logback.xml b/automation/src/main/resources/logback.xml deleted file mode 100644 index 9e5df39f..00000000 --- a/automation/src/main/resources/logback.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - ${APP_LOG_ROOT}/AutomationLogs.log - - ${LOG_PATTERN} - - - ${APP_LOG_ROOT}/AutomationLogs-%i.log - 1 - 10 - - - 10MB - - - - - - - - - \ No newline at end of file