- 28 Apr, 2016 1 commit
-
-
Robert Knight authored
Previously the live reload server at http://localhost:3000 hardcoded the embed script to 'http://localhost:5000' which would cause the embed to fail to load if accessing the live reload server via a different IP. This happens when accessing the server through a VirtualBox Guest when using the default networking settings or when accessing it from a say, a mobile device on the same WiFi network as a laptop serving the dev environment. Instead use the same hostname for the live reload WebSocket server and embed script as the client test page is served from.
-
- 27 Apr, 2016 2 commits
-
-
Nick Stenning authored
Update front-end testing dependencies to current versions and switch to mocha reporter
-
Nick Stenning authored
Fix a couple of slow front-end tests and enable slow test reporting
-
- 26 Apr, 2016 6 commits
-
-
Robert Knight authored
This should help to catch slow tests in development before they become flakey failures on Travis.
-
Robert Knight authored
* Avoid `assert.includes()` in Bridge test, since this does a deep equality comparison which is much more expensive than necessary (50-60ms to execute on a desktop system with no contention. I think this might explain the very occassional failure seen on Travis). * Use the correct name for the `retries` option in a retryPromiseOperation() test. This test should have failed but because the min timeout value was set so low, the test was taking < 2 seconds to run even though it was retrying 10 times with an expontentially increasing timeout.
-
Robert Knight authored
-
Robert Knight authored
When running tests in `gulp watch` mode, the initial run passed but subsequent changes resulted in an error in the `merge-descriptors` package, related to PhantomJS. I haven't looked deeply into the problem but it does look like a familiar issue related to Proxyquire trying to 'call through' to the original imports in the module. Adding the '@noCallThru' flag in guest-test.coffee resolves the issue.
-
Robert Knight authored
This produces more helpful output when test assertions involving deep equality checks fail. See https://www.npmjs.com/package/karma-mocha-reporter#showdiff This requires karma-mocha >= v0.2.2
-
Robert Knight authored
Update test and development dependencies to latest versions from npm, except for PhantomJS. The PhantomJS 1.9.x -> 2.x transition requires additional changes in tests. A couple of issues came up during the upgrade: - 'constructor' is no longer a valid name for describe() blocks - The require() in Karma's Browserify config ended up being resolved relative to the location of karma.config.js for reasons I haven't debugged, instead of looking in node_modules/. Using require.resolve() to get the absolute path works around the issue.
-
- 23 Apr, 2016 2 commits
-
-
Nick Stenning authored
Return all canonical uris when expanding a canonical uri
-
Nick Stenning authored
[Update annotations in Pg 1/3]: Fix reply template for postgres
-
- 22 Apr, 2016 2 commits
-
-
Lena authored
* Changes to html.
-
Sheetal Umesh Kumar authored
Clear pending timeouts when AppController is destroyed
-
- 21 Apr, 2016 2 commits
-
-
Robert Knight authored
Fix a flaky AppController test and potential causes of flakyness or runtime errors in other tests due to timeouts set up in directives or controllers firing after the associated scope is destroyed. Add a helper which sets a timeout that is cleared automatically when an associated scope is destroyed. In the AppController test this manifested itself with a timeout being called when `$document[0]` was not set.
-
Robert Knight authored
Fix Hypothesis on local HTML documents
-
- 20 Apr, 2016 14 commits
-
-
Sean Hammond authored
Markdown rendering refactor and math sanitization fixes
-
Christof Dorner authored
Fix an off-by-one error in PDF anchoring code
-
Robert Knight authored
KaTeX escapes its own input and we trust it to generate safe HTML as output. Passing HTML generated by KaTeX through ngSanitize can mangle the result. eg. The formatting of the infinity symbol is corrupted when using this test block for example: $$\lim_{x \to \infty} \exp(-x) = 0$$ This commit rewrites the rendering logic to only sanitize the markdown output from Showdown. This additionally fixes an issue where text that _happened_ to also be valid markdown in the rendered math would be rendered as markdown, which is not what we want.
-
Robert Knight authored
-
Robert Knight authored
-
Robert Knight authored
Create a single instance on the first call and cache it afterwards.
-
Robert Knight authored
- Add a test that input markdown is sanitized with ngSanitize - Add a test that verifies that malformed HTML is tolerated. Angular 1.5.x no longer throws an exception when the input HTML is malformed. This adds a test to catch any potential changes in future and document the expected behavior. Fixes #2970 Fixes #2935
-
Robert Knight authored
Make it easier to verify that rendered content is sanitized correctly by feeding the final HTML string to $sanitize once, instead of trying to sanitize pieces individually.
-
Robert Knight authored
In the process, this fixes a bug with the previous implementation where inline math was rendered if it started or ended with either '\(' or '\)'. The new implementation requires that inline math blocks start with only '\(' and must have a matching '\)'
-
Robert Knight authored
-
Robert Knight authored
This logic has now been moved to render-markdown.js
-
Robert Knight authored
Extract markdown and math rendering out of the editor component into a separate module and add tests.
-
Nick Stenning authored
The PDF anchoring code systematically failed to anchor annotations made at the very start of a PDF page, due to an off-by-one error in determining the page associated with a given text offset. Fixes #2418.
-
Nick Stenning authored
The only thing stopping Hypothesis from working on local (i.e. file:// URL) HTML documents is the failure of the discovery module due to quirks in the `postMessage` security policy. This commit works around that issue so that embedding or injecting Hypothesis on local HTML documents works as expected. Fixes #2005.
-
- 19 Apr, 2016 11 commits
-
-
Nick Stenning authored
CSP Violation: old homepage
-
Lena authored
Changes the space between items in the group members list. Reduces the space between documents a little, to make them a bit more balanced.
-
Nick Stenning authored
Dev install docs corrections
-
Nick Stenning authored
Scroll share dialog into view when created
-
Robert Knight authored
These dialogs appear at the top of the annotation list, scroll them into view if necessary. The 'scroll-into-view' library is used rather than Element.scrollIntoView() in order to get smooth animations that are consistent with how the document is scrolled to selected annotations. - Only write to the dialog visibility state in one place in AppController. - Scroll share and login dialogs into view when corresponding link is selected in top bar. Fixes #3043
-
Robert Knight authored
Convert the dialog to JS and modernize the style to follow current component conventions.
-
Sean Hammond authored
Remove empty annotations when a new annotation is created
-
Robert Knight authored
When a new annotation is created, remove any empty annotation cards that currently exist. This fixes an issue where it was easy to accidentally create a large number of blank annotations or empty replies. Any annotations which are not new (ie. have an ID assigned) or have tags or text entered by the user are kept. This logic applies to both annotations and replies.
-
Robert Knight authored
Merge pull request #3197 from hypothesis/sheetaluk/299-add-a-copy-to-clipboard-button-to-the-share-menu Add copy to clipboard functionality.
-
Sheetal Umesh Kumar authored
Add basic copy to clipboard functionality so user can use a button click to copy a direct link to his clipboard, when supported by the browser. * Refactor annotation share dialog into a component. * Add tests for annotation share dialog.
-
Robert Knight authored
Merge pull request #3216 from hypothesis/sheetaluk/298-add-product-version-and-environment-info-to-the-tool Show product version and environment info.
-