From 9447d4ba1d05f2c5907d20fef1fc036727bb6b71 Mon Sep 17 00:00:00 2001 From: jonasongg Date: Tue, 30 Jan 2024 14:16:39 +0800 Subject: [PATCH 1/8] Add show more button for error messages --- frontend/src/styles/style.scss | 14 ++++++++++++++ frontend/src/views/c-summary.vue | 14 ++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/frontend/src/styles/style.scss b/frontend/src/styles/style.scss index 5cd38a53a7..2721715292 100644 --- a/frontend/src/styles/style.scss +++ b/frontend/src/styles/style.scss @@ -201,6 +201,20 @@ header { } } + &__show-more-container { + display: flex; + justify-content: center; + margin: .5rem 0 .3rem 0; + } + + &__show-more { + border: 1.5px solid mui-color('red', '900'); + border-radius: 8px; + color: mui-color('red', '900'); + font-weight: bold; + padding: .4rem .5rem; + } + &__message { border-bottom: .1rem solid; font-weight: bolder; diff --git a/frontend/src/views/c-summary.vue b/frontend/src/views/c-summary.vue index 3ac769d57f..84ba4ac4f3 100644 --- a/frontend/src/views/c-summary.vue +++ b/frontend/src/views/c-summary.vue @@ -76,7 +76,9 @@ .error-message-box(v-if="Object.entries(errorMessages).length && !isWidgetMode") .error-message-box__close-button(v-on:click="dismissTab($event)") × .error-message-box__message The following issues occurred when analyzing the following repositories: - .error-message-box__failed-repo(v-for="errorBlock in errorMessages") + .error-message-box__failed-repo( + v-for="errorBlock in errorIsShowingMore ? errorMessages : Object.values(errorMessages).slice(0, 4)" + ) font-awesome-icon(icon="exclamation") span.error-message-box__failed-repo--name {{ errorBlock.repoName }} .error-message-box__failed-repo--reason( @@ -92,7 +94,10 @@ v-bind:href="getReportIssueEmailLink(errorBlock.errorMessage)" ) span {{ getReportIssueEmailAddress() }} - .error-message-box__failed-repo--reason(v-else) {{ errorBlock.errorMessage }} + .error-message-box__failed-repo--reason(v-else) {{ errorBlock.errorMessage }}\ + .error-message-box__show-more-container(v-if="Object.keys(errorMessages).length >= 4") + a.error-message-box__show-more(v-if="!errorIsShowingMore" v-on:click="toggleErrorShowMore()") SHOW MORE... + a.error-message-box__show-more(v-else v-on:click="toggleErrorShowMore()") SHOW LESS... .fileTypes(v-if="filterBreakdown && !isWidgetMode") .checkboxes.mui-form--inline(v-if="Object.keys(fileTypeColors).length > 0") label(style='background-color: #000000; color: #ffffff') @@ -201,6 +206,7 @@ export default defineComponent({ filterGroupSelectionWatcherFlag: false, chartGroupIndex: undefined as number | undefined, chartIndex: undefined as number | undefined, + errorIsShowingMore: false, }; }, computed: { @@ -933,6 +939,10 @@ export default defineComponent({ getFontColor(color: string) { return window.getFontColor(color); }, + + toggleErrorShowMore() { + this.errorIsShowingMore = !this.errorIsShowingMore; + }, }, }); From a727aeb9a0f5cfec219ecba0e4dfb7fa81405715 Mon Sep 17 00:00:00 2001 From: jonasongg Date: Fri, 2 Feb 2024 17:23:38 +0800 Subject: [PATCH 2/8] Fix lint errors --- frontend/src/views/c-summary.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/views/c-summary.vue b/frontend/src/views/c-summary.vue index f76b053e91..778a021125 100644 --- a/frontend/src/views/c-summary.vue +++ b/frontend/src/views/c-summary.vue @@ -96,8 +96,8 @@ span {{ getReportIssueEmailAddress() }} .error-message-box__failed-repo--reason(v-else) {{ errorBlock.errorMessage }}\ .error-message-box__show-more-container(v-if="Object.keys(errorMessages).length >= 4") - a.error-message-box__show-more(v-if="!errorIsShowingMore" v-on:click="toggleErrorShowMore()") SHOW MORE... - a.error-message-box__show-more(v-else v-on:click="toggleErrorShowMore()") SHOW LESS... + a.error-message-box__show-more(v-if="!errorIsShowingMore", v-on:click="toggleErrorShowMore()") SHOW MORE... + a.error-message-box__show-more(v-else, v-on:click="toggleErrorShowMore()") SHOW LESS... .fileTypes(v-if="filterBreakdown && !isWidgetMode") .checkboxes.mui-form--inline(v-if="Object.keys(fileTypeColors).length > 0") label(style='background-color: #000000; color: #ffffff') From 8292a05fd5a1bfb5a2638343ad6a9c15f40af104 Mon Sep 17 00:00:00 2001 From: jonasongg Date: Mon, 5 Feb 2024 12:31:40 +0800 Subject: [PATCH 3/8] Add changes to show more button --- frontend/src/styles/style.scss | 14 -------------- frontend/src/views/c-summary.vue | 13 ++++++++++--- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/frontend/src/styles/style.scss b/frontend/src/styles/style.scss index 2721715292..5cd38a53a7 100644 --- a/frontend/src/styles/style.scss +++ b/frontend/src/styles/style.scss @@ -201,20 +201,6 @@ header { } } - &__show-more-container { - display: flex; - justify-content: center; - margin: .5rem 0 .3rem 0; - } - - &__show-more { - border: 1.5px solid mui-color('red', '900'); - border-radius: 8px; - color: mui-color('red', '900'); - font-weight: bold; - padding: .4rem .5rem; - } - &__message { border-bottom: .1rem solid; font-weight: bolder; diff --git a/frontend/src/views/c-summary.vue b/frontend/src/views/c-summary.vue index 778a021125..e651679c0d 100644 --- a/frontend/src/views/c-summary.vue +++ b/frontend/src/views/c-summary.vue @@ -95,9 +95,10 @@ ) span {{ getReportIssueEmailAddress() }} .error-message-box__failed-repo--reason(v-else) {{ errorBlock.errorMessage }}\ - .error-message-box__show-more-container(v-if="Object.keys(errorMessages).length >= 4") - a.error-message-box__show-more(v-if="!errorIsShowingMore", v-on:click="toggleErrorShowMore()") SHOW MORE... - a.error-message-box__show-more(v-else, v-on:click="toggleErrorShowMore()") SHOW LESS... + .error-message-box__show-more-container(v-if="Object.keys(errorMessages).length > 4") + span(v-if="!errorIsShowingMore") Remaining error messages omitted to save space.  + a(v-if="!errorIsShowingMore", v-on:click="toggleErrorShowMore()") SHOW ALL... + a(v-else, v-on:click="toggleErrorShowMore()") SHOW LESS... .fileTypes(v-if="filterBreakdown && !isWidgetMode") .checkboxes.mui-form--inline(v-if="Object.keys(fileTypeColors).length > 0") label(style='background-color: #000000; color: #ffffff') @@ -951,4 +952,10 @@ export default defineComponent({ From ea57328e19f0ee4abad1c8dea054b4bf138c09a5 Mon Sep 17 00:00:00 2001 From: jonasongg Date: Thu, 15 Feb 2024 14:22:40 +0800 Subject: [PATCH 4/8] Add tests for show more button --- frontend/cypress/config/repo-config.csv | 4 ++++ .../chartView_errorSummary_messageBox.cy.js | 20 +++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/frontend/cypress/config/repo-config.csv b/frontend/cypress/config/repo-config.csv index 5edbcc27b6..b68a7d5c13 100644 --- a/frontend/cypress/config/repo-config.csv +++ b/frontend/cypress/config/repo-config.csv @@ -1,3 +1,7 @@ Repository's Location,Branch,File formats,Ignore Glob List,Ignore standalone config,Ignore Commits List,Ignore Authors List,Shallow Cloning,Find Previous Authors https://github.com/reposense/RepoSense.git,cypress,,,,,,, https://github.com/reposense/testrepo-Empty.git,master,,,,,,, +https://github.com/reposense/testrepo-Empty2.git,master,,,,,,, +https://github.com/reposense/testrepo-Empty3.git,master,,,,,,, +https://github.com/reposense/testrepo-Empty4.git,master,,,,,,, +https://github.com/reposense/testrepo-Empty5.git,master,,,,,,, \ No newline at end of file diff --git a/frontend/cypress/tests/chartView/chartView_errorSummary_messageBox.cy.js b/frontend/cypress/tests/chartView/chartView_errorSummary_messageBox.cy.js index e961fc72fc..9ed4a8c071 100644 --- a/frontend/cypress/tests/chartView/chartView_errorSummary_messageBox.cy.js +++ b/frontend/cypress/tests/chartView/chartView_errorSummary_messageBox.cy.js @@ -27,4 +27,24 @@ describe('error summary', () => { cy.get('.error-message-box') .should('not.be.visible'); }); + + it('number of error messages', () => { + cy.get('.error-message-box') + .find('.error-message-box__failed-repo') + .should('have.length', 4); + + cy.get('.error-message-box__show-more-container > a') + .click(); + + cy.get('.error-message-box') + .find('.error-message-box__failed-repo') + .should('have.length', 5); + + cy.get('.error-message-box__show-more-container > a') + .click(); + + cy.get('.error-message-box') + .find('.error-message-box__failed-repo') + .should('have.length', 4); + }); }); From 813e4a4184e1910c17ce303c2bf5884617d9dd82 Mon Sep 17 00:00:00 2001 From: jonasongg Date: Thu, 15 Feb 2024 14:24:34 +0800 Subject: [PATCH 5/8] Add newline for repo-config.csv --- frontend/cypress/config/repo-config.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/cypress/config/repo-config.csv b/frontend/cypress/config/repo-config.csv index b68a7d5c13..2766cf6f7d 100644 --- a/frontend/cypress/config/repo-config.csv +++ b/frontend/cypress/config/repo-config.csv @@ -4,4 +4,4 @@ https://github.com/reposense/testrepo-Empty.git,master,,,,,,, https://github.com/reposense/testrepo-Empty2.git,master,,,,,,, https://github.com/reposense/testrepo-Empty3.git,master,,,,,,, https://github.com/reposense/testrepo-Empty4.git,master,,,,,,, -https://github.com/reposense/testrepo-Empty5.git,master,,,,,,, \ No newline at end of file +https://github.com/reposense/testrepo-Empty5.git,master,,,,,,, From 483d01d2819727674f934d0f46a6d244104f57c3 Mon Sep 17 00:00:00 2001 From: jonasongg Date: Sat, 17 Feb 2024 14:26:27 +0800 Subject: [PATCH 6/8] Change title of error message show more test --- .../tests/chartView/chartView_errorSummary_messageBox.cy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/cypress/tests/chartView/chartView_errorSummary_messageBox.cy.js b/frontend/cypress/tests/chartView/chartView_errorSummary_messageBox.cy.js index 9ed4a8c071..3d97ba254f 100644 --- a/frontend/cypress/tests/chartView/chartView_errorSummary_messageBox.cy.js +++ b/frontend/cypress/tests/chartView/chartView_errorSummary_messageBox.cy.js @@ -28,7 +28,7 @@ describe('error summary', () => { .should('not.be.visible'); }); - it('number of error messages', () => { + it('can be expanded and collapsed if count > 4', () => { cy.get('.error-message-box') .find('.error-message-box__failed-repo') .should('have.length', 4); From 0a32fbeda10307dc891e55ae9e7e7a520695a86d Mon Sep 17 00:00:00 2001 From: jonasongg Date: Sat, 17 Feb 2024 19:55:35 +0800 Subject: [PATCH 7/8] Add numberOfErrorMessagesToShow variable --- frontend/src/views/c-summary.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/src/views/c-summary.vue b/frontend/src/views/c-summary.vue index e651679c0d..68751dfd92 100644 --- a/frontend/src/views/c-summary.vue +++ b/frontend/src/views/c-summary.vue @@ -77,7 +77,9 @@ .error-message-box__close-button(v-on:click="dismissTab($event)") × .error-message-box__message The following issues occurred when analyzing the following repositories: .error-message-box__failed-repo( - v-for="errorBlock in errorIsShowingMore ? errorMessages : Object.values(errorMessages).slice(0, 4)" + v-for="errorBlock in errorIsShowingMore\ + ? errorMessages\ + : Object.values(errorMessages).slice(0, numberOfErrorMessagesToShow)" ) font-awesome-icon(icon="exclamation") span.error-message-box__failed-repo--name {{ errorBlock.repoName }} @@ -95,7 +97,7 @@ ) span {{ getReportIssueEmailAddress() }} .error-message-box__failed-repo--reason(v-else) {{ errorBlock.errorMessage }}\ - .error-message-box__show-more-container(v-if="Object.keys(errorMessages).length > 4") + .error-message-box__show-more-container(v-if="Object.keys(errorMessages).length > numberOfErrorMessagesToShow") span(v-if="!errorIsShowingMore") Remaining error messages omitted to save space.  a(v-if="!errorIsShowingMore", v-on:click="toggleErrorShowMore()") SHOW ALL... a(v-else, v-on:click="toggleErrorShowMore()") SHOW LESS... @@ -208,6 +210,7 @@ export default defineComponent({ chartGroupIndex: undefined as number | undefined, chartIndex: undefined as number | undefined, errorIsShowingMore: false, + numberOfErrorMessagesToShow: 4, }; }, computed: { From 3ba331e558e6ef7b4b554275c5f377d2a827442e Mon Sep 17 00:00:00 2001 From: jonasongg Date: Mon, 11 Mar 2024 13:41:51 +0800 Subject: [PATCH 8/8] Fix tests due to error messages box --- .../chartView/chartView_zoomFeature.cy.js | 14 +++++++------- frontend/cypress/tests/codeView/codeView.cy.js | 2 +- .../codeView/codeView_checkFileTypes.cy.js | 6 +++--- .../tests/codeView/codeView_filterGlob.cy.js | 18 +++++++++--------- .../codeView/codeView_hideFileDetails.cy.js | 10 +++++----- .../codeView/codeView_mergeGroupBlame.cy.js | 18 +++++++++--------- .../tests/codeView/codeView_reload.cy.js | 2 +- .../codeView/codeView_renderFilterHash.cy.js | 6 +++--- .../codeView/codeView_switchAuthorship.cy.js | 6 +++--- .../tests/zoomView/zoomView_diffstat.cy.js | 8 ++++---- .../zoomView/zoomView_hideCommitMessages.cy.js | 14 +++++++------- .../tests/zoomView/zoomView_mergeCommits.cy.js | 4 ++-- ...w_rampChart.js => zoomView_rampChart.cy.js} | 18 +++++++++--------- .../tests/zoomView/zoomView_reload.cy.js | 2 +- .../zoomView/zoomView_selectFileTypes.cy.js | 10 +++++----- .../tests/zoomView/zoomView_switchZoom.cy.js | 6 +++--- 16 files changed, 72 insertions(+), 72 deletions(-) rename frontend/cypress/tests/zoomView/{zoomView_rampChart.js => zoomView_rampChart.cy.js} (97%) diff --git a/frontend/cypress/tests/chartView/chartView_zoomFeature.cy.js b/frontend/cypress/tests/chartView/chartView_zoomFeature.cy.js index 4bb5e03a0b..e3abafacb2 100644 --- a/frontend/cypress/tests/chartView/chartView_zoomFeature.cy.js +++ b/frontend/cypress/tests/chartView/chartView_zoomFeature.cy.js @@ -8,7 +8,7 @@ describe('zoom features in code view', () => { const zoomKey = Cypress.platform === 'darwin' ? '{meta}' : '{ctrl}'; it('click on view commits button', () => { cy.get('.icon-button.fa-list-ul') - .should('be.visible') + .should('exist') .first() .click(); @@ -57,7 +57,7 @@ describe('date changes in chart view should reflect in zoom', () => { .type('2018-06-11'); cy.get('.icon-button.fa-list-ul') - .should('be.visible') + .should('exist') .first() .click(); @@ -84,7 +84,7 @@ describe('date changes in chart view should reflect in zoom', () => { .type('2018-05-20'); cy.get('.icon-button.fa-list-ul') - .should('be.visible') + .should('exist') .first() .click(); @@ -112,7 +112,7 @@ describe('date changes in chart view should reflect in zoom', () => { .type('2019-08-19'); cy.get('.icon-button.fa-list-ul') - .should('be.visible') + .should('exist') .first() .click(); @@ -140,7 +140,7 @@ describe('date changes in chart view should reflect in zoom', () => { .type('2018-07-20'); cy.get('.icon-button.fa-list-ul') - .should('be.visible') + .should('exist') .first() .click(); @@ -171,7 +171,7 @@ describe('date changes in chart view should reflect in zoom', () => { .type('2019-03-09'); cy.get('.icon-button.fa-list-ul') - .should('be.visible') + .should('exist') .first() .click(); @@ -212,7 +212,7 @@ describe('date changes in chart view should reflect in zoom', () => { .type('2019-08-01'); cy.get('.icon-button.fa-list-ul') - .should('be.visible') + .should('exist') .first() .click(); diff --git a/frontend/cypress/tests/codeView/codeView.cy.js b/frontend/cypress/tests/codeView/codeView.cy.js index 2398935767..777e93e8ec 100644 --- a/frontend/cypress/tests/codeView/codeView.cy.js +++ b/frontend/cypress/tests/codeView/codeView.cy.js @@ -34,7 +34,7 @@ describe('code view', () => { .should('be.checked'); cy.get('.icon-button.fa-code') - .should('be.visible') + .should('exist') .first() .click(); diff --git a/frontend/cypress/tests/codeView/codeView_checkFileTypes.cy.js b/frontend/cypress/tests/codeView/codeView_checkFileTypes.cy.js index 78a5d77cb4..f72dbcf960 100644 --- a/frontend/cypress/tests/codeView/codeView_checkFileTypes.cy.js +++ b/frontend/cypress/tests/codeView/codeView_checkFileTypes.cy.js @@ -2,7 +2,7 @@ describe('check file types', () => { it('check if all files types are visible by default', () => { // open the code panel cy.get('.icon-button.fa-code') - .should('be.visible') + .should('exist') .first() .click(); @@ -16,7 +16,7 @@ describe('check file types', () => { it('uncheck all files types should show no files', () => { // open the code panel cy.get('.icon-button.fa-code') - .should('be.visible') + .should('exist') .first() .click(); @@ -34,7 +34,7 @@ describe('check file types', () => { it('uncheck file type should uncheck all option and not show legend', () => { // open the code panel cy.get('.icon-button.fa-code') - .should('be.visible') + .should('exist') .first() .click(); diff --git a/frontend/cypress/tests/codeView/codeView_filterGlob.cy.js b/frontend/cypress/tests/codeView/codeView_filterGlob.cy.js index 2b36ca439f..b975f893ad 100644 --- a/frontend/cypress/tests/codeView/codeView_filterGlob.cy.js +++ b/frontend/cypress/tests/codeView/codeView_filterGlob.cy.js @@ -2,7 +2,7 @@ describe('filter glob', () => { it('check filter glob radio button is clickable', () => { // open the code panel cy.get('.icon-button.fa-code') - .should('be.visible') + .should('exist') .first() .click(); @@ -18,7 +18,7 @@ describe('filter glob', () => { it('check no filter glob input should show all file types by default', () => { cy.get('.icon-button.fa-code') - .should('be.visible') + .should('exist') .first() .click(); @@ -33,7 +33,7 @@ describe('filter glob', () => { it('check filter glob input should be in focus after click', () => { cy.get('.icon-button.fa-code') - .should('be.visible') + .should('exist') .first() .click(); @@ -49,7 +49,7 @@ describe('filter glob', () => { it('check filter glob input should have default empty value', () => { cy.get('.icon-button.fa-code') - .should('be.visible') + .should('exist') .first() .click(); @@ -63,7 +63,7 @@ describe('filter glob', () => { it('check deleting previously searched input to filter empty input by enter should show all file types', () => { cy.get('.icon-button.fa-code') - .should('be.visible') + .should('exist') .first() .click(); @@ -93,7 +93,7 @@ describe('filter glob', () => { it('check deleting previously searched input to filter empty input by clicking should show all file types', () => { cy.get('.icon-button.fa-code') - .should('be.visible') + .should('exist') .first() .click(); @@ -120,7 +120,7 @@ describe('filter glob', () => { it('check request to filter invalid glob by enter should not show any files', () => { cy.get('.icon-button.fa-code') - .should('be.visible') + .should('exist') .first() .click(); @@ -144,7 +144,7 @@ describe('filter glob', () => { it('check request to filter invalid glob by clicking should not show any files', () => { cy.get('.icon-button.fa-code') - .should('be.visible') + .should('exist') .first() .click(); @@ -167,7 +167,7 @@ describe('filter glob', () => { it('check filter glob should only show files with that extension', () => { cy.get('.icon-button.fa-code') - .should('be.visible') + .should('exist') .first() .click(); diff --git a/frontend/cypress/tests/codeView/codeView_hideFileDetails.cy.js b/frontend/cypress/tests/codeView/codeView_hideFileDetails.cy.js index c515a997c0..9353f5a36d 100644 --- a/frontend/cypress/tests/codeView/codeView_hideFileDetails.cy.js +++ b/frontend/cypress/tests/codeView/codeView_hideFileDetails.cy.js @@ -2,7 +2,7 @@ describe('hide all file details', () => { it('check hide all file details hides the content of all the files', () => { // open the code panel cy.get('.icon-button.fa-code') - .should('be.visible') + .should('exist') .first() .click(); @@ -28,7 +28,7 @@ describe('hide all file details', () => { it('check details of one file are shown, rest are hidden', () => { cy.get('.icon-button.fa-code') - .should('be.visible') + .should('exist') .first() .click(); @@ -68,7 +68,7 @@ describe('hide all file details', () => { it('check file can be hidden after scrolling', () => { cy.get('.icon-button.fa-code') - .should('be.visible') + .should('exist') .first() .click(); @@ -119,7 +119,7 @@ describe('hide all file details', () => { it('check show all file details shows the content of all the files', () => { cy.get('.icon-button.fa-code') - .should('be.visible') + .should('exist') .first() .click(); @@ -148,7 +148,7 @@ describe('hide all file details', () => { it('check collapsed file persists after sort', () => { cy.get('.icon-button.fa-code') - .should('be.visible') + .should('exist') .first() .click(); diff --git a/frontend/cypress/tests/codeView/codeView_mergeGroupBlame.cy.js b/frontend/cypress/tests/codeView/codeView_mergeGroupBlame.cy.js index 1a911245d6..4c2bdbfedd 100644 --- a/frontend/cypress/tests/codeView/codeView_mergeGroupBlame.cy.js +++ b/frontend/cypress/tests/codeView/codeView_mergeGroupBlame.cy.js @@ -2,7 +2,7 @@ describe('merge group blame in code view', () => { it('no author breakdown shown by default', () => { // open the code panel cy.get('.icon-button.fa-code') - .should('be.visible') + .should('exist') .first() .click(); @@ -28,7 +28,7 @@ describe('merge group blame in code view', () => { // open the code panel cy.get('.icon-button.fa-code') - .should('be.visible') + .should('exist') .first() .click(); @@ -54,7 +54,7 @@ describe('merge group blame in code view', () => { // open the code panel cy.get('.icon-button.fa-code') - .should('be.visible') + .should('exist') .first() .click(); @@ -81,7 +81,7 @@ describe('merge group blame in code view', () => { // open the code panel cy.get('.icon-button.fa-code') - .should('be.visible') + .should('exist') .first() .click(); @@ -109,7 +109,7 @@ describe('merge group blame in code view', () => { // open the code panel cy.get('.icon-button.fa-code') - .should('be.visible') + .should('exist') .first() .click(); @@ -137,7 +137,7 @@ describe('merge group blame in code view', () => { // open the code panel cy.get('.icon-button.fa-code') - .should('be.visible') + .should('exist') .first() .click(); @@ -162,7 +162,7 @@ describe('merge group blame in code view', () => { // open the code panel cy.get('.icon-button.fa-code') - .should('be.visible') + .should('exist') .first() .click(); @@ -186,7 +186,7 @@ describe('merge group blame in code view', () => { // open the code panel cy.get('.icon-button.fa-code') - .should('be.visible') + .should('exist') .first() .click(); @@ -219,7 +219,7 @@ describe('merge group blame in code view', () => { // open the code panel cy.get('.icon-button.fa-code') - .should('be.visible') + .should('exist') .first() .click(); diff --git a/frontend/cypress/tests/codeView/codeView_reload.cy.js b/frontend/cypress/tests/codeView/codeView_reload.cy.js index 6bda124e8c..8076d3e3d7 100644 --- a/frontend/cypress/tests/codeView/codeView_reload.cy.js +++ b/frontend/cypress/tests/codeView/codeView_reload.cy.js @@ -2,7 +2,7 @@ describe('reload page', () => { it('reload page should restore all controls', () => { // open the code panel cy.get('.icon-button.fa-code') - .should('be.visible') + .should('exist') .first() .click(); diff --git a/frontend/cypress/tests/codeView/codeView_renderFilterHash.cy.js b/frontend/cypress/tests/codeView/codeView_renderFilterHash.cy.js index ec2c91e869..c42998b856 100644 --- a/frontend/cypress/tests/codeView/codeView_renderFilterHash.cy.js +++ b/frontend/cypress/tests/codeView/codeView_renderFilterHash.cy.js @@ -371,7 +371,7 @@ describe('render filter hash', () => { it('code panel: sort by: url params should persist after change and reload', () => { // open the code panel cy.get('.icon-button.fa-code') - .should('be.visible') + .should('exist') .first() .click(); @@ -416,7 +416,7 @@ describe('render filter hash', () => { it('code panel: order: url params should persist after change and reload', () => { // open the code panel cy.get('.icon-button.fa-code') - .should('be.visible') + .should('exist') .first() .click(); @@ -462,7 +462,7 @@ describe('render filter hash', () => { it('code panel: filter by glob: url params should persist after change and reload', () => { // open the code panel cy.get('.icon-button.fa-code') - .should('be.visible') + .should('exist') .first() .click(); diff --git a/frontend/cypress/tests/codeView/codeView_switchAuthorship.cy.js b/frontend/cypress/tests/codeView/codeView_switchAuthorship.cy.js index c4bf724d09..d9667eee02 100644 --- a/frontend/cypress/tests/codeView/codeView_switchAuthorship.cy.js +++ b/frontend/cypress/tests/codeView/codeView_switchAuthorship.cy.js @@ -2,7 +2,7 @@ describe('switch authorship', () => { it('switch authorship view should restore all default controls', () => { // open the code panel cy.get('.icon-button.fa-code') - .should('be.visible') + .should('exist') .first() .click(); @@ -23,7 +23,7 @@ describe('switch authorship', () => { // switch authorship view cy.get('.icon-button.fa-code') - .should('be.visible') + .should('exist') .last() .click(); @@ -63,7 +63,7 @@ describe('switch authorship', () => { // open the first code panel cy.get('#summary-charts > .summary-charts') - .should('be.visible') + .should('exist') .first() .find('.fa-code') .first() diff --git a/frontend/cypress/tests/zoomView/zoomView_diffstat.cy.js b/frontend/cypress/tests/zoomView/zoomView_diffstat.cy.js index a9fba561cd..b9d4bcd48f 100644 --- a/frontend/cypress/tests/zoomView/zoomView_diffstat.cy.js +++ b/frontend/cypress/tests/zoomView/zoomView_diffstat.cy.js @@ -1,7 +1,7 @@ describe('diffstat', () => { it('should render container for contribution bars', () => { cy.get('.icon-button.fa-list-ul') - .should('be.visible') + .should('exist') .first() .click(); @@ -13,7 +13,7 @@ describe('diffstat', () => { // `README: Fix grammatical error` with 1 insertion and 1 deletion. it('should render non-empty contribution bars for commits with changes', () => { cy.get('.icon-button.fa-list-ul') - .should('be.visible') + .should('exist') .first() .click(); @@ -35,7 +35,7 @@ describe('diffstat', () => { // `Merge branch 'new-branch` into cypress` with 0 insertions and 0 deletions. it('should render empty contribution bars for commits with no changes', () => { cy.get('.icon-button.fa-list-ul') - .should('be.visible') + .should('exist') .first() .click(); @@ -55,7 +55,7 @@ describe('diffstat', () => { it('should render contribution bars in proportion', () => { cy.get('.icon-button.fa-list-ul') - .should('be.visible') + .should('exist') .first() .click(); diff --git a/frontend/cypress/tests/zoomView/zoomView_hideCommitMessages.cy.js b/frontend/cypress/tests/zoomView/zoomView_hideCommitMessages.cy.js index 116be8884f..907d5cd38d 100644 --- a/frontend/cypress/tests/zoomView/zoomView_hideCommitMessages.cy.js +++ b/frontend/cypress/tests/zoomView/zoomView_hideCommitMessages.cy.js @@ -2,7 +2,7 @@ describe('hide all commit messages ', () => { it('check hide all commit messages hides the commit messages', () => { // open the commit panel cy.get('.icon-button.fa-list-ul') - .should('be.visible') + .should('exist') .first() .click(); @@ -29,7 +29,7 @@ describe('hide all commit messages ', () => { it('check show all commit messages show the commit messages', () => { // open the commit panel cy.get('.icon-button.fa-list-ul') - .should('be.visible') + .should('exist') .first() .click(); @@ -57,7 +57,7 @@ describe('hide all commit messages ', () => { it('should only display hide all commit messages when none are hidden', () => { // open the commit panel cy.get('.icon-button.fa-list-ul') - .should('be.visible') + .should('exist') .first() .click(); @@ -76,7 +76,7 @@ describe('hide all commit messages ', () => { it('should only display show all commit messages when all are hidden', () => { // open the commit panel cy.get('.icon-button.fa-list-ul') - .should('be.visible') + .should('exist') .first() .click(); @@ -99,7 +99,7 @@ describe('hide all commit messages ', () => { it('should display both show and hide all commit messages when some are hidden', () => { // open the commit panel cy.get('.icon-button.fa-list-ul') - .should('be.visible') + .should('exist') .first() .click(); @@ -130,7 +130,7 @@ describe('hide all commit messages ', () => { // Assumptions: the fifth commit (19e3294) of the first author of the first repo // contains changes in only .java files. cy.get('.icon-button.fa-list-ul') - .should('be.visible') + .should('exist') .first() .click(); @@ -191,7 +191,7 @@ describe('hide all commit messages ', () => { it('check hidden commit message persists after sort', () => { cy.get('.icon-button.fa-list-ul') - .should('be.visible') + .should('exist') .first() .click(); diff --git a/frontend/cypress/tests/zoomView/zoomView_mergeCommits.cy.js b/frontend/cypress/tests/zoomView/zoomView_mergeCommits.cy.js index 1395c056a7..7847b44f5c 100644 --- a/frontend/cypress/tests/zoomView/zoomView_mergeCommits.cy.js +++ b/frontend/cypress/tests/zoomView/zoomView_mergeCommits.cy.js @@ -2,7 +2,7 @@ describe('include merge commits in zoom view', () => { it('show merge commits when all file types selected', () => { // open the commits panel cy.get('.icon-button.fa-list-ul') - .should('be.visible') + .should('exist') .first() .click(); @@ -14,7 +14,7 @@ describe('include merge commits in zoom view', () => { it('hide merge commits when some file types unselected', () => { // open the commits panel cy.get('.icon-button.fa-list-ul') - .should('be.visible') + .should('exist') .first() .click(); diff --git a/frontend/cypress/tests/zoomView/zoomView_rampChart.js b/frontend/cypress/tests/zoomView/zoomView_rampChart.cy.js similarity index 97% rename from frontend/cypress/tests/zoomView/zoomView_rampChart.js rename to frontend/cypress/tests/zoomView/zoomView_rampChart.cy.js index 82d29bcbba..edd50611d6 100644 --- a/frontend/cypress/tests/zoomView/zoomView_rampChart.js +++ b/frontend/cypress/tests/zoomView/zoomView_rampChart.cy.js @@ -4,7 +4,7 @@ describe('show ramp chart for period', () => { it('show ramp chart for all commits by default', () => { // open the commit panel cy.get('.icon-button.fa-list-ul') - .should('be.visible') + .should('exist') .first() .click(); @@ -33,7 +33,7 @@ describe('show ramp chart for period', () => { // open the commit panel cy.get('.icon-button.fa-list-ul') - .should('be.visible') + .should('exist') .first() .click(); @@ -90,7 +90,7 @@ describe('show ramp chart for period', () => { // open the commit panel cy.get('.icon-button.fa-list-ul') - .should('be.visible') + .should('exist') .first() .click(); @@ -116,7 +116,7 @@ describe('show ramp chart for period', () => { // open the commit panel cy.get('.icon-button.fa-list-ul') - .should('be.visible') + .should('exist') .first() .click(); @@ -144,7 +144,7 @@ describe('show ramp chart for period', () => { // open the commit panel cy.get('.icon-button.fa-list-ul') - .should('be.visible') + .should('exist') .eq(1) .click(); @@ -165,7 +165,7 @@ describe('show ramp chart for period', () => { // open the commit panel cy.get('.icon-button.fa-list-ul') - .should('be.visible') + .should('exist') .first() .click(); @@ -192,7 +192,7 @@ describe('show ramp chart for period', () => { // open the commit panel cy.get('.icon-button.fa-list-ul') - .should('be.visible') + .should('exist') .first() .click(); @@ -236,7 +236,7 @@ describe('show ramp chart for period', () => { // open the commit panel cy.get('.icon-button.fa-list-ul') - .should('be.visible') + .should('exist') .first() .click(); @@ -280,7 +280,7 @@ describe('show ramp chart for period', () => { // open the commit panel cy.get('.icon-button.fa-list-ul') - .should('be.visible') + .should('exist') .first() .click(); diff --git a/frontend/cypress/tests/zoomView/zoomView_reload.cy.js b/frontend/cypress/tests/zoomView/zoomView_reload.cy.js index 2b71d22d7c..a1173bd772 100644 --- a/frontend/cypress/tests/zoomView/zoomView_reload.cy.js +++ b/frontend/cypress/tests/zoomView/zoomView_reload.cy.js @@ -2,7 +2,7 @@ describe('reload page', () => { it('reload page should restore all controls', () => { // open the commit panel cy.get('.icon-button.fa-list-ul') - .should('be.visible') + .should('exist') .first() .click(); diff --git a/frontend/cypress/tests/zoomView/zoomView_selectFileTypes.cy.js b/frontend/cypress/tests/zoomView/zoomView_selectFileTypes.cy.js index 3a836cd90e..faff44df60 100644 --- a/frontend/cypress/tests/zoomView/zoomView_selectFileTypes.cy.js +++ b/frontend/cypress/tests/zoomView/zoomView_selectFileTypes.cy.js @@ -1,7 +1,7 @@ describe('check file types ', () => { it('check if all file types are visible by default', () => { cy.get('.icon-button.fa-list-ul') - .should('be.visible') + .should('exist') .first() .click(); @@ -14,7 +14,7 @@ describe('check file types ', () => { it('uncheck all file types should show no files', () => { cy.get('.icon-button.fa-list-ul') - .should('be.visible') + .should('exist') .first() .click(); @@ -32,7 +32,7 @@ describe('check file types ', () => { // Assumptions: the first author of the first repo // committed .java, .js and .gradle files. cy.get('.icon-button.fa-list-ul') - .should('be.visible') + .should('exist') .first() .click(); @@ -52,7 +52,7 @@ describe('check file types ', () => { // Assumptions: the third commit (19e3294) of the first author of the first repo // contains changes in only .java files. cy.get('.icon-button.fa-list-ul') - .should('be.visible') + .should('exist') .first() .click(); @@ -77,7 +77,7 @@ describe('check file types ', () => { // Assumptions: the eighth commit (5ab0322) of the first author of the first repo // contains changes in both .java and .md files. cy.get('.icon-button.fa-list-ul') - .should('be.visible') + .should('exist') .first() .click(); diff --git a/frontend/cypress/tests/zoomView/zoomView_switchZoom.cy.js b/frontend/cypress/tests/zoomView/zoomView_switchZoom.cy.js index 00127f933b..2ffa7eb383 100644 --- a/frontend/cypress/tests/zoomView/zoomView_switchZoom.cy.js +++ b/frontend/cypress/tests/zoomView/zoomView_switchZoom.cy.js @@ -2,7 +2,7 @@ describe('switch zoom', () => { it('switch zoom view should restore all default controls', () => { // open the commit panel cy.get('.icon-button.fa-list-ul') - .should('be.visible') + .should('exist') .first() .click(); @@ -23,7 +23,7 @@ describe('switch zoom', () => { // switch zoom view cy.get('.icon-button.fa-list-ul') - .should('be.visible') + .should('exist') .last() .click(); @@ -65,7 +65,7 @@ describe('switch zoom', () => { // open the commit panel cy.get('#summary-charts > .summary-charts') - .should('be.visible') + .should('exist') .first() .find('.fa-list-ul') .first()