From 5fb9baf3f5b47aaf1b7015ba26560218e83c98dc Mon Sep 17 00:00:00 2001 From: Felienne Hermans Date: Wed, 13 Sep 2023 15:14:03 +0200 Subject: [PATCH] [UI] removes logs and old stats page (in HTML) (#4474) removes logs and old stats page (in HTML) and corresponding tests --- templates/class-overview.html | 2 -- .../class_page/logs_button.cy.js | 21 ---------------- .../logs_page/exception_field.cy.js | 20 ---------------- .../class_page/logs_page/level_field.cy.js | 20 ---------------- .../class_page/logs_page/logs_to_class.cy.js | 23 ------------------ .../class_page/logs_page/search_button.cy.js | 16 ------------- .../class_page/statistics_button.cy.js | 21 ---------------- .../class_page/stats_page/data_buttons.cy.js | 24 ------------------- .../stats_page/stats_to_class.cy.js | 24 ------------------- 9 files changed, 171 deletions(-) delete mode 100644 tests/cypress/e2e/for-teacher_page/class_page/logs_button.cy.js delete mode 100644 tests/cypress/e2e/for-teacher_page/class_page/logs_page/exception_field.cy.js delete mode 100644 tests/cypress/e2e/for-teacher_page/class_page/logs_page/level_field.cy.js delete mode 100644 tests/cypress/e2e/for-teacher_page/class_page/logs_page/logs_to_class.cy.js delete mode 100644 tests/cypress/e2e/for-teacher_page/class_page/logs_page/search_button.cy.js delete mode 100644 tests/cypress/e2e/for-teacher_page/class_page/statistics_button.cy.js delete mode 100644 tests/cypress/e2e/for-teacher_page/class_page/stats_page/data_buttons.cy.js delete mode 100644 tests/cypress/e2e/for-teacher_page/class_page/stats_page/stats_to_class.cy.js diff --git a/templates/class-overview.html b/templates/class-overview.html index bde0d171181..2c2851f3649 100644 --- a/templates/class-overview.html +++ b/templates/class-overview.html @@ -50,8 +50,6 @@

{{ class_info.name }}

{{_('customize_class')}} {% endif %} - -
diff --git a/tests/cypress/e2e/for-teacher_page/class_page/logs_button.cy.js b/tests/cypress/e2e/for-teacher_page/class_page/logs_button.cy.js deleted file mode 100644 index 96f3cb06d85..00000000000 --- a/tests/cypress/e2e/for-teacher_page/class_page/logs_button.cy.js +++ /dev/null @@ -1,21 +0,0 @@ -import {loginForTeacher} from '../../tools/login/login.js' -import {createClass} from '../../tools/classes/class.js' - - -describe('Is able to go to logs page', () => { - it('Passes', () => { - loginForTeacher(); - cy.wait(500); - createClass(); - cy.get(".view_class").first().click(); // Press view class button - - var currentUrl = ''; - cy.url().then(url => { - currentUrl = url; - cy.get('#logs_button').click(); // Press logs button - - let statsUrl = Cypress.env('logs_page') + currentUrl.substring(currentUrl.indexOf('class/')+6); - cy.url().should('include', statsUrl); // Check if you are in the logs page - }) - }) -}) \ No newline at end of file diff --git a/tests/cypress/e2e/for-teacher_page/class_page/logs_page/exception_field.cy.js b/tests/cypress/e2e/for-teacher_page/class_page/logs_page/exception_field.cy.js deleted file mode 100644 index a0fd58ef6d7..00000000000 --- a/tests/cypress/e2e/for-teacher_page/class_page/logs_page/exception_field.cy.js +++ /dev/null @@ -1,20 +0,0 @@ -import {loginForAdmin, loginForTeacher} from '../../../tools/login/login.js' -import {createClass} from '../../../tools/classes/class.js' - - -describe('Is able to enter an exception', () => { - it('Passes', () => { - loginForTeacher(); - cy.wait(500); - createClass(); - cy.get(".view_class").first().click(); // Press view class button from test class - - cy.get('#logs_button').click(); - - cy.get('#logs-exception') - .should('be.visible') - .should('be.empty') - .type('ParseException') - .should('have.value', 'ParseException'); - }) -}) \ No newline at end of file diff --git a/tests/cypress/e2e/for-teacher_page/class_page/logs_page/level_field.cy.js b/tests/cypress/e2e/for-teacher_page/class_page/logs_page/level_field.cy.js deleted file mode 100644 index f62a111951a..00000000000 --- a/tests/cypress/e2e/for-teacher_page/class_page/logs_page/level_field.cy.js +++ /dev/null @@ -1,20 +0,0 @@ -import {loginForAdmin, loginForTeacher} from '../../../tools/login/login.js' -import {createClass} from '../../../tools/classes/class.js' - - -describe('Is able to enter a level to be searched', () => { - it('Passes', () => { - loginForTeacher(); - cy.wait(500); - createClass(); - cy.get(".view_class").first().click(); // Press view class button from test class - - cy.get('#logs_button').click(); - - cy.get('#logs-level') - .should('be.visible') - .should('be.empty') - .type('1') - .should('have.value', '1'); - }) -}) \ No newline at end of file diff --git a/tests/cypress/e2e/for-teacher_page/class_page/logs_page/logs_to_class.cy.js b/tests/cypress/e2e/for-teacher_page/class_page/logs_page/logs_to_class.cy.js deleted file mode 100644 index f8d545a732e..00000000000 --- a/tests/cypress/e2e/for-teacher_page/class_page/logs_page/logs_to_class.cy.js +++ /dev/null @@ -1,23 +0,0 @@ -import {loginForAdmin, loginForTeacher} from '../../../tools/login/login.js' -import {createClass} from '../../../tools/classes/class.js' - - -describe('Is able to go back to teacher page', () => { - it('Passes', () => { - loginForTeacher(); - cy.wait(500); - createClass(); - cy.get(".view_class").first().click(); - - var currentUrl = ''; - cy.url().then(currentUrl => { - cy.get('#logs_button').click(); // Press the logs button - - cy.wait(500); - - cy.get('#to_class_button').click(); // Press go back to class button - cy.url().should('eq', currentUrl); // Check if you go back to the correct page - }) - - }) -}) \ No newline at end of file diff --git a/tests/cypress/e2e/for-teacher_page/class_page/logs_page/search_button.cy.js b/tests/cypress/e2e/for-teacher_page/class_page/logs_page/search_button.cy.js deleted file mode 100644 index e76428d13af..00000000000 --- a/tests/cypress/e2e/for-teacher_page/class_page/logs_page/search_button.cy.js +++ /dev/null @@ -1,16 +0,0 @@ -import {loginForTeacher} from '../../../tools/login/login.js' -import {createClass} from '../../../tools/classes/class.js' - - -describe('Is able to press the search button', () => { - it('Passes', () => { - loginForTeacher(); - cy.wait(500); - createClass(); - cy.get(".view_class").first().click(); - cy.get('#logs_button').click(); - - cy.get('#search-logs-button').click(); - cy.get('#search-logs-failed-msg').should('be.visible'); - }) -}) \ No newline at end of file diff --git a/tests/cypress/e2e/for-teacher_page/class_page/statistics_button.cy.js b/tests/cypress/e2e/for-teacher_page/class_page/statistics_button.cy.js deleted file mode 100644 index d5af6f66720..00000000000 --- a/tests/cypress/e2e/for-teacher_page/class_page/statistics_button.cy.js +++ /dev/null @@ -1,21 +0,0 @@ -import {loginForTeacher} from '../../tools/login/login.js' -import {createClass} from '../../tools/classes/class.js' - - -describe('Is able to go to class statistics page', () => { - it('Passes', () => { - loginForTeacher(); - cy.wait(500); - createClass(); - cy.get(".view_class").first().click(); // Press view class button - - var currentUrl = ''; - cy.url().then(url => { - currentUrl = url; - cy.get('#stats_button').click(); // Press class statistics button - - let statsUrl = Cypress.env('stats_page') + currentUrl.substring(currentUrl.indexOf('class/')+6); - cy.url().should('include', statsUrl); // Check if you are in the statistics page - }) - }) -}) \ No newline at end of file diff --git a/tests/cypress/e2e/for-teacher_page/class_page/stats_page/data_buttons.cy.js b/tests/cypress/e2e/for-teacher_page/class_page/stats_page/data_buttons.cy.js deleted file mode 100644 index 4b18c409fcb..00000000000 --- a/tests/cypress/e2e/for-teacher_page/class_page/stats_page/data_buttons.cy.js +++ /dev/null @@ -1,24 +0,0 @@ -import {loginForAdmin, loginForTeacher} from '../../../tools/login/login.js' -import {createClass} from '../../../tools/classes/class.js' - - -describe('Is able to load data from different timelines', () => { - it('Passes', () => { - loginForTeacher(); - cy.wait(500); - createClass(); - cy.get(".view_class").first().click(); - cy.get('#stats_button').click(); - - // Test button visibility - cy.get('#this_week_button').should('be.visible'); - cy.get('#two_weeks_button').should('be.visible'); - cy.get('#four_weeks_button').should('be.visible'); - cy.get('#year_button').should('be.visible'); - - cy.get('#this_week_button').click(); - cy.get('#two_weeks_button').click(); - cy.get('#four_weeks_button').click(); - cy.get('#year_button').click(); - }) -}) \ No newline at end of file diff --git a/tests/cypress/e2e/for-teacher_page/class_page/stats_page/stats_to_class.cy.js b/tests/cypress/e2e/for-teacher_page/class_page/stats_page/stats_to_class.cy.js deleted file mode 100644 index 3b54048a1d0..00000000000 --- a/tests/cypress/e2e/for-teacher_page/class_page/stats_page/stats_to_class.cy.js +++ /dev/null @@ -1,24 +0,0 @@ -import {loginForAdmin, loginForTeacher} from '../../../tools/login/login.js' -import {createClass} from '../../../tools/classes/class.js' - - -describe('Is able to go back to teacher page', () => { - it('Passes', () => { - loginForTeacher(); - cy.wait(500); - createClass(); - cy.get(".view_class").first().click(); - - var currentUrl = ''; - cy.url().then(url => { - currentUrl = url; - cy.get('#stats_button').click(); // Press class statistics button - - cy.wait(500); - - cy.get('#to_class_button').click(); - cy.url().should('eq', currentUrl); // Check if you go back to the correct page - }) - - }) -}) \ No newline at end of file