froth-webdriverio-framework 2.0.3 → 2.0.5

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.
@@ -160,7 +160,7 @@ async function updateScriptExecutionStatus(frothUrl, token, scriptid, status) {
160
160
 
161
161
  console.log("URL" + url)
162
162
  // formData.append('execution_id', BUFFER.getItem("EXECUTION_ID"))
163
- formData.append('scrpit_status', status)
163
+ formData.append('script_status', status)
164
164
 
165
165
  const response = await fetch(url, {
166
166
  method: 'PUT',
@@ -4,18 +4,21 @@ const assert = require('assert');
4
4
  async function assertText(driver, elementSelector, expectedText) {
5
5
  // try {
6
6
  // Wait for the element to be visible
7
- await driver.waitUntil(async () => {
8
- const element = await driver.$(elementSelector);
9
- return await element.isDisplayed();
10
- }, { timeout: 30000 });
7
+ // await driver.waitUntil(async () => {
8
+ // const element = await driver.$(elementSelector);
9
+ // return await element.isDisplayed();
10
+ // }, { timeout: 30000 });
11
11
 
12
12
  // Get the actual text from the element
13
- const element = await driver.$(elementSelector);
14
- const actualText = await element.getText();
13
+ // const element = await driver.$(elementSelector);
14
+ // const actualText = await element.getText();
15
15
 
16
- // expect(actualText).toEqual(expectedText,`Expected title to be "${expectedText}", but found "${actualText}"`);
17
- console.log('Actual text:', actualText, 'Expected text:', expectedText);
18
- assert.strictEqual(actualText, expectedText, `Expected title to be "${expectedText}", but found "${actualText}"`);
16
+ console.log( 'Expected text:', expectedText);
17
+ //expect(await browser.getTitle()).to.be.equal('Admin Area')
18
+
19
+ await expect(elementSelector).toHaveText(expectedText)
20
+
21
+ // assert.strictEqual(actualText, expectedText, `Expected title to be "${expectedText}", but found "${actualText}"`);
19
22
 
20
23
  // // Compare the actual text with the expected text
21
24
  // if (actualText === expectedText) {
@@ -76,7 +76,7 @@ const commonconfig = {
76
76
  // BUFFER.setItem("TOTAL_DURATION", Number(BUFFER.getItem("TOTAL_DURATION")) + duration)
77
77
  console.log(`Duration: ${duration}ms`);
78
78
  console.log(`Passed: ${passed}`);
79
- let scriptresult;
79
+ let scriptresult="NOT RUN";
80
80
  let scriptid = BUFFER.getItem(fileName.replace(".js", ""))
81
81
 
82
82
  if (passed) {
@@ -148,31 +148,5 @@ async function secondsToTime(secs) {
148
148
 
149
149
  return hours + ':' + minutes + ':' + seconds;
150
150
  }
151
- // async function main() {
152
- // try {
153
- // const frothUrl = "devapi.frothtestops.com";
154
- // const username = "subhra.subudhi@roboticodigital.com";
155
- // const password = "V2VsY29tZUAxMjM=";
156
-
157
- // const token = await getLoginToken(frothUrl, username, password);
158
- // if (!token) {
159
- // throw new Error('Login failed, no token obtained');
160
- // }
161
-
162
- // const id = 208;
163
- // // const data = await getExecuitonDetails(frothUrl, token, id);
164
- // // console.log("Retrieved JSON Data:", data);
165
- // const resultdetails = {};
166
- // const resultdata="Pass";
167
- // const duration ="31355ms";
168
- // resultdetails.excution_status = resultdata === 'Pass' ? 'PASSED' : 'FAILED'
169
- // resultdetails.excution_time = convertMillisecondsToTime(duration)
170
- // BUFFER.setItem("EXECUTION_ID",208);
171
- // await exeDetails.updateExecuitonDetails(frothUrl, token, id,resultdetails);
172
- // } catch (error) {
173
- // console.error('Error in main function:', error);
174
- // }
175
- // }
176
-
177
- // main();
151
+
178
152
  module.exports = commonconfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "froth-webdriverio-framework",
3
- "version": "2.0.3",
3
+ "version": "2.0.5",
4
4
  "readme": "WebdriverIO Integration",
5
5
  "description": "WebdriverIO and BrowserStack App Automate",
6
6
  "license": "MIT",