Skip to content

Commit

Permalink
Merge pull request #817 from drewlee/master
Browse files Browse the repository at this point in the history
  • Loading branch information
rwjblue authored Feb 18, 2021
2 parents 70c02bc + 72b3995 commit e9658d6
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 27 deletions.
15 changes: 0 additions & 15 deletions addon-test-support/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ export function setupApplicationTest(hooks, _options) {
Uses current URL configuration to setup the test container.
* If `?nocontainer` is set, the test container will be hidden.
* If `?dockcontainer`, `?fullscreencontainer` or `?devmode` are set the test
container will be absolutely positioned.
* If `?devmode` or `?fullscreencontainer` is set, the test container will be
made full screen.
Expand All @@ -101,26 +99,13 @@ export function setupTestContainer() {
}

let params = QUnit.urlParams;

let containerVisibility = params.nocontainer ? 'hidden' : 'visible';
let containerPosition =
params.dockcontainer || params.devmode || params.fullscreencontainer
? 'fixed'
: 'relative';

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

testContainer.style.visibility = containerVisibility;
testContainer.style.position = containerPosition;

let qunitContainer = document.getElementById('qunit');
if (params.dockcontainer) {
qunitContainer.style.marginBottom = window.getComputedStyle(
testContainer
).height;
}
}

/**
Expand Down
1 change: 0 additions & 1 deletion addon-test-support/qunit-configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import * as QUnit from 'qunit';
QUnit.config.autostart = false;
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.urlConfig.push({ id: 'devmode', label: 'Development mode' });

QUnit.config.testTimeout = QUnit.urlParams.devmode ? null : 60000; //Default Test Timeout 60 Seconds
31 changes: 20 additions & 11 deletions vendor/ember-qunit/test-container-styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}

#ember-testing-container {
position: absolute;
position: fixed;

background-color: #fff;
background-image:
Expand All @@ -18,11 +18,9 @@
background-size: 20px 20px;

bottom: 0;
right: 5%;
width: 40%;
height: 35%;
max-width: 640px;
max-height: 384px;
right: 0;
width: 640px;
height: 384px;
overflow: auto;
z-index: 98;
border: 1px solid #ccc;
Expand All @@ -38,12 +36,7 @@
overflow: auto;
z-index: 98;
border: none;
max-height: none;
max-width: none;
right: 0;
left: 0;
top: 0;
bottom: 0;
}

#ember-testing {
Expand All @@ -59,3 +52,19 @@
height: 100%;
transform: scale(1);
}

#qunit-tests > li:last-child {
margin-bottom: 384px;
}

@supports (display: flex) or (display: -webkit-box) {
@media (min-height: 500px) {
#qunit-tests {
overflow: auto;
}

#ember-testing-container {
right: 30px;
}
}
}

0 comments on commit e9658d6

Please sign in to comment.