froth-webdriverio-framework 1.0.27 → 1.0.28
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.
- package/config/common.mobile.conf.js +4 -5
- package/config/commonconfig.js +2 -7
- package/package.json +1 -1
- package/config/server.js +0 -31
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
const deepmerge = require('deepmerge')
|
|
2
|
+
const commonconfig = require('./commonconfig');
|
|
4
3
|
console.log("device name in common mobile:", process.env.DEVICENAME);
|
|
5
4
|
|
|
6
|
-
const commonmobconfig = all([commonconfig, {
|
|
5
|
+
const commonmobconfig = deepmerge.all([commonconfig, {
|
|
7
6
|
user: process.env.BROWSERSTACK_USERNAME || 'naveen_OSt3Pw',
|
|
8
7
|
key: process.env.BROWSERSTACK_ACCESS_KEY || 'AuzPy8cHZ7sCBmMXakKe',
|
|
9
8
|
|
|
@@ -39,4 +38,4 @@ const commonmobconfig = all([commonconfig, {
|
|
|
39
38
|
|
|
40
39
|
}]);
|
|
41
40
|
|
|
42
|
-
|
|
41
|
+
module.exports = commonmobconfig;
|
package/config/commonconfig.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
const setAllDetails = require("./setallDatailinBuffer")
|
|
2
2
|
const { LocalStorage } = require('node-localstorage');
|
|
3
3
|
global.BUFFER = new LocalStorage('./storage');
|
|
4
|
-
import server from './server';
|
|
5
4
|
|
|
6
5
|
const getBSSessionDetails = require("../api/browsersatckSessionInfo")
|
|
7
6
|
console.log("device name in common :", process.env.DEVICENAME);
|
|
@@ -26,9 +25,7 @@ const commonconfig = {
|
|
|
26
25
|
|
|
27
26
|
before: function (capabilities, specs) {
|
|
28
27
|
|
|
29
|
-
|
|
30
|
-
console.log('Test server started on port 8000');
|
|
31
|
-
});
|
|
28
|
+
|
|
32
29
|
|
|
33
30
|
// Code to run before the test suite starts
|
|
34
31
|
console.log('Starting test suite IN EBFORE HOOK ...');
|
|
@@ -121,9 +118,7 @@ const commonconfig = {
|
|
|
121
118
|
// console.log(capabilities);
|
|
122
119
|
// console.log('Specs:');
|
|
123
120
|
// console.log(specs);
|
|
124
|
-
|
|
125
|
-
console.log('Test server stopped');
|
|
126
|
-
});
|
|
121
|
+
|
|
127
122
|
},
|
|
128
123
|
|
|
129
124
|
};
|
package/package.json
CHANGED
package/config/server.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { createServer } from 'http';
|
|
2
|
-
import { Server } from 'ws';
|
|
3
|
-
|
|
4
|
-
// Create an HTTP server
|
|
5
|
-
const server = createServer((req, res) => {
|
|
6
|
-
res.writeHead(200, { 'Content-Type': 'text/plain' });
|
|
7
|
-
res.end('okay');
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
// Set maxHeaderSize and maxHeadersCount
|
|
11
|
-
server.maxHeaderSize = 8192; // Set maximum header size to 8192 bytes (8 KB)
|
|
12
|
-
server.maxHeadersCount = 0; // No limit on the number of headers
|
|
13
|
-
|
|
14
|
-
// Create a WebSocket server attached to the HTTP server
|
|
15
|
-
const wss = new Server({ server });
|
|
16
|
-
|
|
17
|
-
wss.on('connection', (ws) => {
|
|
18
|
-
ws.on('message', (message) => {
|
|
19
|
-
console.log(`Received message: ${message}`);
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
ws.send('Hello! You are connected.');
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
// Start the server
|
|
26
|
-
const PORT = process.env.PORT || 8000;
|
|
27
|
-
server.listen(PORT, () => {
|
|
28
|
-
console.log(`Server is listening on port ${PORT}`);
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
export default server;
|