@coherentglobal/wasm-runner 0.0.91 → 0.0.95

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,83 +0,0 @@
1
- import { Builder, By, until } from 'selenium-webdriver';
2
- import { Options as ChromeOptions } from 'selenium-webdriver/chrome';
3
- import { Options as FirefoxOptions } from 'selenium-webdriver/firefox';
4
- import { Options as EdgeOptions } from 'selenium-webdriver/edge';
5
- import { Options as SafariOptions } from 'selenium-webdriver/safari';
6
- import { assert } from 'chai';
7
-
8
- let driver;
9
-
10
- before(async function () {
11
- this.timeout(10000);
12
- const builder = new Builder();
13
-
14
- const chromeOptions = new ChromeOptions();
15
- chromeOptions.addArguments(
16
- '--no-sandbox',
17
- '--disable-dev-shm-usage',
18
- '--disable-gpu',
19
- '--headless',
20
- '--remote-debugging-port=9222'
21
- );
22
-
23
- switch (process.env.BROWSER) {
24
- case 'chrome':
25
- builder
26
- .forBrowser('chrome')
27
- .setChromeOptions(chromeOptions);
28
- break;
29
-
30
- case 'firefox':
31
- const firefoxOptions = new FirefoxOptions();
32
- firefoxOptions.headless();
33
- builder.forBrowser('firefox')
34
- .setFirefoxOptions(firefoxOptions);
35
- break;
36
-
37
- case 'edge':
38
- const edgeOptions = new EdgeOptions();
39
- edgeOptions.headless();
40
- builder.forBrowser('MicrosoftEdge')
41
- .setEdgeOptions(edgeOptions);
42
- break;
43
-
44
- case 'safari':
45
- builder.forBrowser('safari');
46
- break;
47
-
48
- case 'opera':
49
- const operaOptions = new ChromeOptions();
50
- operaOptions.addArguments("--headless", "--disable-gpu", "--binary=/usr/bin/opera");
51
- builder.forBrowser('chrome').setChromeOptions(operaOptions);
52
- break;
53
-
54
- default:
55
- throw new Error(`Unknown browser: ${process.env.BROWSER}`);
56
- }
57
-
58
- driver = builder.build();
59
- });
60
-
61
- after(async function () {
62
- await driver.quit();
63
- });
64
-
65
- describe('Run Initialize and Run Calc', function () {
66
- it('should run the scripts and check if "responseP" has a response', async function () {
67
- this.timeout(30000); // Increase timeout if needed
68
- await driver.get('http://localhost:5500/example/simple-html/index.html');
69
- await driver.wait(async () => {
70
- return await driver.executeScript('return typeof handleInitialization === "function" && typeof handleSubmit === "function";')
71
- }, 10000, 'Waiting for handleInitialization and handleSubmit to be defined');
72
- await driver.executeScript('handleInitialization()');
73
- // Add a delay if handleSubmit depends on the results of handleInitialization
74
- await new Promise(resolve => setTimeout(resolve, 5000)); // Wait for 5 seconds
75
- await driver.executeScript('handleSubmit()');
76
- // Wait until the responseP element contains text
77
- await driver.wait(until.elementLocated(By.id('responseP')));
78
- await driver.wait(until.elementTextMatches(await driver.findElement(By.id('responseP')), /\S+/), 10000, 'Waiting for responseP to contain text');
79
- let responseP = await driver.findElement({ id: 'responseP' });
80
- let responsePText = await responseP.getText();
81
- assert.isNotEmpty(responsePText, "responseP element doesn't contain any text");
82
- });
83
- });
@@ -1,11 +0,0 @@
1
- sonar.projectName=Wasm Runner JS
2
- sonar.projectKey=wasm-runner-js
3
- sonar.sources=src,package.json
4
- sonar.sourceEncoding=UTF-8
5
- sonar.tests=src
6
- sonar.test.inclusions=**/*.test.ts,**/*.test.tsx,**/sc-global.ts
7
- sonar.language=js
8
- sonar.javascript.coveragePlugin=lcov
9
- sonar.javascript.lcov.reportPaths=coverage/lcov.info
10
- sonar.typescript.tsconfigPath=tsconfig.json
11
- sonar.testExecutionReportPaths=reports/test-reporter.xml
package/tsconfig.json DELETED
@@ -1,29 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "module": "CommonJS",
4
- "target": "es6",
5
- "esModuleInterop": true,
6
- "allowSyntheticDefaultImports": true,
7
- "noImplicitAny": false,
8
- "moduleResolution": "node",
9
- "forceConsistentCasingInFileNames": false,
10
- "sourceMap": true,
11
- "outDir": "dist",
12
- "allowJs": true,
13
- "baseUrl": ".",
14
- "forceConsistentCasingInFileNames": false,
15
- "paths": {
16
- "*": [
17
- "node_modules/*"
18
- ]
19
- },
20
- "resolveJsonModule": true,
21
- "skipLibCheck": true
22
- },
23
- "include": [
24
- "src"
25
- ],
26
- "exclude": [
27
- "tests/**/*.test.ts"
28
- ]
29
- }