vita-playwright 1.5.0-beta1 → 1.5.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vita-playwright",
3
- "version": "1.5.0-beta1",
3
+ "version": "1.5.0",
4
4
  "email": "noreply_testautomation@vialto.com",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -15,7 +15,6 @@ export class UIHelper {
15
15
  // Launch non-incognito session using provided chromePath
16
16
  this.browser = await chromium.launchPersistentContext(chromePath, {
17
17
  headless: false,
18
- args: ['--start-maximized','--allow-running-insecure-content','--ignore-certificate-errors', '--disable-session-crashed-bubble', ],
19
18
  });
20
19
  this.page = await this.browser.newPage();
21
20
  this.browser.clearCookies();
@@ -69,16 +69,15 @@ export class DocumentUtility {
69
69
  }
70
70
 
71
71
  static async getPDFContents(pdfFilePath: string) {
72
- let dataBuffer = fs.readFile(pdfFilePath)
73
- let jsonObject = {}
74
- return await Pdfparser(dataBuffer).then(function (data: any) {
75
- jsonObject['content'] = data.text.replace(/\n/g, ' -> ')
76
- jsonObject['info'] = data.info
77
- jsonObject['metadata'] = data.metadata
78
- jsonObject['pages'] = data.numpages
79
- jsonObject['version'] = data.version
80
- return jsonObject
81
- });
72
+ const dataBuffer = await fs.readFile(pdfFilePath);
73
+ const jsonObject: any = {};
74
+ const data = await Pdfparser(dataBuffer);
75
+ jsonObject['content'] = data.text.replace(/\n/g, '\n');
76
+ jsonObject['info'] = data.info;
77
+ jsonObject['metadata'] = data.metadata;
78
+ jsonObject['pages'] = data.numpages;
79
+ jsonObject['version'] = data.version;
80
+ return jsonObject;
82
81
  }
83
82
 
84
83
  static async getDynamicJsonFileData(filePath: string) {