-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
164ac0a
commit 8ba96f1
Showing
7 changed files
with
16,242 additions
and
7,013 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" | ||
/> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge" /> | ||
<title>E2E Tests</title> | ||
<link rel="stylesheet" href="../node_modules/mocha/mocha.css" /> | ||
</head> | ||
<body> | ||
<div id="mocha"></div> | ||
<script src="../node_modules/mocha/mocha.js"></script> | ||
<script src="../dist/compiler.essential.cjs"></script> | ||
<script type="module"> | ||
mocha.setup('bdd') | ||
</script> | ||
<script type="module" src="./browser.runtime.js"></script> | ||
<script> | ||
mocha.run((failures) => { | ||
// store the failure amount into this global variable that can be accessed from our e2e environment | ||
window.testFailures = failures | ||
}) | ||
</script> | ||
<script></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { browser, expect } from '@wdio/globals' | ||
|
||
describe('Run the mocha tests', function () { | ||
it('All the mocha tests passed', async () => { | ||
await browser.url('http://localhost:3000/test/e2e.runtime.html') | ||
await browser.waitUntil(async () => | ||
browser.execute(() => typeof window.testFailures === 'number'), | ||
) | ||
const testFailures = await browser.execute(() => window.testFailures) | ||
|
||
expect(testFailures).toBe(0) | ||
expect(true).toBe(true) | ||
}) | ||
}) |
Oops, something went wrong.