Skip to content

Commit

Permalink
🏗 Allow IE integration tests to block the build (#30397)
Browse files Browse the repository at this point in the history
* Let IE integration tests block the build

* clean up unused helpers

* add dev assert around createFixtureIframe height
  • Loading branch information
rcebulko committed Sep 25, 2020
1 parent 5eca78c commit be0bf7c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 1 addition & 4 deletions build-system/pr-check/cross-browser-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,10 @@ const {
startTimer,
stopTimer,
timedExecOrDie: timedExecOrDieBase,
timedExec: timedExecBase,
} = require('./utils');

const FILENAME = 'cross-browser-tests.js';
const timedExecOrDie = (cmd) => timedExecOrDieBase(cmd, FILENAME);
const timedExec = (cmd) => timedExecBase(cmd, FILENAME);

async function main() {
const startTime = startTimer(FILENAME, FILENAME);
Expand All @@ -54,8 +52,7 @@ async function main() {
case 'win32':
timedExecOrDie('gulp unit --nobuild --headless --edge');
timedExecOrDie('gulp integration --nobuild --compiled --headless --edge');
// TODO(rsimha): Fix all IE tests and make this task fail the build.
timedExec('gulp integration --nobuild --compiled --ie');
timedExecOrDie('gulp integration --nobuild --compiled --ie');
break;
default:
log(
Expand Down
5 changes: 5 additions & 0 deletions testing/iframe.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {Services} from '../src/services';
import {cssText as ampDocCss} from '../build/ampdoc.css';
import {cssText as ampSharedCss} from '../build/ampshared.css';
import {deserializeMessage, isAmpMessage} from '../src/3p-frame-messaging';
import {dev} from '../src/log';
import {
installAmpdocServices,
installRuntimeServices,
Expand Down Expand Up @@ -65,6 +66,10 @@ export function createFixtureIframe(
initialIframeHeight,
opt_beforeLoad
) {
dev().assertNumber(
initialIframeHeight,
'Attempted to create fixture iframe with non-numeric height'
);
return new Promise((resolve, reject) => {
// Counts the supported custom events.
const events = {
Expand Down

0 comments on commit be0bf7c

Please sign in to comment.