|
const {test, expect} =require('@playwright/test')
|
|
import { RegisterPage } from '../pages/RegisterPage';
|
|
|
|
test.describe('GroupWithCorrectDetails',()=>{
|
|
test('RegisterTest1',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
console.log('RegisterLink is working');
|
|
})
|
|
test('RegisterTest2',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('Micheal Rabi', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
|
|
console.log('Successfully Registered');
|
|
console.log('Email is registered successfully and mail is sent');
|
|
await page.close();
|
|
})
|
|
})
|
|
test.describe('TC_Name',()=>{
|
|
test('Name1',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
|
|
console.log('Name is empty it should get error');
|
|
await page.close();
|
|
})
|
|
test('Name2',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('52658954623', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
|
|
console.log('Number is entered it should get error');
|
|
await page.close();
|
|
})
|
|
test('Name3',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('dhjdgabjfbdiuafhdkjbaiughjfkshloadfishjkfglik', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
|
|
console.log('50 Characters is entered it should get error');
|
|
await page.close();
|
|
})
|
|
test('Name4',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('^%$#%$^&*&', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
|
|
console.log('Special Characters is entered it should get error');
|
|
await page.close();
|
|
})
|
|
test('Name5',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('Mano', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
|
|
console.log('Alphabets are acceptable');
|
|
await page.close();
|
|
})
|
|
test('Name6',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('Mano Aravind', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
|
|
console.log('Names with Space are acceptable');
|
|
await page.close();
|
|
})
|
|
test('Name7',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('Mano_Aravind', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
|
|
console.log('Names with Special character are acceptable');
|
|
await page.close();
|
|
})
|
|
test('Name8',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('Ôôerwed', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
|
|
console.log('Names with accented characters are acceptable');
|
|
await page.close();
|
|
})
|
|
})
|
|
test.describe('TC_Email',()=>{
|
|
test('Email1',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('Micheal Rabi', '','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
|
|
console.log('Email is empty it should get error');
|
|
await page.close();
|
|
})
|
|
test('Email2',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('Micheal Rabi', 'rabisundaramgmail.com','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
|
|
console.log('Email without @ symbol it should get error');
|
|
await page.close();
|
|
})
|
|
test('Email3',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('Micheal Rabi', 'rabisundaram@.com','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
|
|
console.log('Email without domain it should get error');
|
|
await page.close();
|
|
})
|
|
test('Email4',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('Micheal Rabi', 'asfg@gmail.com','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
|
|
console.log('Invalid email format it should get error');
|
|
await page.close();
|
|
})
|
|
|
|
test('Email5',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('Micheal Rabi', 'asfg@asfg.com','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
|
|
console.log('Invalid email domain it should get error');
|
|
await page.close();
|
|
})
|
|
test('Email6',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('Micheal Rabi', 'user!@.com','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
|
|
console.log('Email with invalid characters it should get error');
|
|
await page.close();
|
|
})
|
|
test('Email7',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('Micheal Rabi', 'userudgjhbdsayiujhgbkujhgvbvkujyhgdsakhgjvkdjf!@.com','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
|
|
console.log('Email with Excessive length it should get error');
|
|
await page.close();
|
|
})
|
|
test('Email8',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('Micheal Rabi', 'manoaravcind...com','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
|
|
console.log('Email with consecutive dots it should get error');
|
|
await page.close();
|
|
})
|
|
test('Email9',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('Micheal Rabi', 'example@gmail.example.com','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
|
|
console.log('Email with subdomain is accepted');
|
|
await page.close();
|
|
})
|
|
test('Email10',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('Micheal Rabi', 'akshay.vasav@gmail.com','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
|
|
console.log('Email with special character in local part is accepted');
|
|
await page.close();
|
|
})
|
|
test('Email11',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('Micheal Rabi', 'akshay.vasav@gmail.com','9600520046','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
|
|
console.log('Email with uppercase characters is accepted');
|
|
await page.close();
|
|
})
|
|
|
|
})
|
|
test.describe('TC_Phone',()=>{
|
|
test('Phone1',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('Micheal Rabi', 'akshay.vasav@gmail.com','asdfghjklk','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
|
|
console.log('10 characters is not accepted');
|
|
await page.close();
|
|
})
|
|
|
|
test('Phone2',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('Micheal Rabi', 'akshay.vasav@gmail.com','%$%^%^&&*','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
|
|
console.log('Special characters is not accepted');
|
|
await page.close();
|
|
})
|
|
test('Phone3',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('Micheal Rabi', 'akshay.vasav@gmail.com','ASDFGHJK','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
|
|
console.log('Alphabets is not accepted');
|
|
await page.close();
|
|
})
|
|
test('Phone4',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('Micheal Rabi', 'akshay.vasav@gmail.com','96005200465','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
|
|
console.log('11 numbers is not accepted');
|
|
await page.close();
|
|
})
|
|
test('Phone5',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('Micheal Rabi', 'akshay.vasav@gmail.com','960052004','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
|
|
console.log('9 numbers is not accepted');
|
|
await page.close();
|
|
})
|
|
test('Phone6',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('Micheal Rabi', 'akshay.vasav@gmail.com',' 960052004','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
|
|
console.log('space at the start of the number is not accepted');
|
|
await page.close();
|
|
})
|
|
test('Phone7',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('Micheal Rabi', 'akshay.vasav@gmail.com',' ','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
|
|
console.log('blank number is not accepted');
|
|
await page.close();
|
|
})
|
|
test('Phone8',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('Micheal Rabi', 'akshay.vasav@gmail.com','123453678798','Thalavaipuram panagudi','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
|
|
console.log('International number is not accepted');
|
|
await page.close();
|
|
})
|
|
})
|
|
test.describe('TC_Address',()=>{
|
|
test('Address1',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('Micheal Rabi', 'rabisundaram@gmail.com','9600520046','','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
|
|
console.log('Empty address is not accepted');
|
|
await page.close();
|
|
})
|
|
test('Address2',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
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');
|
|
console.log('Exccesive length address is not accepted');
|
|
await page.close();
|
|
})
|
|
test('Address3',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('Micheal Rabi', 'rabisundaram@gmail.com','9600520046','#$@#^%$#@main road','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
|
|
console.log('Except & all other alphanumeric are not accepted');
|
|
await page.close();
|
|
})
|
|
test('Address4',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('Micheal Rabi', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi ','#12345678A' ,'India(91)', 'Mobigic Technologies', 'SweetMart', 'Balurghat');
|
|
console.log('Valid address');
|
|
await page.close();
|
|
})
|
|
})
|
|
test.describe('TC_Company Name',()=>{
|
|
|
|
test('CompanyName1',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('Micheal Rabi', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi ','#12345678A' ,'India(91)', '', 'SweetMart', 'Balurghat');
|
|
console.log('Company name is empty not acceptable');
|
|
await page.close();
|
|
})
|
|
test('CompanyName2',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('Micheal Rabi', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi ','#12345678A' ,'India(91)', 'Mobigic 12345', 'SweetMart', 'Balurghat');
|
|
console.log('Company name with numbers is not acceptable');
|
|
await page.close();
|
|
})
|
|
test('CompanyName3',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('Micheal Rabi', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi ','#12345678A' ,'India(91)', 'sarhjkfgbdsiugfjksdauygasjbiuadsgbjhsdbauifgadsjhbfuifgj', 'SweetMart', 'Balurghat');
|
|
console.log('Company name with 1000 Alphabets is not acceptable');
|
|
await page.close();
|
|
})
|
|
test('CompanyName4',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('Micheal Rabi', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi ','#12345678A' ,'India(91)', 'Mobigic@1234', 'SweetMart', 'Balurghat');
|
|
console.log('Company name with special characters symbols is not acceptable');
|
|
await page.close();
|
|
})
|
|
test('CompanyName5',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('Micheal Rabi', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi ','#12345678A' ,'India(91)', 'Mobigic-Technology', 'SweetMart', 'Balurghat');
|
|
console.log('Company name with special characters '-' is acceptable');
|
|
await page.close();
|
|
})
|
|
})
|
|
test.describe('TC_BusinessType',()=>{
|
|
|
|
test('BusinessType1',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('Micheal Rabi', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi ','#12345678A' ,'India(91)', 'Mobigic-Technology', 'SweetMart', 'Balurghat');
|
|
console.log('Sweetmart is selected');
|
|
await page.close();
|
|
})
|
|
test('BusinessType2',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('Micheal Rabi', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi ','#12345678A' ,'India(91)', 'Mobigic-Technology', 'FruitMart', 'Balurghat');
|
|
console.log('Fruitmart is selected');
|
|
await page.close();
|
|
})
|
|
test('BusinessType3',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('Micheal Rabi', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi ','#12345678A' ,'India(91)', 'Mobigic-Technology', 'BisleriSupply', 'Balurghat');
|
|
console.log('BisleriSupply is selected');
|
|
await page.close();
|
|
})
|
|
test('BusinessType4',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('Micheal Rabi', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi ','#12345678A' ,'India(91)', 'Mobigic-Technology', 'Others', 'Balurghat');
|
|
console.log('Others is selected');
|
|
await page.close();
|
|
})
|
|
})
|
|
test.describe('TC_Password',()=>{
|
|
|
|
test('Password1',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('Micheal Rabi', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi ','#123456' ,'India(91)', 'Mobigic-Technology', 'Others', 'Balurghat');
|
|
console.log('minimum 8 length password is needed, it shows error');
|
|
await page.close();
|
|
})
|
|
test('Password2',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('Micheal Rabi', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi ','#123 456' ,'India(91)', 'Mobigic-Technology', 'Others', 'Balurghat');
|
|
console.log('password with space, it shows error');
|
|
await page.close();
|
|
})
|
|
test('Password3',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('Micheal Rabi', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi ','#%^$%^&&**' ,'India(91)', 'Mobigic-Technology', 'Others', 'Balurghat');
|
|
console.log('password with only special character, it shows error');
|
|
await page.close();
|
|
})
|
|
test('Password4',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('Micheal Rabi', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi ','#ADgrdomi' ,'India(91)', 'Mobigic-Technology', 'Others', 'Balurghat');
|
|
console.log('password with upper and lower case is accepted');
|
|
await page.close();
|
|
})
|
|
test('Password5',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('Micheal Rabi', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi ','1' ,'India(91)', 'Mobigic-Technology', 'Others', 'Balurghat');
|
|
console.log('password is too short,it shows error');
|
|
await page.close();
|
|
})
|
|
})
|
|
test.describe('TC_City',()=>{
|
|
|
|
test('City1',async ({page})=>{
|
|
const register = new RegisterPage(page);
|
|
await register.gotoRegisterPage();
|
|
await register.register('Micheal Rabi', 'rabisundaram@gmail.com','9600520046','Thalavaipuram panagudi ','#1234567A' ,'India(91)', 'Mobigic-Technology', 'Others', 'Balurghat');
|
|
console.log('City is selected');
|
|
await page.close();
|
|
})
|
|
})
|