File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Javascript Atoms
2
+
3
+ These "atoms" provide reusable building blocks for browser automation
4
+ (which is why we call them "atoms"!) They're currently built with the
5
+ Google Closure Compiler, but at some point, we'd love to migrate them
6
+ to TypeScript since Closure isn't as widely known.
7
+
8
+ ## Testing the Atoms
9
+
10
+ ### Iteratively
11
+
12
+ While working on the atoms, it can be helpful to be able to iterate on
13
+ the code in your IDE of choice, and then run the tests in a
14
+ browser. You can do this by starting a debug server:
15
+
16
+ ``` shell
17
+ bazel run javascript/atoms:test_debug_server
18
+ ```
19
+
20
+ And then navigating to: http://localhost:2310/filez/selenium/javascript/atoms/
21
+
22
+ You'll be able to browse around the filesystem until you find the test
23
+ you want to work on.
24
+
25
+ These files are symlinked by bazel to the ones in the source code, so
26
+ edits you make there will be reflected in the code in the browser,
27
+ however, new files and removed files may cause you to need to restart
28
+ the ` bazel run ` command.
29
+
30
+ ### Using Bazel
31
+
32
+ You can run all the tests for a browser using:
33
+
34
+ ``` shell
35
+ bazel test //javascript/atoms:test{,-chrome,-edge,-safari}
36
+ ```
37
+
38
+ You can also filter to a specific test using the name of the file
39
+ stripped of it's ` .html ` suffix. For example:
40
+
41
+ ``` shell
42
+ bazel test --test_filter=shown_test --//common:headless=false javascript/atoms:test-chrome
43
+ ```
You can’t perform that action at this time.
0 commit comments