mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
Merge pull request #34395 from overleaf/mj-tabs-disable-close-button
[web] Disable close tab button on last tab GitOrigin-RevId: 2d4600162696b07848311e75154d9d86aac0b315
This commit is contained in:
committed by
Copybot
parent
dedc521295
commit
748bdfd59d
@@ -463,14 +463,9 @@ describe('File Tabs', function () {
|
||||
cy.then(() => selectDoc(DOC_IDS.main))
|
||||
cy.findAllByRole('tab').should('have.length', 1)
|
||||
|
||||
// Attempt to close the only tab
|
||||
cy.findByRole('tab', { name: /main\.tex/ }).within(() => {
|
||||
cy.findByRole('button', { name: 'Close' }).click()
|
||||
cy.findByRole('button', { name: 'Close' }).should('be.disabled')
|
||||
})
|
||||
|
||||
// Tab must still exist
|
||||
cy.findByRole('tab', { name: /main\.tex/ }).should('exist')
|
||||
cy.findAllByRole('tab').should('have.length', 1)
|
||||
})
|
||||
|
||||
it('switches to an adjacent tab when closing the currently active tab', function () {
|
||||
@@ -1152,11 +1147,8 @@ describe('File Tabs', function () {
|
||||
cy.findByRole('tab', { name: /appendix\.tex/ }).should('exist')
|
||||
|
||||
cy.findByRole('tab', { name: /appendix\.tex/ }).within(() => {
|
||||
cy.findByRole('button', { name: 'Close' }).click()
|
||||
cy.findByRole('button', { name: 'Close' }).should('be.disabled')
|
||||
})
|
||||
|
||||
cy.findAllByRole('tab').should('have.length', 1)
|
||||
cy.findByRole('tab', { name: /appendix\.tex/ }).should('exist')
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user