nativescript-community / ui-collectionview

Allows you to easily add a collection view (grid list view) to your projects. Supports vertical and horizontal modes, templating, and more.
Apache License 2.0
59 stars 18 forks source link

Feature/detox #9

Closed keerl closed 3 years ago

keerl commented 3 years ago

You don't have to merge this in if you don't want to yet, still trying to figure out the best way to do this

Install the global Detox requirements as stated here, which are below this anyways.

Install Detox command line tools (detox-cli)

npm install -g detox-cli

Install applesimutils (iOS)

brew tap wix/brew
brew install applesimutils

Choosing Devices

You need to set the iOS simulator and Android emulator you want to use for testing. I made a file called devices.js where you can edit these devices. You can like Android emulators with emulator -list-avds. It looks something like this:

module.exports = {
    ios: 'iPhone 12 Pro Max',
    android: 'Pixel_3a_API_30_1'
};

Runnings Tests

I made a simple scroll up and down test for collectionview so far. I made a script called e2e/run-tests.js which will easily run for any platform or framework. If you run ./e2e/run-tests.js --help to see all the options.

I aliased that script to an npm script, so you can run npm run e2e --help for that same command, and I added ones for just building for all platforms and running on all platforms.

By default (for this repo), Angular, Vue, Svelte, and React tests will run.

farfromrefug commented 3 years ago

Love it!