Commit Graph

18 Commits

Author SHA1 Message Date
Pierre Ossman 7bcdbbc65b Stop transpiling karma tests
This runs our code in the same manner as it would be used if loaded
directly in the browser. Includes the same kind of fallback for older
browsers.
2018-07-16 13:32:35 +02:00
Pierre Ossman ae2e1ff7bd Move sinon to karma framework
This frees us from manual imports, and makes things less magical
as those aren't ES modules even if the code suggest that the are.
2018-07-13 15:57:24 +02:00
Juanjo Diaz 651c23ece3 Use fat arrow functions `const foo = () => { ... };` for callbacks
and any other function that is passed around and it's not a top level function
2018-07-12 19:06:57 +02:00
Pierre Ossman 127b63b79f Stop combining test platforms
Sauce is very unstable, so spread things out so we can more easily
throttle things to more sane levels.
2018-06-01 15:26:52 +02:00
Juanjo Diaz cdb860ad84 Add transpilation for IE11 and skip linux tests 2018-05-24 00:26:34 +03:00
Andrew Webster e0750f9b2c Use localstorage only to initialize settings map
This only reads from localstorage in order to initialize the settings
map.  After initializaton, reads will return the value from the map.

When writing a value, the settings map and the local storage
are updated, unless the setting is a default value or derived from
the query string.

This has a few advantages:
 1. Saved settings will not be overridden by settings specified in
the query string.  This means a setting could be temporarily changed
using the query string, but once removed from the query string, the
setting would return back to what the user selected.
 2. Default values will not be saved.  If a user has always used
the default value for a setting, then they can move to a new version
with different defaults without clearing localstorage.
 3. Changes made to localstorage in a session running in a different
window will not affect the settings in the current window (until
the page is refreshed).

Regarding eraseSetting:

It is possible that another tab could change the value, leading
to an unexpected value change in the tab that deletes.  However,
this function is currently unused, so this will be evaluted if
and when it used.
2018-02-13 10:22:21 -05:00
Samuel Mannehed 7279364c9a Move localization.js to app
Since it is no longer used in core. Also splits localization tests into
a separate file.
2017-11-14 15:36:12 +01:00
Solly Ross b081ea7266 Fix Travis-Sauce Connection
Somethings got messed up in the Travis-Sauce tunnel setup.  This should
fix it by re-adding the Sauce credentials.  It also updates the config
to explicitly pass auth information instead of via environment
variables.
2017-06-05 13:41:31 -04:00
Solly Ross dfae3209eb Update tests to work with new structure
This updates the tests to work with the new structure, and removes the
old `utils/run_from_console.js` files in favor of just using Karma
directly.  The Karma debug page now displays the normal mocha HTML, so
we can use that instead of the HTML generation functionality of the old
test runner.

Note that PhantomJS does not work at the moment (PhantomJS 1.5 should
make it possible to test on PhantomJS again).
2017-03-21 17:39:07 -04:00
Solly Ross bd5340c7ee Move input-related files into core/input
This commit moves all the input-related files from `core/`
to `core/input/`, and renames a couple as relevant
(input.js --> input/devices.js, keyboard.js --> input/util.js).
2016-09-16 15:49:52 -04:00
Solly Ross ae510306b5 Enable noVNC to become Browserifiable
This commit restructures noVNC, splitting it into the core directory
and the app directory, with the former containing core noVNC parts,
and the latter containing parts specific to the application.
2016-09-16 15:49:51 -04:00
Daniel Henrique Barboza 99feba6ba8 QEMU RFB extension - new file xtscancodes.js
This new file contains the XT scancode mapping that
the extension will use in rfb.js file.

Signed-off-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
2016-08-26 17:06:42 -03:00
Solly Ross 6940936ffc WIP: Switch to Pako for zlib
This commit introduces an alternate implementation of the zlib
decompressor based on Pako (https://github.com/nodeca/pako).
2015-08-06 14:47:03 -04:00
Solly Ross 7e161007ab Launch Sauce Connect through Travis
This commit makes Travis launch sauce connect, instead of
using karma to start Sauce Connect
2015-02-27 17:13:33 -05:00
Solly Ross 20d3fb6665 Increase Karma-Sauce Connector Timeout
This commit increases the browserNoActivityTimeout to 100s
(from the default of 10s) in an attempt to alliviate the
timeout issues that we are seeing.
2015-02-27 13:23:09 -05:00
Solly Ross f0e4548b16 Fix Travis Sauce Tunnel Issues
Travis is failing because Sauce can't find the appropriate tunnelid.
This should fix that but setting the tunnel id to be the Travis
job number.
2014-09-19 12:56:53 -04:00
Solly Ross 2c9623b5a7 Fixed assertion collision issues
When run via karma, all the tests are loaded into the same page.
This was causing a collision in the 'displayed' assertion dealing
with using viewportLoc.

The assertions are now in their own file, pulled in by tests that
need them.  Additionally, several tests which only set fb_width
and fb_height were correct to set viewportLoc as well.

Closes #392

Also-Authored-By: Martin André (github: mandre)
2014-09-19 12:16:06 -04:00
Solly Ross e6af0f60b0 Add support for Travis CI and SauceLabs Testing
This adds support for Travis CI and SauceLabs
testing.  Testing on SauceLabs in done via
the Karma test runner.  Note that encrypted
Sauce username and access key values need
to be inserted into .travis.yml as global
environment variables.  Additionally, the
local test runner (which is still useful
for debugging tests and code) was updated
to reflect that the 'node_modules' folder
now gets placed in the root directory.
2014-09-15 16:46:02 -04:00