8 Bad Graphic Design Mistakes You DON’T Want To Make

Original Source: http://feedproxy.google.com/~r/Designrfix/~3/46q9EHrMTQk/bad-graphic-design

Nothing stands out more than a glaring design fail. A company’s success can rise and fall on the visual branding done by its hired graphic designers. In a fast-paced business world, one mistake can make an entire campaign implode.  Companies want to have faith their graphic designers know how to prevent a crisis. If you want […]

The post 8 Bad Graphic Design Mistakes You DON’T Want To Make appeared first on designrfix.com.

Epic phone deal includes a FREE Nintendo Switch or 4K TV!

Original Source: http://feedproxy.google.com/~r/CreativeBloq/~3/c7TM-WFdoZk/epic-phone-deal-includes-a-free-nintendo-switch-or-4k-tv

Who wants a free Nintendo Switch games console or Toshiba 4K HDR TV, as well as a new phone? Yes, you really can get all of this with EE's stunning deal, which just goes to show that the best Black Friday deals are already appearing. 

The phones you can get are the Samsung Galaxy A80, A70 or A40 or a Huawei P30 Lite, Huawei P30 Pro or Huawei P smart. Sign up for one of these right now through EE and you could be enjoying a nice new shiny games console or a super-sharp pixel perfect screen in your living room very soon. 

These deals offer some of the best phones around, some of them even made it our best camera phones post. With prices starting from as little as £28 a month these deals are not to be missed. They all include 10GB of data and there's no upfront cost on selected phones.

To help you make the right choice quickly and easily we have broken down these must-see Samsung and Huawei deals. Find the one for you below.

Huawei phone deals + free Nintendo Switch or 4K TV
Samsung phone deals + free Nintendo Switch or 4K TV

Not quite what you're after? Check out some more smartphone deals below. 

Read more:

Amazon Black Friday: when to get the best dealsThe best laptop deals in 2019How do you use your mobile phone at work?

40+ Tools to Supercharge Your Instagram Account

Original Source: https://www.hongkiat.com/blog/instagram-tools-mobile-apps/

With 1 billion monthly active users and 50% daily active users, Instagram is more than a popular social media platform: it’s a powerful marketing platform for every brand worldwide — big…

Visit hongkiat.com for full content.

Exciting New Tools for Designers, November 2019

Original Source: https://www.webdesignerdepot.com/2019/11/exciting-new-tools-for-designers-november-2019/

You’re sure to find some tools and resources that will help you save time as we enter what is often one of the most hectic seasons of the year. Here’s what’s new for designers this month.

Screen Size Map

Screen Size Map is a tool to showcase popular screen sizes and will even auto-detect yours. Map sizes by device type, usage, size, and popularity. This can really come in handy when thinking about viewports or breakpoints in design projects. You might also be surprised to see what screen sizes are the most (or least) popular.

Lordicon

Lordicon is a collection of free and premium animated icons in GIF and JSON formats. Each icon has a fun line style and can be customized to match your color palette. You can also adjust size, stroke width, and animation player type — automatic, hover, click, or morph. Every icon is scalable and compatible with all major browsers. This is a fun animated icon kit for projects built on the Lottie engine.

Free Bootstrap Templates and Themes

Free Bootstrap Templates and Themes is a library of free (and premium!) design elements to jumpstart projects using Designmodo’s Startup App. These tools are great starters that you can use as is, or edit in the app to create landing pages, SaaS, admin pages, presentations, and e-commerce websites.

Inspect This Snake

Inspect This Snake is a fun goodie by Matthew Rayfield. Go ahead click it and play around. You might even learn something about how he put it all together.

FYI: Free Resources for Freelancers

FYI: Free Resources for Freelancers is a collection of tools to connect all the apps for sharing and storing information. It works as a Chrome extension and allows you to connect all your free tools for better workflows. “With FYI every document you’ve created and that’s been shared with you will be accessible in just a few clicks. Your documents will be automatically organized so you won’t be checking each app and account to find what you’re looking for. They’ll all be in one place.”

Spectrum

Spectrum is Adobe’s design system and the company recently released these components and tools to the public. You can even use the Spectrum CSS, which is open source, in conjunction with the guidelines from Adobe. Even if you don’t plan to use it, this is a neat look into the design system and how Adobe thinks about the look and feel of its products. (And while it doesn’t look all that detailed at first glance, the system is rather extensive.)

Dashdash

