Skip to content

Commit 6fce941

Browse files
committed
make FF and IE happy in tests
1 parent b5e983f commit 6fce941

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/lib/core/overlay/position/connected-position-strategy.spec.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ describe('ConnectedPositionStrategy', () => {
430430
}
431431
});
432432

433-
describe('onPositionChange with scrollable view properties', () => {
433+
fdescribe('onPositionChange with scrollable view properties', () => {
434434
let overlayElement: HTMLElement;
435435
let strategy: ConnectedPositionStrategy;
436436

@@ -447,9 +447,7 @@ describe('ConnectedPositionStrategy', () => {
447447
overlayContainerElement.appendChild(overlayElement);
448448

449449
// Set up the origin
450-
let originElement = createPositionedBlockElement();
451-
originElement.style.top = '0';
452-
originElement.style.left = '0';
450+
let originElement = createBlockElement();
453451
originElement.style.margin = '0 1000px 1000px 0'; // Added so that the container scrolls
454452

455453
// Create a scrollable container and put the origin inside
@@ -534,10 +532,16 @@ describe('ConnectedPositionStrategy', () => {
534532

535533
/** Creates an absolutely positioned, display: block element with a default size. */
536534
function createPositionedBlockElement() {
537-
let element = document.createElement('div');
535+
let element = createBlockElement();
538536
element.style.position = 'absolute';
539537
element.style.top = '0';
540538
element.style.left = '0';
539+
return element;
540+
}
541+
542+
/** Creates a block element with a default size. */
543+
function createBlockElement() {
544+
let element = document.createElement('div');
541545
element.style.width = `${DEFAULT_WIDTH}px`;
542546
element.style.height = `${DEFAULT_HEIGHT}px`;
543547
element.style.backgroundColor = 'rebeccapurple';

test/karma.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export function config(config) {
8484
browserDisconnectTimeout: 20000,
8585
browserNoActivityTimeout: 240000,
8686
captureTimeout: 120000,
87-
browsers: ['Chrome_1024x768'],
87+
browsers: ['Firefox'],
8888

8989
singleRun: false
9090
});

0 commit comments

Comments
 (0)