Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix Safari errors in CI #440

Merged
merged 2 commits into from
Feb 26, 2020
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
8 changes: 6 additions & 2 deletions test/router/parent-layouts.spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,9 @@
it('should throw not found when neither children nor siblings match', async() => {
// Ensure outlet is clean
const childNodes = Array.from(outlet.childNodes);
outlet.textContent = '';
while (outlet.childNodes.length) {
outlet.removeChild(outlet.lastChild);
}

router.setRoutes([
{path: '/a', component: 'x-a', children: [
Expand All @@ -269,7 +271,9 @@
expect(error.message).to.match(/page not found/i);

// Restore previous outlet content
outlet.textContent = '';
while (outlet.childNodes.length) {
outlet.removeChild(outlet.lastChild);
}
childNodes.forEach(childNode => outlet.appendChild(childNode));
});

Expand Down
2 changes: 1 addition & 1 deletion test/test-pushstate-throttler.html
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,14 @@
return new Promise((resolve, reject) => {
if (runnerWindow.pushStateCount > 85 || force) {
const cooldownPeriod = 30 * 1000;
test.timeout(cooldownPeriod + 5000);
const cooldownMessage = this.$['safari-cooldown'];
cooldownMessage.removeAttribute('hidden');
setTimeout(() => {
cooldownMessage.setAttribute('hidden', 'hidden');
runnerWindow.pushStateCount = 0;
resolve();
}, cooldownPeriod);
test.timeout(cooldownPeriod + 5000);
} else {
resolve();
}
Expand Down