www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit a7820b12ff21ca8d608f75cb0fbf67c008da7b0a
parent b9bd88764c603a8a89e7b1e0804ec80cfa20de92
Author: Emily Eisenberg <emily@khanacademy.org>
Date:   Tue, 11 Mar 2014 16:29:45 -0600

Add huxley screenshot tests

Summary:
Add in a testing page, which just renders the location hash in the body. Use
this to make some screenshot tests in huxley. Note, these screenshots were made
in Firefox on a Linux computer, so running the tests somewhere else might
produce something else.

Test Plan:
- Serve KaTeX (`make serve`)
- Run a Selenium Server (I used selenium 2.40.0)
- Run `huxley` from the test/huxley/ directory
- Ensure that all of the tests pass

Reviewers: alpert

Reviewed By: alpert

Differential Revision: http://phabricator.khanacademy.org/D7258

Diffstat:
M.gitignore | 1+
Atest/huxley/Baseline.huxley/record.json | 1+
Atest/huxley/Baseline.huxley/screenshot0.png | 0
Atest/huxley/BasicTest.huxley/record.json | 1+
Atest/huxley/BasicTest.huxley/screenshot0.png | 0
Atest/huxley/Colors.huxley/record.json | 1+
Atest/huxley/Colors.huxley/screenshot0.png | 0
Atest/huxley/Exponents.huxley/record.json | 1+
Atest/huxley/Exponents.huxley/screenshot0.png | 0
Atest/huxley/FractionTest.huxley/record.json | 1+
Atest/huxley/FractionTest.huxley/screenshot0.png | 0
Atest/huxley/Functions.huxley/record.json | 1+
Atest/huxley/Functions.huxley/screenshot0.png | 0
Atest/huxley/GreekLetters.huxley/record.json | 1+
Atest/huxley/GreekLetters.huxley/screenshot0.png | 0
Atest/huxley/Huxleyfile | 33+++++++++++++++++++++++++++++++++
Atest/huxley/KaTeX.huxley/record.json | 1+
Atest/huxley/KaTeX.huxley/screenshot0.png | 0
Atest/huxley/Lap.huxley/record.json | 1+
Atest/huxley/Lap.huxley/screenshot0.png | 0
Atest/huxley/NestedFractions.huxley/record.json | 1+
Atest/huxley/NestedFractions.huxley/screenshot0.png | 0
Atest/huxley/Spacing.huxley/record.json | 1+
Atest/huxley/Spacing.huxley/screenshot0.png | 0
Atest/huxley/test.html | 22++++++++++++++++++++++
25 files changed, 67 insertions(+), 0 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -1,2 +1,3 @@ build node_modules +last.png diff --git a/test/huxley/Baseline.huxley/record.json b/test/huxley/Baseline.huxley/record.json @@ -0,0 +1 @@ +{"py/object": "huxley.run.Test", "screen_size": {"py/tuple": [1024, 768]}, "steps": [{"py/object": "huxley.steps.ScreenshotTestStep", "index": 0, "offset_time": 0}]} diff --git a/test/huxley/Baseline.huxley/screenshot0.png b/test/huxley/Baseline.huxley/screenshot0.png Binary files differ. diff --git a/test/huxley/BasicTest.huxley/record.json b/test/huxley/BasicTest.huxley/record.json @@ -0,0 +1 @@ +{"py/object": "huxley.run.Test", "screen_size": {"py/tuple": [1024, 768]}, "steps": [{"py/object": "huxley.steps.ScreenshotTestStep", "index": 0, "offset_time": 0}]} diff --git a/test/huxley/BasicTest.huxley/screenshot0.png b/test/huxley/BasicTest.huxley/screenshot0.png Binary files differ. diff --git a/test/huxley/Colors.huxley/record.json b/test/huxley/Colors.huxley/record.json @@ -0,0 +1 @@ +{"py/object": "huxley.run.Test", "screen_size": {"py/tuple": [1024, 768]}, "steps": [{"py/object": "huxley.steps.ScreenshotTestStep", "index": 0, "offset_time": 0}]} diff --git a/test/huxley/Colors.huxley/screenshot0.png b/test/huxley/Colors.huxley/screenshot0.png Binary files differ. diff --git a/test/huxley/Exponents.huxley/record.json b/test/huxley/Exponents.huxley/record.json @@ -0,0 +1 @@ +{"py/object": "huxley.run.Test", "screen_size": {"py/tuple": [1024, 768]}, "steps": [{"py/object": "huxley.steps.ScreenshotTestStep", "index": 0, "offset_time": 0}]} diff --git a/test/huxley/Exponents.huxley/screenshot0.png b/test/huxley/Exponents.huxley/screenshot0.png Binary files differ. diff --git a/test/huxley/FractionTest.huxley/record.json b/test/huxley/FractionTest.huxley/record.json @@ -0,0 +1 @@ +{"py/object": "huxley.run.Test", "screen_size": {"py/tuple": [1024, 768]}, "steps": [{"py/object": "huxley.steps.ScreenshotTestStep", "index": 0, "offset_time": 0}]} diff --git a/test/huxley/FractionTest.huxley/screenshot0.png b/test/huxley/FractionTest.huxley/screenshot0.png Binary files differ. diff --git a/test/huxley/Functions.huxley/record.json b/test/huxley/Functions.huxley/record.json @@ -0,0 +1 @@ +{"py/object": "huxley.run.Test", "screen_size": {"py/tuple": [1024, 768]}, "steps": [{"py/object": "huxley.steps.ScreenshotTestStep", "index": 0, "offset_time": 0}]} diff --git a/test/huxley/Functions.huxley/screenshot0.png b/test/huxley/Functions.huxley/screenshot0.png Binary files differ. diff --git a/test/huxley/GreekLetters.huxley/record.json b/test/huxley/GreekLetters.huxley/record.json @@ -0,0 +1 @@ +{"py/object": "huxley.run.Test", "screen_size": {"py/tuple": [1024, 768]}, "steps": [{"py/object": "huxley.steps.ScreenshotTestStep", "index": 0, "offset_time": 0}]} diff --git a/test/huxley/GreekLetters.huxley/screenshot0.png b/test/huxley/GreekLetters.huxley/screenshot0.png Binary files differ. diff --git a/test/huxley/Huxleyfile b/test/huxley/Huxleyfile @@ -0,0 +1,32 @@ +[BasicTest] +url=http://localhost:7936/test/huxley/test.html#a + +[FractionTest] +url=http://localhost:7936/test/huxley/test.html#\dfrac{a}{b}\frac{a}{b}\tfrac{a}{b} + +[NestedFractions] +url=http://localhost:7936/test/huxley/test.html#\dfrac{\frac{a}{b}}{\frac{c}{d}}\dfrac{\dfrac{a}{b}}{\dfrac{c}{d}}\frac{\frac{a}{b}}{\frac{c}{d}} + +[Exponents] +url=http://localhost:7936/test/huxley/test.html#a^{a^a_a}_{a^a_a} + +[Colors] +url=http://localhost:7936/test/huxley/test.html#\blue{a}\green{b}\red{c} + +[GreekLetters] +url=http://localhost:7936/test/huxley/test.html#\alpha\beta\gamma\omega + +[Baseline] +url=http://localhost:7936/test/huxley/test.html#a+b-c\cdot d/e + +[Spacing] +url=http://localhost:7936/test/huxley/test.html#[-1][1-1]1=1(=1)\lvert a\rvert + +[Functions] +url=http://localhost:7936/test/huxley/test.html#\sin\cos\tan\ln\log + +[Lap] +url=http://localhost:7936/test/huxley/test.html#ab\llap{f}cd\rlap{g}h + +[KaTeX] +url=http://localhost:7936/test/huxley/test.html#\KaTeX +\ No newline at end of file diff --git a/test/huxley/KaTeX.huxley/record.json b/test/huxley/KaTeX.huxley/record.json @@ -0,0 +1 @@ +{"py/object": "huxley.run.Test", "screen_size": {"py/tuple": [1024, 768]}, "steps": [{"py/object": "huxley.steps.ScreenshotTestStep", "index": 0, "offset_time": 0}]} diff --git a/test/huxley/KaTeX.huxley/screenshot0.png b/test/huxley/KaTeX.huxley/screenshot0.png Binary files differ. diff --git a/test/huxley/Lap.huxley/record.json b/test/huxley/Lap.huxley/record.json @@ -0,0 +1 @@ +{"py/object": "huxley.run.Test", "screen_size": {"py/tuple": [1024, 768]}, "steps": [{"py/object": "huxley.steps.ScreenshotTestStep", "index": 0, "offset_time": 0}]} diff --git a/test/huxley/Lap.huxley/screenshot0.png b/test/huxley/Lap.huxley/screenshot0.png Binary files differ. diff --git a/test/huxley/NestedFractions.huxley/record.json b/test/huxley/NestedFractions.huxley/record.json @@ -0,0 +1 @@ +{"py/object": "huxley.run.Test", "screen_size": {"py/tuple": [1024, 768]}, "steps": [{"py/object": "huxley.steps.ScreenshotTestStep", "index": 0, "offset_time": 0}]} diff --git a/test/huxley/NestedFractions.huxley/screenshot0.png b/test/huxley/NestedFractions.huxley/screenshot0.png Binary files differ. diff --git a/test/huxley/Spacing.huxley/record.json b/test/huxley/Spacing.huxley/record.json @@ -0,0 +1 @@ +{"py/object": "huxley.run.Test", "screen_size": {"py/tuple": [1024, 768]}, "steps": [{"py/object": "huxley.steps.ScreenshotTestStep", "index": 0, "offset_time": 0}]} diff --git a/test/huxley/Spacing.huxley/screenshot0.png b/test/huxley/Spacing.huxley/screenshot0.png Binary files differ. diff --git a/test/huxley/test.html b/test/huxley/test.html @@ -0,0 +1,22 @@ +<!doctype html> +<html> + <head> + <title>Huxley test</title> + <script src="/katex.js" type="text/javascript"></script> + <link href="/fonts/fonts.css" rel="stylesheet" type="text/css"> + <link href="/katex.less.css" rel="stylesheet" type="text/css"> + <style type="text/css"> + #math { + font-size: 4em; + } + </style> + </head> + <body> + <div id="math"></div> + <script type="text/javascript"> + var hash = window.location.hash.slice(1); + var mathNode = document.getElementById("math"); + katex.process(hash, mathNode); + </script> + </body> +</html>