1.0.1 • Published 2 years ago

wdio-enverus-core-api-utils v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

WDIO Enverus Core API utils

About

The motivation with this module is to provide a high-level abstraction for Core API utils.

Getting Started

Install WDIO Enverus Core Api Utils as an npm module and save it to your package.json file as a development dependency:

npm install wdio-enverus-core-api-utils --save-dev

Once installed it can now be referenced by simply calling

import {
    FileUtils as fileUtils,
    StringUtils as stringUtils,
    Utils as utils
} from 'wdio-enverus-core-api-utils';

Available methods:

File Utils:

  • downloadFile - Download File (via curl)
  • extractArchive - Extract archive to path
  • fileLineCount - Compare the number of line in file and table
  • getDBFFileHeader - Get .dbf file header
  • fileHeader - Get file header
  • uploadFile - Upload file
  • readTextFile - Read text file
  • stringToArray - Convert string to array.
  • getColumnDataFromFile - Get column rows value from file
  • isFileExist - Check if file exist
  • getFilesFromPath - Get files name from path
  • writeFile - Write data to file

Method Summary

MethodsMethods typeParameters
async downloadFilepublicdirectory: string, fileName: string, url: string
async extractArchivepublicsuiteName: string, fileName: string
async fileLineCountpublicfileName: string, suiteName: string, remove: Nu,ber
async getDBFFileHeaderpublicfileName: string, suiteName: string
async fileHeaderpublicfileName: string, suiteName: string
async uploadFilepublicfileName: string
async readTextFilepublicfileName: string
async stringToArraypublicstring: string, separator: string, booleanRemoveLegend: boolean
async getColumnDataFromFilepublicfileName: string, column: string
async isFileExistpublicfileName: string, suiteName: string
async getFilesFromPathpublicsuiteName: string
async writeFilepublicfile_name: string, data: string, file_path: string

String Utils:

  • areArraysEqual - Compare if two string arrays are equal. Order of elements in arrays does not matter.
  • stringToArray - Convert string to array.

Method Summary

MethodsMethods typeParameters
async areArraysEqualpublicarr1: Object, arr2: Object
async stringToArraypublicstring: string, separator: string, booleanRemoveLegend: boolean

Utils:

  • getUUid - Get Universal Unique Identifier

Method Summary

MethodsMethods type
async getUUidpublic