mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 14:49:07 +08:00
DEV: Make sure testing-container fits in the viewport (#17446)
This prevents tests failures when the browser viewport is too small.
This commit is contained in:
parent
0f3109cc53
commit
0e61f332ee
|
@ -1,9 +1,30 @@
|
|||
document.body.insertAdjacentHTML(
|
||||
"afterbegin",
|
||||
`
|
||||
<style>#ember-testing-container { position: fixed; background: white; bottom: 0; right: 0; width: 640px; height: 384px; overflow: auto; z-index: 9999; border: 1px solid #ccc; transform: translateZ(0)} #ember-testing { width: 200%; height: 200%; transform: scale(0.5); transform-origin: top left; }</style>
|
||||
<style>
|
||||
#ember-testing-container {
|
||||
position: fixed;
|
||||
background: white;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
width: 640px;
|
||||
height: 384px;
|
||||
overflow: auto;
|
||||
z-index: 9999;
|
||||
border: 1px solid #ccc;
|
||||
transform: translateZ(0);
|
||||
box-sizing: border-box;
|
||||
max-height: 100vh;
|
||||
}
|
||||
|
||||
#ember-testing {
|
||||
width: 200%;
|
||||
height: 200%;
|
||||
transform: scale(0.5);
|
||||
transform-origin: top left;
|
||||
}
|
||||
</style>
|
||||
`
|
||||
);
|
||||
|
||||
|
||||
require('discourse/tests/test-boot-ember-cli');
|
||||
|
|
|
@ -19,3 +19,8 @@ $love: #fa6c8d !default;
|
|||
@import "common/foundation/mixins";
|
||||
@import "desktop";
|
||||
@import "color_definitions";
|
||||
|
||||
#ember-testing-container {
|
||||
box-sizing: border-box;
|
||||
max-height: 100vh;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user