Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Introduce development mode option #120

Merged
merged 1 commit into from
Jun 24, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions vendor/ember-cli-qunit/qunit-configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
QUnit.config.urlConfig.push({ id: 'nocontainer', label: 'Hide container'});
QUnit.config.urlConfig.push({ id: 'nolint', label: 'Disable Linting'});
QUnit.config.urlConfig.push({ id: 'dockcontainer', label: 'Dock container'});
QUnit.config.testTimeout = 60000; //Default Test Timeout 60 Seconds
QUnit.config.urlConfig.push({ id: 'devmode', label: 'Development mode' });

QUnit.config.testTimeout = QUnit.urlParams.devmode ? null : 60000; //Default Test Timeout 60 Seconds

if (QUnit.notifications) {
QUnit.notifications({
Expand All @@ -18,8 +20,15 @@ jQuery(document).ready(function() {
var testContainer = document.getElementById('ember-testing-container');
if (!testContainer) { return; }

var containerVisibility = QUnit.urlParams.nocontainer ? 'hidden' : 'visible';
var containerPosition = QUnit.urlParams.dockcontainer ? 'absolute' : 'relative';
var params = QUnit.urlParams;

var containerVisibility = params.nocontainer ? 'hidden' : 'visible';
var containerPosition = (params.dockcontainer || params.devmode) ? 'absolute' : 'relative';

if (params.devmode) {
testContainer.className = ' full-screen';
}

testContainer.style.visibility = containerVisibility;
testContainer.style.position = containerPosition;
});
20 changes: 19 additions & 1 deletion vendor/ember-cli-qunit/test-container-styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,24 @@
border: 1px solid #ccc;
margin: 0 auto;
}

#ember-testing-container.full-screen {
width: 100%;
height: 100%;
overflow: auto;
z-index: 9999;
border: none;
}

#ember-testing {
zoom: 50%;
width: 200%;
height: 100%;
transform: scale(0.5);
transform-origin: top left;
}

.full-screen #ember-testing {
position: absolute;
width: 100%;
transform: scale(1);
}