Skip to content

Test: Local History #145461

Closed
Closed

Description

Refs: #26339

Complexity: 5

Create Issue


Intro & Setup

Support for local history was added and here is how that works:

  • the Timeline view (below file tree in explorer) shows local history entries for the active editor
    • Note: if you have a workspace opened that is under git control, entries in the timeline will appear for both git history and local history. PLEASE DO NOT TEST GIT TIMELINE ENTRIES
    • you can exclude git entries via the filter action if you want to focus on local history
  • saving an editor adds a new entry to the local history
    • most, but not all editors participate, for testing try with text files and notebooks
  • a local history entry is a copy of the file at the time it was saved with some associated metadata

Setup: Desktop
This only applies for testers assigned to macOS, Linux or Windows.

  • focus on testing with a local folder opened
    • note that local history entries will persist in the user-data-dir/User/History folder
  • at the end of this test plan item there will be a verification step to sanity check any of our remote supports

Setup: Web
This only applies for the tester assigned to web.

Test: Timeline

  • work in text files and notebooks and verify local history entries appear as expected when you save
    • Note: the setting workbench.localHistory.mergePeriod defaults to 10s and as such distinct history entries will only appear when you wait >10s between saves
  • perform a global search and replace via search viewlet and verify the history entry indicates this via its label
  • perform a refactoring (e.g. TypeScript) and save and verify the history entry indicates this via its label
  • you can click on local history entries to compare to the current file
  • the timeline continues to show local history even when a compare editor is opened for the local history entry
    • you should never loose the timeline information when opening timeline entries or git entries
  • test all of the context menu actions on entries and verify they work as expected
  • ensure history entries are migrated and preserved when you rename a file or the parent folder of a file when entries exist for the file (this only works when renaming via explorer in VSCode)
  • ensure history entries restore when you quit and restart or reload the window
  • ensure nothing breaks severely when you tamper with the contents of the user-data-dir/User/History folder

Test: Settings

  • verify that workbench.localHistory.enabled works as expected
  • verify you can define exclude patterns via workbench.localHistory.exclude to exclude files from local history
  • verify that workbench.localHistory.maxFileSize allows to prevent history entries for larger files
  • verify that workbench.localHistory.mergePeriod works as expected
    • ⚠️ I am open for a suggestion for how to name this setting better, see discussion in slack
  • verify that workbench.localHistory.maxFileEntries discards older entries when the number of entries exceeds the value

Test: Commands (via Command Palette)

  • verify you can delete all local history entries via the "Local History: Delete All" command
  • verify you can search for a specific local history entry and open it via the "Local History: Find Entry to Restore" command

Test: Remote

  • macOS/Windows/Linux: connect to a remote and briefly test that local history works there as well. local history entries are stored inside the remote, so you can even see the history when connecting with a different device or web browser to the same remote and workspace
  • Web: use our server distro and access a workspace via browser and briefly test that local history works there as well. local history entries are stored inside the remote, so you can even see the history when connecting with a different device or desktop client to the same remote and workspace

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions