Initial Upload
This commit is contained in:
61
cypress/e2e/Reporting/report_bandwidth.cy.js
Normal file
61
cypress/e2e/Reporting/report_bandwidth.cy.js
Normal file
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Xibo Signage Ltd
|
||||
*
|
||||
* Xibo - Digital Signage - https://xibosignage.com
|
||||
*
|
||||
* This file is part of Xibo.
|
||||
*
|
||||
* Xibo is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* any later version.
|
||||
*
|
||||
* Xibo is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Xibo. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* eslint-disable max-len */
|
||||
describe('Bandwidth', function() {
|
||||
const display1 = 'POP Display 1';
|
||||
|
||||
beforeEach(function() {
|
||||
cy.login();
|
||||
});
|
||||
|
||||
it('should load tabular data and charts', () => {
|
||||
// Create and alias for load Display
|
||||
cy.intercept({
|
||||
url: '/display?start=*',
|
||||
query: {display: display1},
|
||||
}).as('loadDisplayAfterSearch');
|
||||
|
||||
cy.intercept('/report/data/bandwidth?*').as('reportData');
|
||||
|
||||
cy.visit('/report/form/bandwidth');
|
||||
|
||||
// Click on the select2 selection
|
||||
cy.get('#displayId + span .select2-selection').click();
|
||||
cy.get('.select2-container--open input[type="search"]').type(display1);
|
||||
cy.wait('@loadDisplayAfterSearch');
|
||||
cy.selectOption(display1);
|
||||
|
||||
// Click on the Apply button
|
||||
cy.contains('Apply').should('be.visible').click();
|
||||
|
||||
cy.get('.chart-container').should('be.visible');
|
||||
|
||||
// Click on Tabular
|
||||
cy.contains('Tabular').should('be.visible').click();
|
||||
cy.wait('@reportData');
|
||||
|
||||
// Should have media stats
|
||||
cy.get('#bandwidthTbl tbody tr:nth-child(1) td:nth-child(1)').contains('Submit Stats');
|
||||
cy.get('#bandwidthTbl tbody tr:nth-child(1) td:nth-child(2)').contains(200); // Bandwidth
|
||||
cy.get('#bandwidthTbl tbody tr:nth-child(1) td:nth-child(3)').contains('bytes'); // Unit
|
||||
});
|
||||
});
|
||||
130
cypress/e2e/Reporting/report_distribution.cy.js
Normal file
130
cypress/e2e/Reporting/report_distribution.cy.js
Normal file
@@ -0,0 +1,130 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Xibo Signage Ltd
|
||||
*
|
||||
* Xibo - Digital Signage - https://xibosignage.com
|
||||
*
|
||||
* This file is part of Xibo.
|
||||
*
|
||||
* Xibo is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* any later version.
|
||||
*
|
||||
* Xibo is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Xibo. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* eslint-disable max-len */
|
||||
describe('Distribution by Layout, Media or Event', function() {
|
||||
const display1 = 'POP Display 1';
|
||||
const layout1 = 'POP Layout 1';
|
||||
|
||||
beforeEach(function() {
|
||||
cy.login();
|
||||
});
|
||||
|
||||
it('Range: Today, Checks duration and count of a layout stat', () => {
|
||||
// Create and alias for load layout
|
||||
cy.intercept({
|
||||
url: '/display?start=*',
|
||||
query: {display: display1},
|
||||
}).as('loadDisplayAfterSearch');
|
||||
|
||||
cy.intercept({
|
||||
url: '/layout?start=*',
|
||||
query: {layout: layout1},
|
||||
}).as('loadLayoutAfterSearch');
|
||||
|
||||
cy.intercept('/report/data/distributionReport?*').as('reportData');
|
||||
|
||||
cy.visit('/report/form/distributionReport');
|
||||
|
||||
// Click on the select2 selection
|
||||
cy.get('#displayId + span .select2-selection').click();
|
||||
cy.get('.select2-container--open input[type="search"]').type(display1);
|
||||
cy.wait('@loadDisplayAfterSearch');
|
||||
cy.selectOption(display1);
|
||||
|
||||
// Click on the select2 selection
|
||||
cy.get('#layoutId + span .select2-selection').click();
|
||||
cy.get('.select2-container--open input[type="search"]').type(layout1);
|
||||
cy.wait('@loadLayoutAfterSearch');
|
||||
cy.selectOption(layout1);
|
||||
|
||||
// Click on the Apply button
|
||||
cy.contains('Apply').should('be.visible').click();
|
||||
|
||||
cy.get('.chart-container').should('be.visible');
|
||||
|
||||
// Click on Tabular
|
||||
cy.contains('Tabular').should('be.visible').click();
|
||||
cy.contains('Next').should('be.visible').click();
|
||||
cy.wait('@reportData');
|
||||
|
||||
// Should have media stats
|
||||
cy.get('#distributionTbl tbody tr:nth-child(3) td:nth-child(1)').contains('12:00 PM'); // Period
|
||||
cy.get('#distributionTbl tbody tr:nth-child(3) td:nth-child(2)').contains(60); // Duration
|
||||
cy.get('#distributionTbl tbody tr:nth-child(3) td:nth-child(3)').contains(1); // Count
|
||||
});
|
||||
|
||||
it.skip('Create/Delete a Daily Distribution Report Schedule', () => {
|
||||
const reportschedule = 'Daily Distribution by Layout 1 and Display 1';
|
||||
|
||||
// Create and alias for load layout
|
||||
cy.intercept({
|
||||
url: '/display?start=*',
|
||||
query: {display: display1},
|
||||
}).as('loadDisplayAfterSearch');
|
||||
|
||||
cy.intercept({
|
||||
url: '/layout?start=*',
|
||||
query: {layout: layout1},
|
||||
}).as('loadLayoutAfterSearch');
|
||||
|
||||
cy.intercept({
|
||||
url: '/report/reportschedule?*',
|
||||
query: {name: reportschedule},
|
||||
}).as('loadReportScheduleAfterSearch');
|
||||
|
||||
cy.visit('/report/form/distributionReport');
|
||||
|
||||
// Click on the select2 selection
|
||||
cy.get('#layoutId + span .select2-selection').click();
|
||||
cy.get('.select2-container--open input[type="search"]').type(layout1);
|
||||
cy.wait('@loadLayoutAfterSearch');
|
||||
cy.selectOption(layout1);
|
||||
|
||||
// ------
|
||||
// ------
|
||||
// Create a Daily Distribution Report Schedule
|
||||
cy.get('#reportAddBtn').click();
|
||||
cy.get('#reportScheduleAddForm #name ').type(reportschedule);
|
||||
|
||||
// Click on the select2 selection
|
||||
cy.get('#reportScheduleAddForm #displayId + span .select2-selection').click();
|
||||
cy.get('.select2-container--open input[type="search"]').type(display1);
|
||||
cy.wait('@loadDisplayAfterSearch');
|
||||
cy.selectOption(display1);
|
||||
|
||||
cy.get('#dialog_btn_2').should('be.visible').click();
|
||||
|
||||
cy.visit('/report/reportschedule/view');
|
||||
cy.get('#name').type(reportschedule);
|
||||
cy.wait('@loadReportScheduleAfterSearch');
|
||||
|
||||
// Click on the first row element to open the designer
|
||||
cy.get('#reportschedules_wrapper tr:first-child .dropdown-toggle').click({force: true});
|
||||
cy.get('#reportschedules_wrapper tr:first-child .reportschedule_button_delete').click({force: true});
|
||||
|
||||
// Delete test campaign
|
||||
cy.get('.bootbox .save-button').click();
|
||||
|
||||
// Check if layout is deleted in toast message
|
||||
cy.get('.toast').contains('Deleted ' + reportschedule);
|
||||
});
|
||||
});
|
||||
35
cypress/e2e/Reporting/report_library_usage.cy.js
Normal file
35
cypress/e2e/Reporting/report_library_usage.cy.js
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Xibo Signage Ltd
|
||||
*
|
||||
* Xibo - Digital Signage - https://xibosignage.com
|
||||
*
|
||||
* This file is part of Xibo.
|
||||
*
|
||||
* Xibo is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* any later version.
|
||||
*
|
||||
* Xibo is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Xibo. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* eslint-disable max-len */
|
||||
describe('Library Usage', function() {
|
||||
beforeEach(function() {
|
||||
cy.login();
|
||||
});
|
||||
|
||||
it('should load tabular data and charts', () => {
|
||||
cy.visit('/report/form/libraryusage');
|
||||
|
||||
cy.get('#libraryUsage_wrapper').should('be.visible');
|
||||
cy.get('#libraryChart').should('be.visible');
|
||||
cy.get('#userChart').should('be.visible');
|
||||
});
|
||||
});
|
||||
183
cypress/e2e/Reporting/report_proofofplay.cy.js
Normal file
183
cypress/e2e/Reporting/report_proofofplay.cy.js
Normal file
@@ -0,0 +1,183 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Xibo Signage Ltd
|
||||
*
|
||||
* Xibo - Digital Signage - https://xibosignage.com
|
||||
*
|
||||
* This file is part of Xibo.
|
||||
*
|
||||
* Xibo is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* any later version.
|
||||
*
|
||||
* Xibo is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Xibo. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* eslint-disable max-len */
|
||||
describe('Proof of Play', function() {
|
||||
const display1 = 'POP Display 1';
|
||||
beforeEach(function() {
|
||||
cy.login();
|
||||
});
|
||||
|
||||
it('Range: Test export', function() {
|
||||
// Create and alias for load displays
|
||||
cy.intercept({
|
||||
url: '/display?start=*',
|
||||
query: {display: display1},
|
||||
}).as('loadDisplayAfterSearch');
|
||||
|
||||
cy.visit('/report/view');
|
||||
cy.contains('Export').click();
|
||||
|
||||
cy.get(':nth-child(1) > .col-sm-10 > .input-group > .flatpickr-wrapper > .datePickerHelper').click();
|
||||
cy.get('.open > .flatpickr-innerContainer > .flatpickr-rContainer > .flatpickr-days > .dayContainer > .today').click();
|
||||
cy.get(':nth-child(2) > .col-sm-10 > .input-group > .flatpickr-wrapper > .datePickerHelper').click();
|
||||
cy.get('.open > .flatpickr-innerContainer > .flatpickr-rContainer > .flatpickr-days > .dayContainer > .today').next().click();
|
||||
|
||||
// Click on the select2 selection
|
||||
cy.get('#displayId + span .select2-selection').click();
|
||||
cy.get('.select2-container--open input[type="search"]').type(display1);
|
||||
cy.wait('@loadDisplayAfterSearch');
|
||||
cy.selectOption(display1);
|
||||
|
||||
cy.get('.total-stat').contains('Total number of records to be exported 5');
|
||||
});
|
||||
|
||||
it('Range: Today - Test layout/media stats for a layout and a display', function() {
|
||||
cy.intercept('/report/data/proofofplayReport?*').as('reportData');
|
||||
|
||||
cy.visit('/report/form/proofofplayReport');
|
||||
|
||||
cy.get('#type').select('media');
|
||||
|
||||
// Click on the Apply button
|
||||
cy.contains('Apply').click();
|
||||
|
||||
// Wait for
|
||||
cy.wait('@reportData');
|
||||
cy.get('#stats tbody').contains('media');
|
||||
|
||||
// Should have media stats - Test media stats for a layout and a display
|
||||
cy.get('#stats tbody tr:nth-child(1) td:nth-child(1)').contains('media'); // stat type
|
||||
cy.get('#stats tbody tr:nth-child(1) td:nth-child(3)').contains('POP Display 1'); // display
|
||||
cy.get('#stats tbody tr:nth-child(1) td:nth-child(6)').contains('POP Layout 1'); // layout
|
||||
cy.get('#stats tbody tr:nth-child(1) td:nth-child(8)').contains('child_folder_media'); // media
|
||||
cy.get('#stats tbody tr:nth-child(1) td:nth-child(10)').contains(2); // number of plays
|
||||
cy.get('#stats tbody tr:nth-child(1) td:nth-child(12)').contains(120); // total duration
|
||||
|
||||
|
||||
cy.get('#type').select('layout');
|
||||
|
||||
// Click on the Apply button
|
||||
cy.contains('Apply').click();
|
||||
|
||||
// Wait for
|
||||
cy.wait('@reportData');
|
||||
cy.contains('Tabular').should('be.visible').click();
|
||||
|
||||
cy.get('#stats tbody').contains('layout');
|
||||
|
||||
// Should have layout stat - Test a layout stat for an ad campaign, a layout and a display
|
||||
cy.get('#stats tbody tr:nth-child(1) td:nth-child(1)').contains('layout'); // stat type
|
||||
cy.get('#stats tbody tr:nth-child(1) td:nth-child(3)').contains('POP Display 1'); // display
|
||||
cy.get('#stats tbody tr:nth-child(1) td:nth-child(4)').contains('POP Ad Campaign 1'); // ad campaign
|
||||
cy.get('#stats tbody tr:nth-child(1) td:nth-child(6)').contains('POP Layout 1'); // layout
|
||||
cy.get('#stats tbody tr:nth-child(1) td:nth-child(10)').contains(1); // number of plays
|
||||
cy.get('#stats tbody tr:nth-child(1) td:nth-child(12)').contains(60); // total duration
|
||||
});
|
||||
|
||||
it('Range: Lastweek - Test media stats for a layout and a display', function() {
|
||||
cy.intercept('/report/data/proofofplayReport?*').as('reportData');
|
||||
|
||||
cy.visit('/report/form/proofofplayReport');
|
||||
|
||||
// Range: Lastweek
|
||||
cy.get('#reportFilter').select('lastweek');
|
||||
|
||||
cy.get('#type').select('media');
|
||||
|
||||
// Click on the Apply button
|
||||
cy.contains('Apply').click();
|
||||
|
||||
// Wait for
|
||||
cy.wait('@reportData');
|
||||
|
||||
cy.get('#stats').within(() => {
|
||||
// Check if the "No data available in table" message is not present
|
||||
cy.contains('No data available in table').should('not.exist');
|
||||
cy.get('tbody tr').should('have.length', 1);
|
||||
// Should have media stats
|
||||
cy.get('tbody td').eq(0).should('contain', 'media'); // stat type
|
||||
cy.get('tbody td').eq(2).contains('POP Display 1'); // display
|
||||
cy.get('tbody td').eq(5).contains('POP Layout 1'); // layout
|
||||
cy.get('tbody td').eq(7).contains('child_folder_media'); // media
|
||||
cy.get('tbody td').eq(9).contains(2); // number of plays
|
||||
cy.get('tbody td').eq(11).contains(120); // total duration
|
||||
});
|
||||
|
||||
cy.get('#type').select('layout');
|
||||
|
||||
// Click on the Apply button
|
||||
cy.contains('Apply').click();
|
||||
|
||||
// Wait for
|
||||
cy.wait('@reportData');
|
||||
|
||||
cy.get('#stats').within(() => {
|
||||
// Check if the "No data available in table" message is not present
|
||||
cy.contains('No data available in table').should('not.exist');
|
||||
cy.get('tbody tr').should('have.length', 1);
|
||||
// Should have layout stat - Test a layout stat for an ad campaign, a layout and a display
|
||||
cy.get('tbody td').eq(0).contains('layout'); // stat type
|
||||
cy.get('tbody td').eq(2).contains('POP Display 1'); // display
|
||||
cy.get('tbody td').eq(3).contains('POP Ad Campaign 1'); // ad campaign
|
||||
cy.get('tbody td').eq(5).contains('POP Layout 1'); // layout
|
||||
cy.get('tbody td').eq(9).contains(1); // number of plays
|
||||
cy.get('tbody td').eq(11).contains(60); // total duration
|
||||
});
|
||||
});
|
||||
|
||||
it('Range: Today - Test event/widget stats for a layout and a display', function() {
|
||||
cy.intercept('/report/data/proofofplayReport?*').as('reportData');
|
||||
|
||||
cy.visit('/report/form/proofofplayReport');
|
||||
|
||||
cy.get('#type').select('event');
|
||||
|
||||
// Click on the Apply button
|
||||
cy.contains('Apply').click();
|
||||
|
||||
// Wait for
|
||||
cy.wait('@reportData');
|
||||
|
||||
// Should have media stats - Test media stats for a layout and a display
|
||||
cy.get('#stats tbody tr:nth-child(1) td:nth-child(1)').contains('event'); // stat type
|
||||
cy.get('#stats tbody tr:nth-child(1) td:nth-child(3)').contains('POP Display 1'); // display
|
||||
cy.get('#stats tbody tr:nth-child(1) td:nth-child(9)').contains('Event123'); // tag/eventname
|
||||
cy.get('#stats tbody tr:nth-child(1) td:nth-child(10)').contains(1); // number of plays
|
||||
cy.get('#stats tbody tr:nth-child(1) td:nth-child(12)').contains(60); // total duration
|
||||
|
||||
cy.get('#type').select('widget');
|
||||
|
||||
// Click on the Apply button
|
||||
cy.contains('Apply').click();
|
||||
|
||||
// Wait for
|
||||
cy.wait('@reportData');
|
||||
cy.contains('Tabular').should('be.visible').click();
|
||||
|
||||
// Should have layout stat - Test a layout stat for an ad campaign, a layout and a display
|
||||
cy.get('#stats tbody tr:nth-child(1) td:nth-child(1)').contains('widget'); // stat type
|
||||
cy.get('#stats tbody tr:nth-child(1) td:nth-child(3)').contains('POP Display 1'); // display
|
||||
cy.get('#stats tbody tr:nth-child(1) td:nth-child(6)').contains('POP Layout 1'); // layout
|
||||
cy.get('#stats tbody tr:nth-child(1) td:nth-child(10)').contains(1); // number of plays
|
||||
cy.get('#stats tbody tr:nth-child(1) td:nth-child(12)').contains(60); // total duration
|
||||
});
|
||||
});
|
||||
134
cypress/e2e/Reporting/report_summary.cy.js
Normal file
134
cypress/e2e/Reporting/report_summary.cy.js
Normal file
@@ -0,0 +1,134 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Xibo Signage Ltd
|
||||
*
|
||||
* Xibo - Digital Signage - https://xibosignage.com
|
||||
*
|
||||
* This file is part of Xibo.
|
||||
*
|
||||
* Xibo is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* any later version.
|
||||
*
|
||||
* Xibo is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Xibo. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* eslint-disable max-len */
|
||||
describe('Summary by Layout, Media or Event', function() {
|
||||
const display1 = 'POP Display 1';
|
||||
const layout1 = 'POP Layout 1';
|
||||
beforeEach(function() {
|
||||
cy.login();
|
||||
});
|
||||
|
||||
it('Range: Today, Checks duration and count of a layout stat', () => {
|
||||
// Create alias
|
||||
cy.intercept({
|
||||
url: '/display?start=*',
|
||||
query: {display: display1},
|
||||
}).as('loadDisplayAfterSearch');
|
||||
|
||||
cy.intercept({
|
||||
url: '/layout?start=*',
|
||||
query: {layout: layout1},
|
||||
}).as('loadLayoutAfterSearch');
|
||||
|
||||
cy.intercept('/report/data/summaryReport?*').as('reportData');
|
||||
|
||||
cy.visit('/report/form/summaryReport');
|
||||
|
||||
// Click on the select2 selection
|
||||
cy.get('#displayId + span .select2-selection').click();
|
||||
cy.get('.select2-container--open input[type="search"]').type(display1);
|
||||
cy.wait('@loadDisplayAfterSearch');
|
||||
cy.selectOption(display1);
|
||||
|
||||
// Click on the select2 selection
|
||||
cy.get('#layoutId + span .select2-selection').click();
|
||||
cy.get('.select2-container--open input[type="search"]').type(layout1);
|
||||
cy.wait('@loadLayoutAfterSearch');
|
||||
cy.selectOption(layout1);
|
||||
|
||||
// Click on the Apply button
|
||||
cy.contains('Apply').should('be.visible').click();
|
||||
// Wait for report data
|
||||
cy.wait('@reportData');
|
||||
|
||||
cy.get('.chart-container').should('be.visible');
|
||||
|
||||
// Click on Tabular
|
||||
cy.contains('Tabular').should('be.visible').click();
|
||||
cy.contains('Next').should('be.visible').click();
|
||||
|
||||
// Should have media stats
|
||||
cy.get('#summaryTbl tbody tr:nth-child(3) td:nth-child(1)').contains('12:00 PM'); // Period
|
||||
cy.get('#summaryTbl tbody tr:nth-child(3) td:nth-child(2)').contains(60); // Duration
|
||||
cy.get('#summaryTbl tbody tr:nth-child(3) td:nth-child(3)').contains(1); // Count
|
||||
});
|
||||
|
||||
it('Create/Delete a Daily Summary Report Schedule', () => {
|
||||
const reportschedule = 'Daily Summary by Layout 1 and Display 1';
|
||||
|
||||
// Create and alias for load layout
|
||||
cy.intercept('/report/reportschedule/form/add*').as('reportScheduleAddForm');
|
||||
cy.intercept({
|
||||
url: '/display?start=*',
|
||||
query: {display: display1},
|
||||
}).as('loadDisplayAfterSearch');
|
||||
|
||||
cy.intercept({
|
||||
url: '/layout?start=*',
|
||||
query: {layout: layout1},
|
||||
}).as('loadLayoutAfterSearch');
|
||||
|
||||
cy.intercept({
|
||||
url: '/report/reportschedule?*',
|
||||
query: {name: reportschedule},
|
||||
}).as('loadReportScheduleAfterSearch');
|
||||
|
||||
cy.visit('/report/form/summaryReport');
|
||||
|
||||
// Click on the select2 selection
|
||||
cy.get('#layoutId + span .select2-selection').click();
|
||||
cy.get('.select2-container--open input[type="search"]').type(layout1);
|
||||
cy.wait('@loadLayoutAfterSearch');
|
||||
cy.selectOption(layout1);
|
||||
|
||||
// ------
|
||||
// ------
|
||||
// Create a Daily Summary Report Schedule
|
||||
cy.get('#reportAddBtn').click();
|
||||
cy.wait('@reportScheduleAddForm');
|
||||
cy.get('#reportScheduleAddForm #name ').type(reportschedule);
|
||||
|
||||
// Click on the select2 selection
|
||||
cy.get('#reportScheduleAddForm #displayId + span .select2-selection').click();
|
||||
cy.get('.select2-container--open input[type="search"]').type(display1);
|
||||
cy.wait('@loadDisplayAfterSearch');
|
||||
cy.selectOption(display1);
|
||||
|
||||
|
||||
cy.get('#dialog_btn_2').should('be.visible').click();
|
||||
|
||||
cy.visit('/report/reportschedule/view');
|
||||
cy.get('#name').type(reportschedule);
|
||||
cy.wait('@loadReportScheduleAfterSearch');
|
||||
|
||||
// Click on the first row element to open the designer
|
||||
cy.get('#reportschedules_wrapper tr:first-child .dropdown-toggle').click({force: true});
|
||||
|
||||
cy.get('#reportschedules_wrapper tr:first-child .reportschedule_button_delete').click({force: true});
|
||||
|
||||
// Delete test campaign
|
||||
cy.get('.bootbox .save-button').click();
|
||||
|
||||
// Check if layout is deleted in toast message
|
||||
cy.get('.toast').contains('Deleted ' + reportschedule);
|
||||
});
|
||||
});
|
||||
45
cypress/e2e/Reporting/report_timeconnected.cy.js
Normal file
45
cypress/e2e/Reporting/report_timeconnected.cy.js
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Xibo Signage Ltd
|
||||
*
|
||||
* Xibo - Digital Signage - https://xibosignage.com
|
||||
*
|
||||
* This file is part of Xibo.
|
||||
*
|
||||
* Xibo is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* any later version.
|
||||
*
|
||||
* Xibo is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Xibo. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* eslint-disable max-len */
|
||||
describe('Time Connected', function() {
|
||||
beforeEach(function() {
|
||||
cy.login();
|
||||
});
|
||||
|
||||
it('should load time connected data of displays', () => {
|
||||
cy.visit('/report/form/timeconnected');
|
||||
|
||||
// Click on the select2 selection
|
||||
cy.get('.select2-search__field').click();
|
||||
|
||||
// Type the display name
|
||||
cy.get('.select2-container--open textarea[type="search"]').type('POP Display Group');
|
||||
cy.get('.select2-container--open .select2-results > ul').contains('POP Display Group').click();
|
||||
|
||||
// Click on the Apply button
|
||||
cy.contains('Apply').should('be.visible').click();
|
||||
|
||||
// Should have media stats
|
||||
cy.get('#records_table tr:nth-child(1) th:nth-child(1)').contains('POP Display 1');
|
||||
cy.get('#records_table tr:nth-child(2) td:nth-child(2)').contains('100%');
|
||||
});
|
||||
});
|
||||
59
cypress/e2e/Reporting/report_timeconnectedsummary.cy.js
Normal file
59
cypress/e2e/Reporting/report_timeconnectedsummary.cy.js
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Xibo Signage Ltd
|
||||
*
|
||||
* Xibo - Digital Signage - https://xibosignage.com
|
||||
*
|
||||
* This file is part of Xibo.
|
||||
*
|
||||
* Xibo is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* any later version.
|
||||
*
|
||||
* Xibo is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Xibo. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* eslint-disable max-len */
|
||||
describe('Time Connected', function() {
|
||||
const display1 = 'POP Display 1';
|
||||
beforeEach(function() {
|
||||
cy.login();
|
||||
});
|
||||
|
||||
it('should load time connected data of displays', () => {
|
||||
// Create and alias for load display
|
||||
cy.intercept({
|
||||
url: '/display?start=*',
|
||||
query: {display: display1},
|
||||
}).as('loadDisplayAfterSearch');
|
||||
|
||||
cy.visit('/report/form/timedisconnectedsummary');
|
||||
|
||||
// Click on the select2 selection
|
||||
cy.get('#displayId + span .select2-selection').click();
|
||||
cy.get('.select2-container--open input[type="search"]').type(display1);
|
||||
cy.wait('@loadDisplayAfterSearch');
|
||||
cy.selectOption(display1);
|
||||
|
||||
// Select "Yesterday" from the dropdown
|
||||
cy.get('#reportFilter').select('yesterday');
|
||||
|
||||
// Click on the Apply button
|
||||
cy.contains('Apply').should('be.visible').click();
|
||||
|
||||
cy.get('.chart-container').should('be.visible');
|
||||
|
||||
// Click on Tabular
|
||||
cy.contains('Tabular').should('be.visible').click();
|
||||
|
||||
// Should have media stats
|
||||
cy.get('#timeDisconnectedTbl tr:nth-child(1) td:nth-child(2)').contains('POP Display 1');
|
||||
cy.get('#timeDisconnectedTbl tr:nth-child(1) td:nth-child(3)').contains('10');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user