Migrate //scouting:scouting_test to Protractor

This framework automatically takes care of the webdriver/selenium
setup. It just lets us focus on writing tests.

This patch migrates the scouting test to use Protractor. It validates
that the application loads correctly and displays the only message
that exists so far.

I can confirm that that test uses a sandboxed version of the chromium
browser:

    $ bazel cquery 'somepath(//scouting:scouting_test, @org_chromium_chromium_linux_x64//:metadata)' 2>/dev/null
    //scouting:scouting_test (cdf6808)
    //scouting:scouting_test_chromium-local (cdf6808)
    @io_bazel_rules_webtesting//browsers:chromium-local (3ee7ec9)
    @io_bazel_rules_webtesting//third_party/chromium:chromium (3ee7ec9)
    @org_chromium_chromium_linux_x64//:metadata (3ee7ec9)

I based the test itself on the upstream example code:
https://github.com/bazelbuild/rules_nodejs/tree/stable/examples/angular/e2e/src

Signed-off-by: Philipp Schrader <philipp.schrader@gmail.com>
Change-Id: I8d24e82077af3c104d676168e52ecec89fda8004
diff --git a/scouting/scouting_test.ts b/scouting/scouting_test.ts
new file mode 100644
index 0000000..bb1c075
--- /dev/null
+++ b/scouting/scouting_test.ts
@@ -0,0 +1,32 @@
+import {browser, by, element} from 'protractor';
+
+class AppPage {
+  async navigateTo() {
+    await browser.get(browser.baseUrl);
+  }
+
+  // Wait for basically forever for these elements to appear.
+  // Bazel will manage the timeouts.
+  async waitForElement(el, timeout = 1000000) {
+    await browser.wait(() => el.isPresent(), timeout);
+    await browser.wait(() => el.isDisplayed(), timeout);
+    return el;
+  }
+
+  async getParagraphText() {
+    return (await this.waitForElement(element(by.css('h1')))).getText();
+  }
+}
+
+describe('The scouting web page', () => {
+  let page: AppPage;
+
+  beforeEach(() => {
+    page = new AppPage();
+  });
+
+  it('should display: This is an app.', async () => {
+    await page.navigateTo();
+    expect(await page.getParagraphText()).toEqual('This is an app.');
+  });
+});