Commit e7aed050 authored by JC Brand's avatar JC Brand

Move test pages into the tests folder

parent 9c3e9233
......@@ -218,7 +218,7 @@ eslint: stamp-npm
.PHONY: check
check: eslint
LOG_CR_VERBOSITY=INFO $(CHROMIUM) --no-sandbox http://localhost:$(HTTPSERVE_PORT)/tests.html
LOG_CR_VERBOSITY=INFO $(CHROMIUM) --no-sandbox http://localhost:$(HTTPSERVE_PORT)/tests/index.html
########################################################################
## Documentation
......
......@@ -4,15 +4,15 @@
<head>
<title>Converse.js Tests</title>
<meta name="description" content="Converse.js: A chat client for your website" />
<link rel="shortcut icon" type="image/png" href="node_modules/jasmine-core/images/jasmine_favicon.png">
<link rel="shortcut icon" type="image/png" href="../node_modules/jasmine-core/images/jasmine_favicon.png">
<link rel="stylesheet" type="text/css" media="screen" href="node_modules/jasmine-core/lib/jasmine-core/jasmine.css">
<link rel="stylesheet" type="text/css" media="screen" href="css/jasmine.css">
<link type="text/css" rel="stylesheet" media="screen" href="css/theme.css" />
<link type="text/css" rel="stylesheet" media="screen" href="css/converse.css" />
<link rel="stylesheet" type="text/css" media="screen" href="../node_modules/jasmine-core/lib/jasmine-core/jasmine.css">
<link rel="stylesheet" type="text/css" media="screen" href="../css/jasmine.css">
<link type="text/css" rel="stylesheet" media="screen" href="../css/theme.css" />
<link type="text/css" rel="stylesheet" media="screen" href="../css/converse.css" />
<script src="src/config.js"></script>
<script data-main="tests/runner" src="node_modules/requirejs/require.js"></script>
<script src="../src/config.js"></script>
<script data-main="runner" src="../node_modules/requirejs/require.js"></script>
<style>
.tests-brand-heading {
......
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Converse.js Tests</title>
<meta name="description" content="Converse.js: A chat client for your website" />
<link rel="shortcut icon" type="image/png" href="../node_modules/jasmine-core/images/jasmine_favicon.png">
<link rel="stylesheet" type="text/css" media="screen" href="../node_modules/jasmine-core/lib/jasmine-core/jasmine.css">
<link type="text/css" rel="stylesheet" media="screen" href="../css/inverse.css" />
<script src="../src/config.js"></script>
<script type="text/javascript">config.view_mode = 'fullscreen';</script>
<script data-main="runner" src="../node_modules/requirejs/require.js"></script>
</head>
<body></body>
</html>
......@@ -6,6 +6,9 @@
var Strophe = converse.env.Strophe;
var $iq = converse.env.$iq;
var mock = {};
mock.view_mode = 'overlayed';
// Names from http://www.fakenamegenerator.com/
mock.req_names = [
'Louw Spekman', 'Mohamad Stet', 'Dominik Beyer'
......@@ -110,6 +113,7 @@
'no_trimming': true,
'auto_login': true,
'jid': 'dummy@localhost',
'view_mode': mock.view_mode,
'password': 'secret',
'debug': false
}, settings || {}));
......
/*global config */
// Extra test dependencies
config.baseUrl = '../';
config.paths.jquery = "node_modules/jquery/dist/jquery";
config.paths.mock = "tests/mock";
config.paths['wait-until-promise'] = "node_modules/wait-until-promise/index";
......
/*global config */
// Extra test dependencies
config.baseUrl = '../';
config.paths.jquery = "node_modules/jquery/dist/jquery";
config.paths.mock = "tests/mock";
config.paths['wait-until-promise'] = "node_modules/wait-until-promise/index";
......@@ -58,6 +59,10 @@ var specs = [
require(['console-reporter', 'mock', 'sinon', 'wait-until-promise', 'pluggable'],
function(ConsoleReporter, mock, sinon, waitUntilPromise, pluggable) {
if (config.view_mode) {
mock.view_mode = config.view_mode;
}
window.sinon = sinon;
window.waitUntilPromise = waitUntilPromise.default;
window.localStorage.clear();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment