function firstContentfulPaint() {
  return browser.executeAsync(async (done) => {
    if (PerformanceObserver.supportedEntryTypes.includes('paint')) {
      new PerformanceObserver(() => {
        done();
      }).observe({
        type: 'paint',
        buffered: true,
      });
    } else {
      done();
    }
  });
}
Returns a promise that resolves once the browser window has painted
the first frame.
@return {Promise<void>}