Dashdash is a spreadsheet tool that allows you to access business data and APIs, send emails, and more with a traditional spreadsheet online. You don’t need to code to design tools and information. Plus, it integrates with other tools to make your work easier.

Can You Draw a Perfect Circle?

Can You Draw a Perfect Circle? is a browser-based game that you might find yourself obsessing over. (I really wanted to draw a perfect circle, but it never happens.)

Open Doodles

Open Doodles is an animated collection of hand-drawn illustrations for projects in SVG, PNG, and GIF formats. Use the generator to change the colors and styles to create a semi-custom pack.

Claro

Claro is a nifty to-do app that’s open to invites. It features a simple design that’s supposed to be distraction free so that you focus on things you need to get done, not the design of the tool.

Tartan Patterns

Tartan Patterns is a collection of more than 5,000 repeating SVG and PNG images. (Seems like the perfect pattern for fall.) Everything is grouped by name in alphabetical order. Warning: It is easy to get lost in looking at all the patterns.

Blocke: Social Web UI Kit

Blocke: Social Web UI Kit is a set of 30 components designed for social feeds. The freebie is a preview for a bigger set if you like what you see.

CursorOS

CursorOS is a Figma-read (Sketch coming soon) collection of original macOS cursors that you can use in design systems, projects, user flows, UI kits, prototypes, and more.

Tutorial: Designing Accessible Color Systems

Designing Accessible Color Systems is a look at how Stripe has worked to improve color contrast and accessibility in its design projects. The lesson is reflective of recent changes to the brand’s color palette to make it more accessible. It’s a good lesson in modern color theory.

Izmir Hover Effects

Izmir Hover Effects is a mini CSS library that helps you create customer effects. Load the library to your project, add the element markup and style classes, and you are ready to go.

8b

8b is a website builder based on Google AMP. Use it to create modern designs on a fast, responsive template. It’s free to build on and includes plenty of templates for quick builds. You can also link a domain and every site includes SSL/HTTPS.

Hexometer

Hexometer uses artificial intelligence to scan over 2,800 data points on your website to make sure your digital assets are in pristine condition. It will also give you tips and tricks on how to improve your website hygiene.

FontPairings.ByPeople

FontPairings.ByPeople allows you to pop pairs of fonts onto the screen with just a click to see how they look on different website theme templates. Swap headings and text elements and mix and match pairs to find a typography palette that appeals to you.

Antique Cherry

Antique Cherry is a lovely novelty script with nice lines and great curves. It’s available for personal and non-profit use and includes a full character set.

Glitch Esports

Glitch Esports combines two trending elements, glitching design and esports in a single typeface. Try it for a fun display option.

Grifter Bold

Grifter Bold is a round versatile font in all caps and lowercase that can work great for display options. (Only the bold version is free.) It includes a full character and number set with some extra glyphs.

Les Paul

Les Paul is a fun novelty display font with lots of options to create interesting combinations of text elements. All of the characters are uppercase and there is a small fee for commercial use.

Recursive

Recursive is a variable font in beta that will soon be added to the Google Fonts collection. It includes a sans and mono option and is a five-axis variable font. Use predefined styles or adjust proportion, monospace, weight, slant, and italic to take full advantage of the variable font technology. Everything is in one font file.

Salveation Serif

Salveation Serif is a nice display, uppercase font with fun lines and a vintage feel. The font includes letters, numerals, and unlimited punctuation.

Source

p img {display:inline-block; margin-right:10px;}
.alignleft {float:left;}
p.showcase {clear:both;}
body#browserfriendly p, body#podcast p, div#emailbody p{margin:0;}

The Best jQuery Plugins & Effects That Are Still Useful in 2019

Original Source: http://feedproxy.google.com/~r/1stwebdesigner/~3/2O6PzBMEYFE/

If you’re coding with JavaScript, jQuery should be one of the first things you install. The lightweight JavaScript library optimizes and simplifies core features like Ajax handling, animation, event handling, and HTML document transversal – in other words, it makes working with JavaScript a lot easier.

Many developers have released plugins built on the jQuery framework for free. These can add key features and effects to your website, including autocomplete, file upload, or image zooming.

Ready to install cool effects and awesome jQuery plugins? Here are some of the best libraries you’re sure to love.

Your Web Designer Toolbox
Unlimited Downloads: 500,000+ Web Templates, Icon Sets, Themes & Design Assets


DOWNLOAD NOW

fancybox

Example of fancybox

