Skip to content

Commit

Permalink
fix: Fix missing actions for empty default slot
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliusknorr committed Aug 29, 2024
1 parent c5dbd2f commit 030b57d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
6 changes: 3 additions & 3 deletions cypress/e2e/tables-favorite.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ describe('Favorite tables/views', () => {

cy.get('[data-cy="navigationViewItem"]').first().as('testView')

cy.get('@testView').parent().parent().should('contain.text', 'Tutorial')
cy.get('@testView').parent().parent().parent().should('contain.text', 'Tutorial')
cy.get('@testView').find('[aria-haspopup="menu"]').click({ force: true })

cy.intercept({ method: 'POST', url: '**/ocs/v2.php/apps/tables/api/2/favorites/*/*' }).as('favoriteViewReq')
Expand All @@ -70,14 +70,14 @@ describe('Favorite tables/views', () => {
cy.contains('Remove from favorites').click({ force: true })
cy.wait('@unfavoriteViewReq').its('response.statusCode').should('equal', 200)

cy.get('@testView').parent().parent().should('contain.text', 'Tutorial')
cy.get('@testView').parent().parent().parent().should('contain.text', 'Tutorial')
})

it('can (un)favorite views with favorited parent tables', () => {
cy.get('[data-cy="navigationViewItem"]').first().as('testView')
cy.get('[data-cy="navigationTableItem"]').first().as('tutorialTable')

cy.get('@testView').parent().parent().should('contain.text', 'Tutorial')
cy.get('@testView').parent().parent().parent().should('contain.text', 'Tutorial')
cy.get('@testView').find('[aria-haspopup="menu"]').click({ force: true })
cy.contains('Add to favorites').click({ force: true })

Expand Down
10 changes: 6 additions & 4 deletions src/modules/navigation/partials/NavigationTableItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,12 @@
{{ t('tables', 'Delete table') }}
</NcActionButton>
</template>
<NavigationViewItem v-for="view in getViews"
:key="'view'+view.id"
:view="view"
:show-share-sender="false" />
<div>
<NavigationViewItem v-for="view in getViews"
:key="'view'+view.id"
:view="view"
:show-share-sender="false" />
</div>
</NcAppNavigationItem>
</template>

Expand Down

0 comments on commit 030b57d

Please sign in to comment.