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

chore(web): conversion of Web's browser-integration auto-tests for @web/test-runner use 🏃 #11455

Merged
merged 14 commits into from
May 23, 2024
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
26 changes: 0 additions & 26 deletions web/src/test/auto/dom/CI.conf.cjs

This file was deleted.

131 changes: 0 additions & 131 deletions web/src/test/auto/dom/base.conf.cjs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import {
eventOutputTarget,
outputTargetForElement,
PageContextAttachment
} from '/@keymanapp/keyman/build/engine/attachment/lib/index.mjs';
} from 'keyman/engine/attachment';

import { timedPromise } from '/@keymanapp/web-utils/build/lib/index.mjs';
import sinon from '/node_modules/sinon/pkg/sinon-esm.js';
import { timedPromise } from '@keymanapp/web-utils';
import sinon from 'sinon';

import { assert } from '/node_modules/chai/chai.js';
import { assert } from 'chai';

let STANDARD_OPTIONS = {
owner: null,
Expand Down Expand Up @@ -41,12 +41,9 @@ function promiseForIframeLoad(iframe) {
}

describe('outputTargetForElement()', function () {
this.timeout(__karma__.config.args.find((arg) => arg.type == "timeouts").standard);
this.timeout(5000);

before(async function() {
fixture.setBase('fixtures');
fixture.load("a-bit-of-everything.html");

const attacher = this.attacher = new PageContextAttachment(window.document, STANDARD_OPTIONS);

const iframe = document.getElementById('iframe');
Expand All @@ -58,7 +55,6 @@ describe('outputTargetForElement()', function () {
});

after(function() {
fixture.cleanup();
this.attacher?.shutdown();
this.attacher = null;
});
Expand Down Expand Up @@ -143,12 +139,9 @@ describe('outputTargetForElement()', function () {
});

describe('eventOutputTarget()', function () {
this.timeout(__karma__.config.args.find((arg) => arg.type == "timeouts").standard);
this.timeout(5000);

before(async function() {
fixture.setBase('fixtures');
fixture.load("a-bit-of-everything.html");

const attacher = this.attacher = new PageContextAttachment(window.document, STANDARD_OPTIONS);

const iframe = document.getElementById('iframe');
Expand All @@ -159,7 +152,6 @@ describe('eventOutputTarget()', function () {
});

after(function() {
fixture.cleanup();
this.attacher?.shutdown();
this.attacher = null;
});
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<html>
<head>
<script type="module">
import { runTests } from '@web/test-runner-mocha';

runTests(async() => {
await import('./outputTargetForElement.def.ts');
});
</script>
</head>
<body>
<div>Iframe: <iframe id="iframe" style="height: 100px" src="/resources/html/iframe.html"></iframe>
<div>Design Iframe: <iframe id="design-iframe" style="height: 100px" src="/resources/html/designIframe.html"></iframe>
<div>Content-editable div: <div id="editable" contenteditable="true" style="width: 500px">Edit me!</div></div>
<div>Input: <input id="input"/></div>
<div>Textarea: <textarea id="textarea"></textarea></div>
</body>
</html>
Loading
Loading