Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 61 additions & 10 deletions cypress/e2e/SmartSplit-E2E.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ describe('Sign In , Sign Up and Sign Out', () => {
cy.existAccount_signUp('MxnlodySoTest', 'TestCypress@example.com', '1234567890', '123456', '123456');
});
it('TC 3 : Sign in with valid account', () => {
cy.signIn('man@example.com', '123456');
cy.signIn('nicetest@gmail.com', 'gg');
});
it('TC 4 : Sign in with invalid account', () => {
cy.invalid_signIn('abc@example.com', '123456');
Expand All @@ -18,7 +18,7 @@ describe('Sign In , Sign Up and Sign Out', () => {

describe('Profile Editing', () => {
beforeEach(() => {
cy.signIn('man@example.com', '123456');
cy.signIn('nicetest@gmail.com', 'gg');
});
it('TC 6 : Edit profile', () => {
cy.editProfile('Man-DevOps', '9876543210');
Expand All @@ -27,11 +27,11 @@ describe('Profile Editing', () => {

describe('Group Management (CRUD)', () => {
beforeEach(() => {
cy.signIn('man@example.com', '123456');
cy.signIn('testcy@gmail.com', 'gg');
});
it('TC 7 : Create new group', () => {
cy.createNewGroup('Cypress Add new Group', ['NavadolSom', 'SukiKana']);
cy.createNewGroup('For delete Testing', ['NavadolSom']);
cy.createNewGroup('Cypress Add new Group', ['testest', 'MxnlodySoTest']);
cy.createNewGroup('For delete Testing', ['testest']);
});
it('TC 8 : Read group', () => {
cy.readGroup('Cypress Add new Group');
Expand All @@ -46,7 +46,7 @@ describe('Group Management (CRUD)', () => {

describe('Smart Split Functionality (Expense)', () => {
beforeEach(() => {
cy.signIn('man@example.com', '123456');
cy.signIn('testcy@gmail.com', 'gg');
})
it('TC 11 : Add expense in group with Equality split', () => {
cy.addExpenseEqualSplit('We are BanYai', 'About us 10/10/2025', '1500');
Expand All @@ -56,11 +56,14 @@ describe('Smart Split Functionality (Expense)', () => {
})
});



describe('Smart Split Functionality (Payment)', () => {
beforeEach(() => {
cy.signIn('navadol@example.com', '123456');
cy.visit('/login');
cy.signIn('TestCypress@example.com', '123456');
})
it('TC 13 : Expense Payment from Dashboard ', () => {
it('TC 13 : Expense Payment from Dashboard ', () => {
cy.payExpenseFromDashboard("5 Star Restuarant")
})
it('TC 14 : Expense Payment from Group', () => {
Expand All @@ -70,9 +73,57 @@ describe('Smart Split Functionality (Payment)', () => {

describe('Smart Split Functionality (Verify Payment)', () => {
beforeEach(() => {
cy.signIn('man@example.com', '123456');
cy.signIn('testcy@gmail.com', 'gg');
})
it('TC 15 : Confirm Payment', () => {
cy.conFirmExpensePay("We are BanYai", "5 Star Restuarant", ["NavadolSom"]);
cy.conFirmExpensePay("We are BanYai", "5 Star Restuarant", ["MxnlodySoTest"]);
})
})

describe('Add user from another group', () => {
beforeEach(() => {
cy.signIn('testcy@gmail.com', 'gg');
})
it('TC 16 : Create new group', () => {
cy.createNewGroupAnotheruser('Cypress Add new User from anotherGr', ['Man-DevOps'],'We are BanYai');
});
})

describe('Check name invalid input', () => {
beforeEach(() => {
cy.signIn('testcy@gmail.com', 'gg');
})
it('TC 16 : InvalidInput', () => {
cy.InvalidInput('CheckInvalidInput', 'Mxn-DevOps');
});
})

describe('Check Bill TOtal', () => {
beforeEach(() => {
cy.signIn('testcy@gmail.com', 'gg');
})
it('TC 17 : Check Bill TOtal', () => {
cy.checkTotalbill('We are BanYai', 'About us 10/10/2025');
});
})

describe('Add expense USD currency & Set ExchageRate (Payment)', () => {
beforeEach(() => {
cy.signIn('TestCypress@example.com', '123456');
})
it('TC 18 : Add expense USD currency', () => {
cy.addcurrencyUSD('We are BanYai', 'About us 10/10/2025', '26');
})
it('TC 19 : Set ExchageRate', () => {
cy.setExchageRate('We are BanYai', 'About us 10/10/2025', '26','30');
})
});

describe('Add expense Another currency (Payment)', () => {
beforeEach(() => {
cy.signIn('TestCypress@example.com', '123456');
})
it('TC 20 : Add expense Another currency', () => {
cy.addAnothercurrency('We are BanYai', 'About us 10/10/2025','10', 'EUR');
})
});
2 changes: 1 addition & 1 deletion cypress/locators/equalSplitLocator.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const EquallySplitLocator = {
ExpenseNameInputBox : '//*[@id="root"]/div/div/input[1]',
TotalAmountInputBox : '//*[@id="root"]/div/div/input[2]',
ExpandPaticipantButton : '//*[@id="root"]/div/div/div[2]/button',
ExpandPaticipantButton : '//*[@id="root"]/div/div/button[2]',
}
5 changes: 3 additions & 2 deletions cypress/locators/groupAddLocator.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export const GroupAddLocator = {
participantAppearName : '//ul//li[normalize-space(text())="${paticipant[i]}"',
createGroupButton: '//*[@id="root"]/div/div/div/div/div/button',
groupNameHeader: '//*[@id="root"]/div/div/div[1]/div/h2',
saveChangeButton: '//*[@id="root"]/div/div/div[2]/div/button'

saveChangeButton: '//*[@id="root"]/div/div/div[2]/div/button',
praticipantAnotherInput:'//*[@id="groupSearch"]',
praticipantAnotherClick:'//*[@id="root"]/div/div/div/div/div/div[4]/div/ul/li[1]'
}
3 changes: 3 additions & 0 deletions cypress/locators/groupEditLocator.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const GroupEditLocator = {
groupEditButton:'//*[@id="root"]/div/div/div/div/div/a/div/div[2]/button[2]',
}
Loading