This lightbox plugin can display various types of media in a beautiful darkened popup. Besides images and videos, it also accepts custom content like Google Maps and can resize to fit them. Plus, it’s easily extensible with a little CSS and JavaScript knowledge. It’s free to use in open source projects, or commercially with a license.

jQuery File Upload

Example of jQuery File Upload

If you need to add file upload functionality to your site, this little widget has everything. You can upload any type of file with unlimited file size, and even drop them right into the browser.

fullPage.js

Example of fullPage.js

Looking for a quick and easy way to create a one-page, scrolling, full-screen website? All the tutorials are here to help you get this library set up and working, with in-depth explanations for every option. Open source projects can use it for free.

Tiny Slider

Example of Tiny Slider

This library may be called Tiny Slider, but it includes dozens of demos, each with its own unique functionality. Fixed widget, vertical, even lazy loading sliders; test out each demo until you find the one you want.

Select2

Example of Select2

Is the default HTML select box not doing it for you? Select2 implements an easily customizable, extremely extensible dropdown select box including pages and pages of helpful documentation.

Ajax AutoComplete for jQuery

Example of Ajax AutoComplete for jQuery

If you need to add an autocompleting text box to your website, this lightweight file is the way to go. It takes up practically no space, yet provides advanced autocomplete functionality.

Flotcharts

Example of Flotcharts

This is more than just a simple chart plugin. While it’s easy to use thanks to the API documentation, it also comes with advanced functionality like real-time plotting and beautiful aesthetics.

pickadate.js

Example of pickadate.js

Responsive and customizable, pickadate.js makes creating a date or time selection box as easy as installing this lightweight plugin. Check out the API documentation to customize it even further.

jQuery Zoom

Example of jQuery Zoom

Image zooming is no longer a hassle with this jQuery plugin. Install the files and assign it to an image, then hover or click to zoom in. It’s easy as that.

SortableJS

Example of SortableJS

Sortable lists made easy. Drag and drop to reorder lists you define, with features like cloning, multi-list, or image grids included. For a simple concept, this is a pretty complex library.

jQuery Knob

Example of jQuery Knob

Compatible with mouse, keyboard, and mobile controls, these draggable dials will work on almost any platform. There are all kinds of dials built in that turn and count in various ways.

iCheck

Example of iCheck

Light, accessible, and supported on most devices and browsers, iCheck is perfect if you need to implement checkboxes or radio buttons. It comes with 6 beautiful skins built in which you can easily customize with CSS.

DataTables

Example of DataTables

Tables are never easy to deal with, but DataTables makes it a total breeze. Just load it up and put in a single function, and you’ll instantly generate a table on your site. Then you can add pages, search, sorting, and more. Plus, it supports both themes and extensions.

Save Time with jQuery Plugins

With web development, there’s no reason to reinvent the wheel. These jQuery plugins and effects have already done all the work for you. All you need to do is paste some code in, and you’ll be able to enhance your site with shiny new features.

Most of these plugins are totally free to use. Implement them into your sites and extend them for your own designs, and shave off what could have been days of programming work.


How to Apply Instagram Filters on Web Images

Original Source: https://www.hongkiat.com/blog/instagram-filters-on-web-images/

Many love using Instagram and the filters that come with the app, to make their photos more interesting and beautiful. So far though, the use of these filters are restricted to use inside the app….

Visit hongkiat.com for full content.

11 Portable Batteries for Your MacBook — Best of

Original Source: https://www.hongkiat.com/blog/macbook-portable-battery/

If you love working in a cafe or library — like me — or a co-working space with fewer power outlets, you require extra juice for your MacBook. Why? Although MacBook Pro promises “10…

Visit hongkiat.com for full content.

Face Detection and Recognition with Keras

Original Source: https://www.sitepoint.com/keras-face-detection-recognition/?utm_source=rss

Face Detection and Recognition with Keras

If you’re a regular user of Google Photos, you may have noticed how the application automatically extracts and groups faces of people from the photos that you back up to the cloud.

Face Recognition in the Google Photos web applicationFace Recognition in the Google Photos web application

A photo application such as Google’s achieves this through the detection of faces of humans (and pets too!) in your photos and by then grouping similar faces together. Detection and then classification of faces in images is a common task in deep learning with neural networks.

In the first step of this tutorial, we’ll use a pre-trained MTCNN model in Keras to detect faces in images. Once we’ve extracted the faces from an image, we’ll compute a similarity score between these faces to find if they belong to the same person.

Prerequisites

Before you start with detecting and recognizing faces, you need to set up your development environment. First, you need to “read” images through Python before doing any processing on them. We’ll use the plotting library matplotlib to read and manipulate images. Install the latest version through the installer pip:

pip3 install matplotlib

To use any implementation of a CNN algorithm, you need to install keras. Download and install the latest version using the command below:

pip3 install keras

The algorithm that we’ll use for face detection is MTCNN (Multi-Task Convoluted Neural Networks), based on the paper Joint Face Detection and Alignment using Multi-task Cascaded Convolutional Networks (Zhang et al., 2016). An implementation of the MTCNN algorithm for TensorFlow in Python3.4 is available as a package. Run the following command to install the package through pip:

pip3 install mtcnn

To compare faces after extracting them from images, we’ll use the VGGFace2 algorithm developed by the Visual Geometry Group at the University of Oxford. A TensorFlow-based Keras implementation of the VGG algorithm is available as a package for you to install:

pip3 install keras_vggface

While you may feel the need to build and train your own model, you’d need a huge training dataset and vast processing power. Since this tutorial focuses on the utility of these models, it uses existing, trained models by experts in the field.

Now that you’ve successfully installed the prerequisites, let’s jump right into the tutorial!

Step 1: Face Detection with the MTCNN Model

The objectives in this step are as follows:

retrieve images hosted externally to a local server
read images through matplotlib’s imread() function
detect and explore faces through the MTCNN algorithm
extract faces from an image.

1.1 Store External Images

You may often be doing an analysis from images hosted on external servers. For this example, we’ll use two images of Lee Iacocca, the father of the Mustang, hosted on the BBC and The Detroit News sites.

To temporarily store the images locally for our analysis, we’ll retrieve each from its URL and write it to a local file. Let’s define a function store_image for this purpose:

import urllib.request

def store_image(url, local_file_name):
with urllib.request.urlopen(url) as resource:
with open(local_file_name, ‘wb’) as f:
f.write(resource.read())

You can now simply call the function with the URL and the local file in which you’d like to store the image:

store_image(‘https://ichef.bbci.co.uk/news/320/cpsprodpb/5944/production/_107725822_55fd57ad-c509-4335-a7d2-bcc86e32be72.jpg’,
‘iacocca_1.jpg’)
store_image(‘https://www.gannett-cdn.com/presto/2019/07/03/PDTN/205798e7-9555-4245-99e1-fd300c50ce85-AP_080910055617.jpg?width=540&height=&fit=bounds&auto=webp’,
‘iacocca_2.jpg’)

After successfully retrieving the images, let’s detect faces in them.

1.2 Detect Faces in an Image

For this purpose, we’ll make two imports — matplotlib for reading images, and mtcnn for detecting faces within the images:

from matplotlib import pyplot as plt
from mtcnn.mtcnn import MTCNN

Use the imread() function to read an image:

image = plt.imread(‘iacocca_1.jpg’)

Next, initialize an MTCNN() object into the detector variable and use the .detect_faces() method to detect the faces in an image. Let’s see what it returns:

detector = MTCNN()

faces = detector.detect_faces(image)
for face in faces:
print(face)

For every face, a Python dictionary is returned, which contains three keys. The box key contains the boundary of the face within the image. It has four values: x- and y- coordinates of the top left vertex, width, and height of the rectangle containing the face. The other keys are confidence and keypoints. The keypoints key contains a dictionary containing the features of a face that were detected, along with their coordinates:

{‘box’: [160, 40, 35, 44], ‘confidence’: 0.9999798536300659, ‘keypoints’: {‘left_eye’: (172, 57), ‘right_eye’: (188, 57), ‘nose’: (182, 64), ‘mouth_left’: (173, 73), ‘mouth_right’: (187, 73)}}

1.3 Highlight Faces in an Image

Now that we’ve successfully detected a face, let’s draw a rectangle over it to highlight the face within the image to verify if the detection was correct.

To draw a rectangle, import the Rectangle object from matplotlib.patches:

from matplotlib.patches import Rectangle

Let’s define a function highlight_faces to first display the image and then draw rectangles over faces that were detected. First, read the image through imread() and plot it through imshow(). For each face that was detected, draw a rectangle using the Rectangle() class.

Finally, display the image and the rectangles using the .show() method. If you’re using Jupyter notebooks, you may use the %matplotlib inline magic command to show plots inline:

def highlight_faces(image_path, faces):
# display image
image = plt.imread(image_path)
plt.imshow(image)

ax = plt.gca()

