From 047fcb65845d1d7a8904dd0e055be612bfdcf652 Mon Sep 17 00:00:00 2001 From: Julius Knorr Date: Thu, 2 Jan 2025 18:10:36 +0100 Subject: [PATCH] fix: Skip individual board caches when listing all boards Signed-off-by: Julius Knorr --- .github/workflows/integration.yml | 4 ++++ cypress/e2e/cardFeatures.js | 7 ++++--- lib/Service/BoardService.php | 8 -------- tests/integration/base-query-count.txt | 2 +- tests/integration/features/bootstrap/RequestContext.php | 2 +- 5 files changed, 10 insertions(+), 13 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index ae87ccd90..72b6c6c27 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -112,6 +112,10 @@ jobs: working-directory: apps/${{ env.APP_NAME }}/tests/integration run: ./run.sh + - name: Print log + if: always() + run: cat data/nextcloud.log + - name: Query count if: ${{ matrix.databases == 'mysql' }} uses: actions/github-script@v7 diff --git a/cypress/e2e/cardFeatures.js b/cypress/e2e/cardFeatures.js index 4e1822be2..227b992d2 100644 --- a/cypress/e2e/cardFeatures.js +++ b/cypress/e2e/cardFeatures.js @@ -108,10 +108,11 @@ describe('Card', function () { cy.get('.card:contains("Example Domain")') .should('be.visible') .click() - - cy.get('#app-sidebar-vue') - .find('h2').contains('Example Domain').should('be.visible') }) + + cy.get('.app-sidebar-header', { timeout: 10000 }) + .should('be.visible') + .find('h2').contains('Example Domain').should('be.visible') }) describe('Modal', () => { diff --git a/lib/Service/BoardService.php b/lib/Service/BoardService.php index d8547fc28..103aaec2c 100644 --- a/lib/Service/BoardService.php +++ b/lib/Service/BoardService.php @@ -95,14 +95,6 @@ class BoardService { * @return Board[] */ public function findAll(int $since = -1, bool $fullDetails = false, bool $includeArchived = true): array { - if ($this->boardsCacheFull && $fullDetails) { - return $this->boardsCacheFull; - } - - if ($this->boardsCachePartial && !$fullDetails) { - return $this->boardsCachePartial; - } - $complete = $this->getUserBoards($since, $includeArchived); return $this->enrichBoards($complete, $fullDetails); } diff --git a/tests/integration/base-query-count.txt b/tests/integration/base-query-count.txt index 75dbf2694..e2f0933cf 100644 --- a/tests/integration/base-query-count.txt +++ b/tests/integration/base-query-count.txt @@ -1 +1 @@ -70520 +71221 diff --git a/tests/integration/features/bootstrap/RequestContext.php b/tests/integration/features/bootstrap/RequestContext.php index f980ea4d4..e60ff6057 100644 --- a/tests/integration/features/bootstrap/RequestContext.php +++ b/tests/integration/features/bootstrap/RequestContext.php @@ -172,7 +172,7 @@ class RequestContext implements Context { */ public function theResponseShouldBeAListOfObjects() { $jsonResponse = $this->getResponseBodyFromJson(); - Assert::assertEquals(array_keys($jsonResponse), range(0, count($jsonResponse) - 1)); + Assert::assertEquals(range(0, count($jsonResponse) - 1), array_keys($jsonResponse)); } /**