OBA Website automated using playwright
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

948 lines
36 KiB

const {test, expect} =require('@playwright/test')
import { RegisterPage } from '../pages/RegisterPage';
/* ---------------------------------------------------TEST CASES FOR NAME--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
test.describe('TC_Name',()=>{
test('TC-RP-01: Name with empty space is entered',async ({page})=>{
//Go to register Page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter value for register
await register.register('', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
//Assertion
const locator = page.locator("//input[@id='oba_signup_username']");
await expect(locator).toBeFocused();
await expect(locator).toBeVisible();
await page.close();
})
//Numbers are accepted as name
test.skip('TC-RP-02: Instead of names, Numbers is entered',async ({page})=>{
//Go to register Page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter The value in register page
await register.register('52658954623', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
//Assertion
const locator = page.locator("//input[@id='oba_signup_username']");
await expect(locator).toBeFocused();
await expect(locator).toBeVisible();
await page.close();
})
test.skip('TC-RP-03: 50 characters are entered',async ({page})=>{
//Go to register Page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter The value in register page
await register.register('dhjdgabjfbdiuafhdkjbaiughjfkshloadfishjkfglik', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
//Assertion
const locator = page.locator("//input[@id='oba_signup_username']");
await expect(locator).toBeFocused();
await expect(locator).toBeVisible();
await page.close();
})
test.skip('TC-RP-04: Merchant enters special characters and symbol',async ({page})=>{
//Go to register Page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter The value in register page
await register.register('^%$#%$^&*&', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
//Assertion
const locator = page.locator("//input[@id='oba_signup_username']");
await expect(locator).toBeFocused();
await expect(locator).toBeVisible();
await page.close();
})
test('TC-RP-05: Name with Alphabet',async ({page})=>{
//Go to register Page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter The value in register page
await register.register('Mano', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
//Assertion
await expect(await page.locator("//button[normalize-space()='Sign UP']")).toBeVisible();//already verified again sign up will be displayed.
await page.close();
})
test('TC-RP-06: Name with space',async ({page})=>{
//Go to register Page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter The value in register page
await register.register('Mano Aravind', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
//Assertion
await expect(await page.locator("//button[normalize-space()='Sign UP']")).toBeVisible(); //already verified again sign up will be displayed.
await page.close();
})
test('TC-RP-07: Name with special character',async ({page})=>{
//Go to register Page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter The value in register page
await register.register('Mano_Aravind', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
//Assertion
await expect(await page.locator("//button[normalize-space()='Sign UP']")).toBeVisible(); //already verified again sign up will be displayed.
await page.close();
})
test('TC-RP-08: Names with accented characters',async ({page})=>{
//Go to register Page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter The value in register page
await register.register('Ôôerwed', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
//Assertion
await expect(await page.locator("//button[normalize-space()='Sign UP']")).toBeVisible(); //already verified again sign up will be displayed.
await page.close();
})
})
/* ---------------------------------------------------TEST CASES FOR EMAIL ID--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
test.describe('TC_Email',()=>{
test('TC-RP-10: Email with empty space',async ({page})=>{
//Go to register Page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter The value in register page
await register.register('Micheal Rabi', '','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
//Assertion
const locator = page.locator("//input[@id='oba_signup_emailid']");
await expect(locator).toBeFocused();
await expect(locator).toBeVisible();
await page.close();
})
test('TC-RP-11: Email without @',async ({page})=>{
//Go to register Page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter The value in register page
await register.register('Micheal Rabi', 'rabisundaramgmail.com','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
//Assertion
const locator = page.locator("//input[@id='oba_signup_emailid']");
await expect(locator).toBeFocused();
await expect(locator).toBeVisible();
await page.close();
})
test('TC-RP-12: Email without domain',async ({page})=>{
//Go to register Page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter The value in register page
await register.register('Micheal Rabi', 'rabisundaram@.com','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
//Assertion
const locator = page.locator("//input[@id='oba_signup_emailid']");
await expect(locator).toBeFocused();
await expect(locator).toBeVisible();
await page.close();
})
test.skip('TC-RP-13: Invalid email format',async ({page})=>{
//Go to register Page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter The value in register page
await register.register('Micheal Rabi', ' asfg@gmail.com','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
//Assertion
const locator = page.locator("//input[@id='oba_signup_emailid']");
await expect(locator).toBeFocused();
await expect(locator).toBeVisible();
await page.close();
})
test.skip('TC-RP-14: Invalid email domain',async ({page})=>{
//Go to register Page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter The value in register page
await register.register('Micheal Rabi', 'asfg@asfg.com','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
//Assertion
const locator = page.locator("//input[@id='oba_signup_emailid']");
await expect(locator).toBeFocused();
await expect(locator).toBeVisible();
await page.close();
})
test('TC-RP-15: Email with invalid characters',async ({page})=>{
//Go to register Page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter The value in register page
await register.register('Micheal Rabi', 'user!@.com','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
//Assertion
const locator = page.locator("//input[@id='oba_signup_emailid']");
await expect(locator).toBeFocused();
await expect(locator).toBeVisible();
await page.close();
})
test.skip('TC-RP-16: Email with Excessive length',async ({page})=>{
//Go to register Page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter The value in register page
await register.register('Micheal Rabi', 'userudgjhbdsayiujhgbkujhgvbvkujyhgdsakhgjvkdjf!@gmail.com','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
//Assertion
const locator = page.locator("//input[@id='oba_signup_emailid']");
await expect(locator).toBeFocused();
await expect(locator).toBeVisible();
await page.close();
})
test('TC-RP-17: Email with consecutive dots',async ({page})=>{
//Go to register Page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter The value in register page
await register.register('Micheal Rabi', 'manoaravcind...com','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
//Assertion
const locator = page.locator("//input[@id='oba_signup_emailid']");
await expect(locator).toBeFocused();
await expect(locator).toBeVisible();
await page.close();
})
test('TC-RP-19: Email with subdomain ',async ({page})=>{
//Go to register Page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter The value in register page
await register.register('Micheal Rabi', 'example@gmail.example.com','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
//Assertion
await expect(await page.locator("//button[normalize-space()='Sign UP']")).toBeVisible();
await page.close();
})
test.skip('TC-RP-20: Email with special character in local part',async ({page})=>{
//Go to register Page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter The value in register page
await register.register('Micheal Rabi', 'akshay.vasav@gmail.com','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
//Assertion
await expect(await page.locator("//button[normalize-space()='Sign UP']")).toBeVisible();
await page.close();
})
test('TC-RP-21: Email with uppercase characters',async ({page})=>{
//Go to register Page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter The value in register page
await register.register('Micheal Rabi', 'akshay.vasav@gmail.com','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
//Assertion
await expect(await page.locator("//button[normalize-space()='Sign UP']")).toBeVisible();
await page.close();
})
test('TC-RP-23: Email with special characters only',async ({page})=>{
//Go to register Page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter The value in register page
await register.register('Micheal Rabi', '^&#^*($*$(*%','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
//Assertion
const locator = page.locator("//input[@id='oba_signup_emailid']");
await expect(locator).toBeFocused();
await expect(locator).toBeVisible();
await page.close();
})
// functionality doubt
test.skip('TC-RP-24: Email with Upper case letter',async ({page})=>{
//Go to register Page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter The value in register page
await register.register('Micheal Rabi', 'RABISUNDARAM@gmail.com','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
//Assertion
const locator = page.locator("//input[@id='oba_signup_emailid']");
await expect(locator).toBeFocused();
await expect(locator).toBeVisible();
await page.close();
})
test('TC-RP-25: Email with numbers only',async ({page})=>{
//Go to register Page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter The value in register page
await register.register('Micheal Rabi', '5484564525','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
//Assertion
const locator = page.locator("//input[@id='oba_signup_emailid']");
await expect(locator).toBeFocused();
await expect(locator).toBeVisible();
await page.close();
})
})
//-------------------------------------------------TEST CASE FOR PHONE FIELD----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
test.describe('TC_Phone',()=>{
test('TC-RP-26: Phone number with 10 characters',async ({page})=>{
//Go to register Page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter The value in register page
await register.register('Micheal Rabi', 'akshay.vasav@gmail.com','asdfghjklk','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
//Assertion
const locator = page.locator("//input[@id='oba_signup_phone']");
await expect(locator).toBeFocused();
await page.close();
})
test('TC-RP-27: Phone number with Special characters',async ({page})=>{
//Go to register Page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter The value in register page
await register.register('Micheal Rabi', 'akshay.vasav@gmail.com','%$%^%^&&*','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
//Assertion
const locator = page.locator("//input[@id='oba_signup_phone']");
await expect(locator).toBeFocused();
await page.close();
})
test('TC-RP-28: Phone with Alphabets',async ({page})=>{
//Go to register Page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter The value in register page
await register.register('Micheal Rabi', 'akshay.vasav@gmail.com','ASDFGHJK','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
//Assertion
const locator = page.locator("//input[@id='oba_signup_phone']");
await expect(locator).toBeFocused();
await page.close();
})
test('TC-RP-29: Phone with 11 numbers',async ({page})=>{
//Go to register Page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter The value in register page
await register.register('Micheal Rabi', 'akshay.vasav@gmail.com','96005200465','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
//Assertion
const locator = page.locator("//input[@id='oba_signup_phone']");
await expect(locator).toBeFocused();
await page.close();
})
test('TC-RP-30: Phone with 9 numbers',async ({page})=>{
//Go to register Page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter The value in register page
await register.register('Micheal Rabi', 'akshay.vasav@gmail.com','960052004','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
//Assertion
const locator = page.locator("//input[@id='oba_signup_phone']");
await expect(locator).toBeFocused();
await page.close();
})
test('TC-RP-31: Phone with starting with space',async ({page})=>{
//Go to register Page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter The value in register page
await register.register('Micheal Rabi', 'akshay.vasav@gmail.com',' 960052004','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
//Assertion
const locator = page.locator("//input[@id='oba_signup_phone']");
await expect(locator).toBeFocused();
await page.close();
})
test('TC-RP-32: Phone number empty',async ({page})=>{
//Go to register Page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter The value in register page
await register.register('Micheal Rabi', 'akshay.vasav@gmail.com',' ','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
//Assertion
const locator = page.locator("//input[@id='oba_signup_phone']");
await expect(locator).toBeFocused();
await page.close();
})
test('TC-RP-33: Phone with International number',async ({page})=>{
//Go to register Page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter The value in register page
await register.register('Micheal Rabi', 'akshay.vasav@gmail.com','123453678798','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
//Assertion
const locator = page.locator("//input[@id='oba_signup_phone']");
await expect(locator).toBeFocused();
await page.close();
})
test('TC-RP-36: Phone number with 10 numbers',async ({page})=>{
//Go to register Page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter The value in register page
await register.register('Micheal Rabi', 'akshay.vasav@gmail.com','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
//Assertion
await expect(await page.locator("//button[normalize-space()='Sign UP']")).toBeVisible();
await page.close();
})
})
//--------------------------------- TEST CASE FOR ADDRESS FIELD --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test.describe('TC_Address',()=>{
test('TC-RP-37: Empty address',async ({page})=>{
// Go to Register Page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter value for Register
await register.register('Micheal Rabi', 'rabisundaram@gmail.com','9600520046','','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
//Assertion
const locator = page.locator("//textarea[@id='oba_signup_address']");
await expect(locator).toBeFocused();
await page.close();
})
// Need to check showing error
test.skip('TC-RP-38: Exccesive length address',async ({page})=>{
// Go to Register Page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter value for Register
await register.register('Micheal Rabi', 'rabisundaram@gmail.com','9600520046','Main road thalavai panagudim nindia tamil nadu england ntirunelveli gwhsjdas8iukjgbiu7gk uifygh8idhb','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
//Assertion
const locator = page.locator("//textarea[@id='oba_signup_address']");
await expect(locator).toBeFocused();
await page.close();
})
test.skip('TC-RP-39: Except & all other alphanumeric',async ({page})=>{
// Go to Register Page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter value for Register
await register.register('Micheal Rabi', 'rabisundaram@gmail.com','9600520046','#$@#^%$#@main road','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
//Assertion
const locator = page.locator("//textarea[@id='oba_signup_address']");
await expect(locator).toBeFocused();
await page.close();
})
test('TC-RP-40: Valid Address',async ({page})=>{
// Go to Register Page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter value for Register
await register.register('Micheal Rabi', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi ','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
//Assertion
await expect(await page.locator("//button[normalize-space()='Sign UP']")).toBeVisible();
await page.close();
})
})
//----------------------------- TEST CASES FOR COMPANY NAME ----------------------------------------------------------------------------------------------------------------------------------------------*/
test.describe('TC_Company Name',()=>{
test('TC-RP-43: Company name is empty',async ({page})=>{
//navigate to register page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//enter value in register
await register.register('Micheal Rabi', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi ','#12345678A' ,'India(91)', '', 'SweetMart', 'Balurghat');
//Assertion
const locator = page.locator("//input[@id='oba_signup_company_name']");
await expect(locator).toBeFocused();
await page.close();
})
//These are accepted so need to check with functinality
test.skip('TC-RP-44: Company name with numbers',async ({page})=>{
//go to register page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//enter values in register
await register.register('Micheal Rabi', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi ','#12345678A' ,'India(91)', 'Mobigic 12345', 'SweetMart', 'Balurghat');
//assertion
const locator = page.locator("//input[@id='oba_signup_company_name']");
await expect(locator).toBeFocused();
await page.close();
})
test.skip('TC-RP-45: Company name with 1000 Alphabets',async ({page})=>{
//go to register page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter values in register
await register.register('Micheal Rabi', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi ','#12345678A' ,'India(91)', 'sarhjkfgbdsiugfjksdauygasjbiuadsgbjhsdbauifgadsjhbfuifgj', 'SweetMart', 'Balurghat');
//assertion
const locator = page.locator("//input[@id='oba_signup_company_name']");
await expect(locator).toBeFocused();
await page.close();
})
test.skip('TC-RP-46: Company name with special characters symbols',async ({page})=>{
//go to register page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter values in register
await register.register('Micheal Rabi', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi ','#12345678A' ,'India(91)', 'Mobigic@1234', 'SweetMart', 'Balurghat');
//assertion
const locator = page.locator("//input[@id='oba_signup_company_name']");
await expect(locator).toBeFocused();
await page.close();
})
test('TC-RP-49: Company name with special characters '-' is acceptable',async ({page})=>{
//Navigate to register page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter values in register
await register.register('Micheal Rabi', 'rabisundaram@gmail.com','9600520046','Thalavaipuram - panagudi ','#12345678A' ,'India(91)', 'Mobigic-Technology', 'SweetMart', 'Balurghat');
//Assertion
await expect(await page.locator("//button[normalize-space()='Sign UP']")).toBeVisible();
await page.close();
})
})
//------------------------------------- TEST CASES FOR BUSINESS MART -----------------------------------------------------------------------------*/
test.describe('TC_BusinessType',()=>{
test('TC-RP-50: SweetMart Selection',async ({page})=>{
//Navigate to register page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter values in register
await register.register('Micheal Rabi', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi ','#12345678A' ,'India(91)', 'Mobigic-Technology', 'SweetMart', 'Balurghat');
//Assertion
await expect(await page.locator("//button[normalize-space()='Sign UP']")).toBeVisible();
await page.close();
})
test('TC-RP-51: Fruitmart Selection',async ({page})=>{
//Navigate to register page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter values in register
await register.register('Micheal Rabi', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi ','#12345678A' ,'India(91)', 'Mobigic-Technology', 'FruitMart', 'Balurghat');
//Assertion
await expect(await page.locator("//button[normalize-space()='Sign UP']")).toBeVisible();
await page.close();
})
test('TC-RP-52: Bisleri supply selection',async ({page})=>{
//Navigate to register page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter values in register
await register.register('Micheal Rabi', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi ','#12345678A' ,'India(91)', 'Mobigic-Technology', 'BisleriSupply', 'Balurghat');
//Assertion
await expect(await page.locator("//button[normalize-space()='Sign UP']")).toBeVisible();
await page.close();
})
test('TC-RP-53: Others Selection',async ({page})=>{
//Navigate to register page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter values in register
await register.register('Micheal Rabi', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi ','#12345678A' ,'India(91)', 'Mobigic-Technology', 'Others', 'Balurghat');
//Assertion
await expect(await page.locator("//button[normalize-space()='Sign UP']")).toBeVisible();
await page.close();
})
})
//------------------------------------- TEST CASES FOR Password -----------------------------------------------------------------------------*/
test.describe('TC_Password',()=>{
test('TC-RP-56: minimum 8 length password',async ({page})=>{
//Navigate to register page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter values in register
await register.register('Micheal Rabi', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi ','#123456' ,'India(91)', 'Mobigic-Technology', 'Others', 'Balurghat');
//Assertion
const locator = page.locator("//input[@id='oba_signup_password']");
await expect(locator).toBeFocused();
await page.close();
await page.close();
})
test.skip('TC-RP-57: Password entered with 25 characters',async ({page})=>{
//Navigate to register page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter values in register
await register.register('Micheal Rabi', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi ','dsojarlgpojldm905432kjbnk' ,'India(91)', 'Mobigic-Technology', 'Others', 'Balurghat');
//Assertion
const locator = page.locator("//input[@id='oba_signup_password']");
await expect(locator).toBeFocused();
await page.close();
await page.close();
})
test('TC-RP-59: Password with upper and lower case',async ({page})=>{
//Navigate to register page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter values in register
await register.register('Micheal Rabi', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi ','#ADgrdomi' ,'India(91)', 'Mobigic-Technology', 'Others', 'Balurghat');
//Assertion
await expect(await page.locator("//button[normalize-space()='Sign UP']")).toBeVisible();
await page.close();
})
//password is space, 25 characters, only special characters are accepted. need to check functions
test.skip('TC-RP-60: Password with space',async ({page})=>{
//Navigate to register page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter values in register
await register.register('Micheal Rabi', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi ','#123 456' ,'India(91)', 'Mobigic-Technology', 'Others', 'Balurghat');
//Assertion
const locator = page.locator("//input[@id='oba_signup_password']");
await expect(locator).toBeFocused();
await page.close();
await page.close();
})
test('TC-RP-61: Too short Password is not accepted',async ({page})=>{
//Navigate to register page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter values in register
await register.register('Micheal Rabi', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi ','1' ,'India(91)', 'Mobigic-Technology', 'Others', 'Balurghat');
//Assertion
const locator = page.locator("//input[@id='oba_signup_password']");
await expect(locator).toBeFocused();
await page.close();
await page.close();
})
})
test.skip('TC-RP-63: Password with only special character',async ({page})=>{
//Navigate to register page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter values in register
await register.register('Micheal Rabi', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi ','#%^$%^&&**' ,'India(91)', 'Mobigic-Technology', 'Others', 'Balurghat');
//Assertion
const locator = page.locator("//input[@id='oba_signup_password']");
await expect(locator).toBeFocused();
await page.close();
await page.close();
})
//------------------------------------- TEST CASES FOR City -----------------------------------------------------------------------------
test.describe('TC_City',()=>{
test('TC-RP-55: City Selection',async ({page})=>{
//Navigate to register page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter values in register
await register.register('Micheal Rabi', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi ','#1234567A' ,'India(91)', 'Mobigic-Technology', 'Others', 'Balurghat');
//Assertion
await expect(await page.locator("//button[normalize-space()='Sign UP']")).toBeVisible();
await page.close();
})
})
//------------------------------------- TEST CASE FOR ALREADY SIGNUP BUTTON ------------------------------------------------------------------------------------------------------------------------------------
test('TC-RP-65: Already sign up ', async ({page}) =>{
//Navigate to register
const register = new RegisterPage(page);
await register.alreadySignUpCheck();
//Assertion
const locator = page.locator("//input[@name='oba_login_emailid']");
await expect(locator).toBeFocused();
})
//------------------------------------ TEST CASE FOR COUNTRY CODE -------------------------------------------------------------------------------------------------------------------------------------------------------------------
test('TC-RP-66: India Country code',async ({page})=>{
//Navigate to register
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter value in register
await register.register('Micheal Rabi', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi ','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
//Assertion
await expect(await page.locator("//button[normalize-space()='Sign UP']")).toBeVisible();
await page.close();
})
/* -------------------------- TEST CASE FOR VALID DETAILS --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
test.describe('GroupWithCorrectDetails',()=>{
// Register Link Check
test('TC-RP-68: RegisterLink Check',async ({page})=>{
//Go to register page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Assertion
await expect(await page.locator("//button[@class='btn btn-primary btn-block']")).toBeVisible();
})
// Register with correct details
test('TC-Rp-67: Register page entering with correct details',async ({page})=>{
//Navigate to Register page
const register = new RegisterPage(page);
await register.gotoRegisterPage();
//Enter value in register page
await register.register('Micheal Rabi', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
//Assertion
await expect(await page.locator("//button[normalize-space()='Sign UP']")).toBeVisible();
await page.close();
})
})