# for each face, draw a rectangle based on coordinates
for face in faces:
x, y, width, height = face[‘box’]
face_border = Rectangle((x, y), width, height,
fill=False, color=’red’)
ax.add_patch(face_border)
plt.show()

Let’s now display the image and the detected face using the highlight_faces() function:

highlight_faces(‘iacocca_1.jpg’, faces)

Detected face in an image of Lee IacoccaDetected face in an image of Lee Iacocca. Source: BBC

Let’s display the second image and the face(s) detected in it:

image = plt.imread(‘iacocca_2.jpg’)
faces = detector.detect_faces(image)

highlight_faces(‘iacocca_2.jpg’, faces)

The Detroit NewsThe Detroit News

In these two images, you can see that the MTCNN algorithm correctly detects faces. Let’s now extract this face from the image to perform further analysis on it.

1.4 Extract Face for Further Analysis

At this point, you know the coordinates of the faces from the detector. Extracting the faces is a fairly easy task using list indices. However, the VGGFace2 algorithm that we use needs the faces to be resized to 224 x 224 pixels. We’ll use the PIL library to resize the images.

The function extract_face_from_image() extracts all faces from an image:

from numpy import asarray
from PIL import Image

def extract_face_from_image(image_path, required_size=(224, 224)):
# load image and detect faces
image = plt.imread(image_path)
detector = MTCNN()
faces = detector.detect_faces(image)

face_images = []

for face in faces:
# extract the bounding box from the requested face
x1, y1, width, height = face[‘box’]
x2, y2 = x1 + width, y1 + height

# extract the face
face_boundary = image[y1:y2, x1:x2]

# resize pixels to the model size
face_image = Image.fromarray(face_boundary)
face_image = face_image.resize(required_size)
face_array = asarray(face_image)
face_images.append(face_array)

return face_images

extracted_face = extract_face_from_image(‘iacocca_1.jpg’)

# Display the first face from the extracted faces
plt.imshow(extracted_face[0])
plt.show()

Here is how the extracted face looks from the first image.

Extracted and resized face from first imageExtracted and resized face from first image

The post Face Detection and Recognition with Keras appeared first on SitePoint.

How Your Website’s Design Can Build or Break Your SEO

Original Source: http://feedproxy.google.com/~r/Designrfix/~3/ynZP1hpWsBQ/how-your-websites-design-can-build-or-break-your-seo

The success of your business’s online marketing presence can be achieved through your website’s design. Before starting to design a better website for your business, you must understand the significance of web design and how it can build or break your SEO. Web design can have a great impact on your SEO, as both are […]

The post How Your Website’s Design Can Build or Break Your SEO appeared first on designrfix.com.

React Native End-to-end Testing and Automation with Detox

Original Source: https://www.sitepoint.com/detox-react-native-testing-automation/?utm_source=rss

Introducing Detox, a React Native End-to-end Testing and Automation Framework

Detox is an end-to-end testing and automation framework that runs on a device or a simulator, just like an actual end user.

Software development demands fast responses to user and/or market needs. This fast development cycle can result (sooner or later) in parts of a project being broken, especially when the project grows so large. Developers get overwhelmed with all the technical complexities of the project, and even the business people start to find it hard to keep track of all scenarios the product caters for.

In this scenario, there’s a need for software to keep on top of the project and allow us to deploy with confidence. But why end-to-end testing? Aren’t unit testing and integration testing enough? And why bother with the complexity that comes with end-to-end testing?

First of all, the complexity issue has been tackled by most of the end-to-end frameworks, to the extent that some tools (whether free, paid or limited) allow us to record the test as a user, then replay it and generate the necessary code. Of course, that doesn’t cover the full range of scenarios that you’d be able to address programmatically, but it’s still a very handy feature.

Want to learn React Native from the ground up? This article is an extract from our Premium library. Get an entire collection of React Native books covering fundamentals, projects, tips and tools & more with SitePoint Premium. Join now for just $9/month.

End-to-end Integration and Unit Testing

End-to-end testing versus integration testing versus unit testing: I always find the word “versus” drives people to take camps — as if it’s a war between good and evil. That drives us to take camps instead of learning from each other and understanding the why instead of the how. The examples are countless: Angular versus React, React versus Angular versus Vue, and even more, React versus Angular versus Vue versus Svelte. Each camp trash talks the other.

