Hello Akshayp,
First of all thank you for this amazing template.
I need to implement BDD format this template, For example
Now my test cases like this
test('Create new customer and get api credentials', async ({ newIndividualCustomerPage, signInPage }) => {
await test.step('Onboarding new individual customer', async () => {
indOnboardingID = await newIndividualCustomerPage.newIndCustomer()
await signInPage.gotoWebPortal()
await signInPage.officerLogIn('midoffice')
await midOfficerPage.customerOnboardingKYC(indOnboardingID, 'individual')
await midOfficerPage.createCustomer(indOnboardingID)
await signInPage.logOut()
})
await test.step('First time login and create password', async () => {
await signInPage.gotoWebPortal()
await signInPage.firstTimeLogin(indEmailId, indFirstTimeLoginPass)
await signInPage.passwordSetup()
await signInPage.twoFactorSetup(indEmailId)
await signInPage.logOut()
})
})
The problem is I have to duplicate some functions during create my test cases, but I want to create functions for these test steps and I want to call these steps like this
test('Create new customer and get api credentials', async ({ newIndividualCustomerPage, signInPage }) => {
await functions.OnboardingNewIndividualCustomer
await functions.FirstTimeLoginAndCreatePassword
})
The problem is when I want to create functions.ts file, I cannot call pages functions