[web] recover tracked changes after going offline (#35961)

GitOrigin-RevId: 8d34eb879de91a3b348fc1230eb3ce4d532194e0
This commit is contained in:
Kristina
2026-09-17 11:41:17 +00:00
committed by Copybot
parent 1f97dbc789
commit 20027166fb
5 changed files with 171 additions and 61 deletions
@@ -263,28 +263,6 @@ describe('EditorManagerProvider docError sync modals', function () {
cy.findByText('Your offline edits couldn’t be synced').should('not.exist')
})
it('falls back to OutOfSyncModal when the backup holds tracked changes', function () {
let key: string
cy.then(() => {
setSplitTest(true)
key = plantBackup(CURRENT_DOC_ID, { trackChanges: true })
})
mount()
cy.then(() => {
currentDoc.trigger('error', new Error('forced'), {}, 'content')
})
cy.findByRole('dialog').should('exist')
cy.findByText('Your offline edits couldn’t be synced').should('not.exist')
// Tracked-change backups are not recovered, so they are left alone.
cy.then(() => {
expect(window.sessionStorage.getItem(key!)).to.not.equal(null)
})
})
it('shows UnableToSyncModal on the ide:unableToSyncOfflineChanges recovery event', function () {
let capturedEmitter: IdeEventEmitter | null = null