jQuery made me a better developer by taking advantage of the facade pattern $('') to tame the wild DOM beast and keep my mind on the task at hand. Angular made me a better developer by taking advantage of componentizing the reusable parts into directives that can be composed (v1). React made me a better developer by taking advantage of functional programming, immutability, identity reference comparison, and the level of composability that I don’t find in other frameworks. Vue made me a better developer by taking advantage of reactive programming and the push model. I could go on and on, but I’m just trying to demonstrate the point that we need to concentrate more on the why: why this tool was created in the first place, what problems it solves, and whether there are other ways of solving the same problems.

As You Go Up, You Gain More Confidence

end-to-end testing graph that demonstrates the benefit of end-to-end testing and the confidence it brings

As you go more on the spectrum of simulating the user journey, you have to do more work to simulate the user interaction with the product. But on the other hand, you get the most confidence because you’re testing the real product that the user interacts with. So, you catch all the issues—whether it’s a styling issue that could cause a whole section or a whole interaction process to be invisible or non interactive, a content issue, a UI issue, an API issue, a server issue, or a database issue. You get all of this covered, which gives you the most confidence.

Why Detox?

We discussed the benefit of end-to-end testing to begin with and its value in providing the most confidence when deploying new features or fixing issues. But why Detox in particular? At the time of writing, it’s the most popular library for end-to-end testing in React Native and the one that has the most active community. On top of that, it’s the one React Native recommends in its documentation.

The Detox testing philosophy is “gray-box testing”. Gray-box testing is testing where the framework knows about the internals of the product it’s testing.In other words, it knows it’s in React Native and knows how to start up the application as a child of the Detox process and how to reload it if needed after each test. So each test result is independent of the others.

Prerequisites

macOS High Sierra 10.13 or above
Xcode 10.1 or above

Homebrew:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Node 8.3.0 or above:

brew update && brew install node

Apple Simulator Utilities: brew tap wix/brew and brew install applesimutils

Detox CLI 10.0.7 or above:

npm install -g detox-cli

See the Result in Action

First, let’s clone a very interesting open-source React Native project for the sake of learning, then add Detox to it:

git clone https://github.com/ahmedam55/movie-swiper-detox-testing.git
cd movie-swiper-detox-testing
npm install
react-native run-ios

Create an account on The Movie DB website to be able to test all the application scenarios. Then add your username and password in .env file with usernamePlaceholder and passwordPlaceholder respectively:

isTesting=true
username=usernamePlaceholder
password=passwordPlaceholder

After that, you can now run the tests:

detox test

Note that I had to fork this repo from the original one as there were a lot of breaking changes between detox-cli, detox, and the project libraries. Use the following steps as a basis for what to do:

Migrate it completely to latest React Native project.
Update all the libraries to fix issues faced by Detox when testing.
Toggle animations and infinite timers if the environment is testing.
Add the test suite package.

Setup for New Projects
Add Detox to Our Dependencies

Go to your project’s root directory and add Detox:

npm install detox –save-dev

Configure Detox

Open the package.json file and add the following right after the project name config. Be sure to replace movieSwiper in the iOS config with the name of your app. Here we’re telling Detox where to find the binary app and the command to build it. (This is optional. We can always execute react-native run-ios instead.) Also choose which type of simulator: ios.simulator, ios.none, android.emulator, or android.attached. And choose which device to test on:

{
"name": "movie-swiper-detox-testing",

// add these:
"detox": {
"configurations": {
"ios.sim.debug": {
"binaryPath": "ios/build/movieSwiper/Build/Products/Debug-iphonesimulator/movieSwiper.app",
"build": "xcodebuild -project ios/movieSwiper.xcodeproj -scheme movieSwiper -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build",
"type": "ios.simulator",
"name": "iPhone 7 Plus"
}
}
}
}

Here’s a breakdown of what the config above does:

Execute react-native run-ios to create the binary app.
Search for the binary app at the root of the project: find . -name "*.app".
Put the result in the build directory.

Before firing up the test suite, make sure the device name you specified is available (for example, iPhone 7). You can do that from the terminal by executing the following:

xcrun simctl list

Here’s what it looks like:

device-list

Now that weve added Detox to our project and told it which simulator to start the application with, we need a test runner to manage the assertions and the reporting—whether it’s on the terminal or otherwise.

Detox supports both Jest and Mocha. We’ll go with Jest, as it has bigger community and bigger feature set. In addition to that, it supports parallel test execution, which could be handy to speed up the end-to-end tests as they grow in number.

Adding Jest to Dev Dependencies

Execute the following to install Jest:

npm install jest jest-cli –save-dev

The post React Native End-to-end Testing and Automation with Detox appeared first on SitePoint.