Files
NativeScript/e2e/ui-tests-app
Vasil Trifonov 243dc98005 Added selectedItemColor and unSelectedItemColor to the TabStrip (#8431)
* chore: add guard for ios

* feat(bottom-nav): adding new properties

* feat(tabs): new property implementation

* feat: new feature implementation in android

Implemented selectedItemColor and unSelectedItemColor properties on TabStrip

* chore: added some comments

* chore: change method return type

* fix: setting icon color

* fix: rendering mode setting

* chore: rename variable

* chore: fixed a typo

* chore: updated log in build gradle

* fix: item color setting in android

* fix: tab styling when no css aplied

* chore: private methods renamed

* tests: added selected-item test pages

* chore: renamed test pages

* chore: move css-tree package to the right place

* tests: added new ui tests

* fix: use renamed function

* fix: set item color

* tests: aded automationText attribute

* tests: trying to fix the tests

Co-authored-by: Dimitar Topuzov <dtopuzov@gmail.com>
2020-03-16 12:54:30 +02:00
..
2019-06-20 15:58:36 +03:00
2019-10-17 00:45:33 +03:00

e2e tests execution

  1. Local setup

    • install appium and all requirments related to nativescript-dev-appium plugin usage

    • download images:

      npm run load-images Emulator-Api23-Default "iPhone X 12"

      or load multiple folders:

      npm run load-images Emulator-Api23-Default Emulator-Google-Api28 "iPhone X 12"

      or load all folders:

      npm run load-images all

      This command will download https://github.com/NativeScript/functional-tests-images/tree/master/uitestsapp and sparse all passed directories [emulator-name|simulator-name]

    • rename/ create your device so that it matches folder name, respectively api level and density of emulators.

      You can also use scripts:

      npm run update-emulators to update your emulator density.

      If you need to download system image and create emulator use:

      npm run update-emulators -- --update-system-images

  2. Test execution

    • Run test compilation in separate terminal and don't kill it.

      npm run test-watch

    • It is highly recommended during the development to use

      npm run test [android|ios] along with tns run [android|ios]. This command will use already installed app on the device. For example: Open terminal1 and run: tns run android and open new terminal2 and run: npm run test android

  3. Debug test.

    • Run:

      npm run e2e-debug [android|ios] run in separate console and don't kill it. This command will start appium server and driver and use the installed app on the device but it will not execute tests.

    • Go to vs code debugging and use a config like:

        {
            "type": "node",
            "request": "launch",
            "name": "Debug Tests",
            "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
            "args": [
                "-u",
                "tdd",
                "--colors",
                "--opts",
                "../config/mocha.opts",
                "--attachToDebug",
                "--grpe",
                "button"
            ],
            "internalConsoleOptions": "openOnSessionStart"
        }
    
    

mocha options

mocha opt file is located at "../config/mocha.opts".

   --timeout 999999
   --recursive e2e
   --reporter mochawesome
   --reporter-options quiet=true,html=true,inline=true,autoOpen=true
   --exit

grep particular suit or test

npm run e2e ios -- --grep=tabs-tab(s-\\w+)-suite