Skip to content

Instantly share code, notes, and snippets.

View T-e-j-k-u-m-a-r's full-sized avatar

Tejkumar Kempaiah T-e-j-k-u-m-a-r

View GitHub Profile
@T-e-j-k-u-m-a-r
T-e-j-k-u-m-a-r / Solution for the preprocessor in case on cypress cucumber setup which uses typescript
Last active August 18, 2024 07:31
Solution for the preprocessor in case on cypress cucumber setup which uses typescript
below are the file content
1. cypress.config.ts
2. cypress/tsconfig.json
3. tsconfig.json(global) file where the changes w.r.t bundle needed for cypress cucumber preprocessor from Badeball is not sujjested
Reference link.
File contents:
cypress/tsconfig.json
import { Homepage_Generic } from "../../../../pages/automation/generic/homePage";
import { IssuesPanel } from '../../../../pages/automation/generic/issuesPanel';
import { ContactSearchPage } from "../../../../pages/automation/generic/contactSearch";
import { BillingPage } from "../../../../pages/automation/generic/billingPage";
import { CustomerOverview } from "../../../../pages/automation/generic/customerOverview";
import { Profile } from "../../../../pages/automation/generic/profile";
import { createNewCustomer_type_consumerType } from "../../../../utility/generic/createNewCustomer_ConsumerType_Postpaid";
import { searchCustomer_passportID } from "../../../../utility/generic/searchCustomer_passportID";
import { createNewContact } from "../../../../pages/automation/generic/createNewContact";
import { Login_generic } from "../../../../utility/generic/login-generic";
@T-e-j-k-u-m-a-r
T-e-j-k-u-m-a-r / getAllFoldername.js
Created January 9, 2024 10:34
Get all the folder name from a given path in windows using Javascript
const fs = require('fs');
const path = 'C:\\Users\\kemtej01\\projects\\ADO-Repos\\ccui\\cypress\\e2e\\automation\\generic';
// Read the contents of the directory
fs.readdir(path, { withFileTypes: true }, (err, files) => {
if (err) {
console.error('Error reading directory:', err);
return;
}
@T-e-j-k-u-m-a-r
T-e-j-k-u-m-a-r / cleanProject.bat file
Created December 20, 2021 07:31
cleanProject.bat file
//Ob jective:
The below line of code will remove all the unnessary files in the windows machine which will
cause in the memory time out issue.
----------------------------------------------------------
erase "%TEMP%\*.*" /f /s /q
erase "%SystemRoot%\TEMP\*.*" /f /s /q
erase "%LOCALAPPDATA%\Google\Chrome\User Data\*.*" /f /s /q
erase "%LOCALAPPDATA%\Mozilla\Firefox\Profiles\*.*" /f /s /q
@T-e-j-k-u-m-a-r
T-e-j-k-u-m-a-r / play-an-audio.js
Created November 30, 2021 03:00
play-an-audio.js
cy.fixture('audio/track1.mp3', 'base64').then((mp3) => {
const uri = 'data:audio/mp3;base64,' + mp3
const audio = new Audio(uri)
audio.play()
})
var { SpecReporter } = require('jasmine-spec-reporter');
exports.config = {
directConnect: true,
specs: ['todo-spec.js'],
onPrepare: function () {
//console logs configurations
jasmine.getEnv().addReporter(new SpecReporter({
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts
const { SpecReporter } = require('jasmine-spec-reporter');
exports.config = {
allScriptsTimeout: 11000,
specs: [
'./src/**/*.e2e-spec.ts'
],
@T-e-j-k-u-m-a-r
T-e-j-k-u-m-a-r / protractor.saucelabs.config.js
Created May 27, 2021 11:04 — forked from spenoir/protractor.saucelabs.config.js
Protractor with Jasmine config for sauce labs
var HtmlReporter = require('protractor-html-screenshot-reporter');
exports.config = {
sauceUser: process.env.SAUCE_USER_NAME,
sauceKey: process.env.SAUCE_ACCESS_KEY,
sauceSeleniumAddress: process.env.SELENIUM_HOST + ':' + process.env.SELENIUM_PORT + '/wd/hub',
specs: [
'app/public/tests/e2e/*.js'
],
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>testng.xml</suiteXmlFile>
</suiteXmlFiles>
@T-e-j-k-u-m-a-r
T-e-j-k-u-m-a-r / how to run testng.xml using pom.xml in Maven Project.txt
Created May 20, 2020 15:09
how to run testng.xml using pom.xml in Maven Project
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>C:\Users\Tejkumar\Desktop\GIT\API_Automation_Kempaiah\testng.xml</suiteXmlFile>
</suiteXmlFiles>