|
|
|
@ -105,6 +105,7 @@ test.describe('View', () => {
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
test('Calendar', async () => { |
|
|
|
|
// Create & Verify Calendar View
|
|
|
|
|
await dashboard.viewSidebar.createCalendarView({ |
|
|
|
|
title: 'Calendar', |
|
|
|
|
}); |
|
|
|
@ -116,6 +117,7 @@ test.describe('View', () => {
|
|
|
|
|
|
|
|
|
|
await dashboard.viewSidebar.openView({ title: 'Calendar' }); |
|
|
|
|
|
|
|
|
|
// Update Calendar range
|
|
|
|
|
await toolbar.clickCalendarViewSettings(); |
|
|
|
|
|
|
|
|
|
await toolbar.calendarRange.newCalendarRange({ |
|
|
|
@ -124,6 +126,7 @@ test.describe('View', () => {
|
|
|
|
|
|
|
|
|
|
await toolbar.clickCalendarViewSettings(); |
|
|
|
|
|
|
|
|
|
// Verify Sidebar
|
|
|
|
|
const calendar = dashboard.calendar; |
|
|
|
|
|
|
|
|
|
await calendar.verifySideBarOpen(); |
|
|
|
@ -136,6 +139,7 @@ test.describe('View', () => {
|
|
|
|
|
|
|
|
|
|
await calendar.verifySideBarOpen(); |
|
|
|
|
|
|
|
|
|
// Verify Calendar View Modes
|
|
|
|
|
await calendarTopbar.verifyActiveCalendarView({ view: 'month' }); |
|
|
|
|
|
|
|
|
|
await toolbar.calendarViewMode.changeCalendarView({ title: 'week' }); |
|
|
|
@ -158,6 +162,8 @@ test.describe('View', () => {
|
|
|
|
|
|
|
|
|
|
await calendarTopbar.moveToDate({ date: 'January 2024', action: 'prev' }); |
|
|
|
|
|
|
|
|
|
// Verify Sidebar Records & Filters
|
|
|
|
|
|
|
|
|
|
await calendar.sideMenu.verifySideBarRecords({ records: dateRecords.map(r => r.Title) }); |
|
|
|
|
|
|
|
|
|
await calendar.sideMenu.updateFilter({ |
|
|
|
@ -205,133 +211,41 @@ test.describe('View', () => {
|
|
|
|
|
|
|
|
|
|
await calendar.toolbar.calendarViewMode.changeCalendarView({ title: 'day' }); |
|
|
|
|
|
|
|
|
|
await dashboard.rootPage.waitForTimeout(10000); |
|
|
|
|
}); |
|
|
|
|
await calendar.calendarTopbar.moveToDate({ |
|
|
|
|
date: '1 January 2024', |
|
|
|
|
action: 'prev', |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
test('Calendar view operations', async () => { |
|
|
|
|
/*test.slow(); |
|
|
|
|
await calendar.sideMenu.verifySideBarRecords({ records: dateRecords.map(r => r.Title) }); |
|
|
|
|
|
|
|
|
|
await dashboard.viewSidebar.createKanbanView({ |
|
|
|
|
title: 'Film Kanban', |
|
|
|
|
}); |
|
|
|
|
await dashboard.viewSidebar.verifyView({ |
|
|
|
|
title: 'Film Kanban', |
|
|
|
|
index: 0, |
|
|
|
|
}); |
|
|
|
|
await calendar.calendarDayDateTime.selectHour({ hourIndex: 10 }); |
|
|
|
|
|
|
|
|
|
await toolbar.sort.add({ |
|
|
|
|
title: 'Title', |
|
|
|
|
ascending: false, |
|
|
|
|
locallySaved: false, |
|
|
|
|
}); |
|
|
|
|
await calendar.sideMenu.updateFilter({ filter: 'In selected hours' }); |
|
|
|
|
|
|
|
|
|
await toolbar.clickFilter(); |
|
|
|
|
await toolbar.filter.add({ |
|
|
|
|
title: 'Title', |
|
|
|
|
operation: 'is like', |
|
|
|
|
value: 'BA', |
|
|
|
|
locallySaved: false, |
|
|
|
|
}); |
|
|
|
|
await toolbar.clickFilter(); |
|
|
|
|
await calendar.sideMenu.verifySideBarRecords({ records: ['Team Catchup'] }); |
|
|
|
|
|
|
|
|
|
await toolbar.fields.toggleShowAllFields(); |
|
|
|
|
await toolbar.fields.toggleShowAllFields(); |
|
|
|
|
await toolbar.fields.toggle({ title: 'Title' }); |
|
|
|
|
await calendar.calendarDayDateTime.selectHour({ hourIndex: 1 }); |
|
|
|
|
|
|
|
|
|
await dashboard.viewSidebar.copyView({ title: 'Film Kanban' }); |
|
|
|
|
await dashboard.viewSidebar.verifyView({ |
|
|
|
|
title: 'Kanban', |
|
|
|
|
index: 1, |
|
|
|
|
}); |
|
|
|
|
const kanban = dashboard.kanban; |
|
|
|
|
await kanban.verifyStackCount({ count: 6 }); |
|
|
|
|
await kanban.verifyStackOrder({ |
|
|
|
|
order: ['Uncategorized', 'G', 'PG', 'PG-13', 'R', 'NC-17'], |
|
|
|
|
}); |
|
|
|
|
await kanban.verifyStackFooter({ |
|
|
|
|
count: [0, 4, 5, 8, 6, 6], |
|
|
|
|
}); |
|
|
|
|
await kanban.verifyCardCount({ |
|
|
|
|
count: [0, 4, 5, 8, 6, 6], |
|
|
|
|
}); |
|
|
|
|
// verify card order
|
|
|
|
|
const order2 = [ |
|
|
|
|
['BAREFOOT MANCHURIAN', 'BARBARELLA STREETCAR'], |
|
|
|
|
['WORST BANGER', 'PRESIDENT BANG'], |
|
|
|
|
]; |
|
|
|
|
for (let i = 1; i <= order2.length; i++) |
|
|
|
|
await kanban.verifyCardOrder({ |
|
|
|
|
stackIndex: i, |
|
|
|
|
order: order2[i - 1], |
|
|
|
|
}); |
|
|
|
|
await calendar.sideMenu.verifySideBarRecords({ records: [] }); |
|
|
|
|
|
|
|
|
|
await dashboard.viewSidebar.changeViewIcon({ |
|
|
|
|
title: 'Kanban', |
|
|
|
|
icon: 'american-football', |
|
|
|
|
iconDisplay: '🏈', |
|
|
|
|
await calendar.calendarTopbar.moveToDate({ |
|
|
|
|
date: '3 January 2024', |
|
|
|
|
action: 'next', |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
await dashboard.viewSidebar.deleteView({ title: 'Kanban' }); |
|
|
|
|
///////////////////////////////////////////////
|
|
|
|
|
await calendar.sideMenu.verifySideBarRecords({ records: [] }); |
|
|
|
|
|
|
|
|
|
await dashboard.viewSidebar.openView({ title: 'Film Kanban' }); |
|
|
|
|
await toolbar.calendarViewMode.changeCalendarView({ title: 'week' }); |
|
|
|
|
|
|
|
|
|
// add new stack
|
|
|
|
|
await kanban.addNewStack({ title: 'Test' }); |
|
|
|
|
await dashboard.rootPage.waitForTimeout(1000); |
|
|
|
|
await kanban.verifyStackCount({ count: 7 }); |
|
|
|
|
await kanban.verifyStackOrder({ |
|
|
|
|
order: ['Uncategorized', 'G', 'PG', 'PG-13', 'R', 'NC-17', 'Test'], |
|
|
|
|
}); |
|
|
|
|
await calendar.calendarWeekDateTime.selectHour({ dayIndex: 0, hourIndex: 10 }); |
|
|
|
|
|
|
|
|
|
// collapse stack
|
|
|
|
|
await kanban.verifyCollapseStackCount({ count: 0 }); |
|
|
|
|
await kanban.collapseStack({ index: 0 }); |
|
|
|
|
await kanban.verifyCollapseStackCount({ count: 1 }); |
|
|
|
|
await kanban.expandStack({ index: 0 }); |
|
|
|
|
await kanban.verifyCollapseStackCount({ count: 0 }); |
|
|
|
|
|
|
|
|
|
// add record to stack & verify
|
|
|
|
|
await toolbar.fields.toggleShowAllFields(); |
|
|
|
|
await toolbar.fields.toggleShowAllFields(); |
|
|
|
|
await toolbar.fields.toggleShowSystemFields(); |
|
|
|
|
await toolbar.fields.toggle({ title: 'LanguageId' }); |
|
|
|
|
await toolbar.fields.toggle({ title: 'Title' }); |
|
|
|
|
await toolbar.sort.reset(); |
|
|
|
|
await toolbar.filter.reset(); |
|
|
|
|
|
|
|
|
|
await kanban.addCard({ stackIndex: 6 }); |
|
|
|
|
await dashboard.expandedForm.fillField({ |
|
|
|
|
columnTitle: 'Title', |
|
|
|
|
value: 'New record', |
|
|
|
|
}); |
|
|
|
|
await dashboard.expandedForm.fillField({ |
|
|
|
|
columnTitle: 'LanguageId', |
|
|
|
|
value: '1', |
|
|
|
|
}); |
|
|
|
|
// todo: Check why kanban doesnt reload the rows data
|
|
|
|
|
await dashboard.expandedForm.save({ waitForRowsData: false }); |
|
|
|
|
// kludge: reload the page
|
|
|
|
|
await dashboard.rootPage.reload(); |
|
|
|
|
|
|
|
|
|
await kanban.verifyStackCount({ count: 7 }); |
|
|
|
|
await kanban.verifyStackOrder({ |
|
|
|
|
order: ['Uncategorized', 'G', 'PG', 'PG-13', 'R', 'NC-17', 'Test'], |
|
|
|
|
}); |
|
|
|
|
await kanban.verifyCardCount({ |
|
|
|
|
count: [0, 25, 25, 25, 25, 25, 1], |
|
|
|
|
}); |
|
|
|
|
await calendar.sideMenu.updateFilter({ filter: 'In selected hours' }); |
|
|
|
|
|
|
|
|
|
// delete stack
|
|
|
|
|
await kanban.deleteStack({ index: 6 }); |
|
|
|
|
await dashboard.rootPage.waitForTimeout(1000); |
|
|
|
|
await kanban.verifyStackCount({ count: 6 }); |
|
|
|
|
await kanban.verifyStackOrder({ |
|
|
|
|
order: ['Uncategorized', 'G', 'PG', 'PG-13', 'R', 'NC-17'], |
|
|
|
|
}); |
|
|
|
|
await kanban.verifyCardCount({ |
|
|
|
|
count: [1, 25, 25, 25, 25, 25], |
|
|
|
|
});*/ |
|
|
|
|
await calendar.sideMenu.verifySideBarRecords({ records: ['Team Catchup'] }); |
|
|
|
|
|
|
|
|
|
await calendar.calendarWeekDateTime.selectHour({ dayIndex: 0, hourIndex: 1 }); |
|
|
|
|
|
|
|
|
|
await calendar.sideMenu.verifySideBarRecords({ records: [] }); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
test('Calendar shared view operations', async ({ page }) => { |
|
|
|
|