Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ Redo the last undone action.

### Repeat

Repeats the last command. Repeats the last command.
Repeats the last command.

Navigation and non-undoable commands are ignored, so Repeat always repeats the last command that changed the thoughtspace.

Expand Down
2 changes: 1 addition & 1 deletion src/commands/repeat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { noop } from '../constants'
const repeatCommand = {
id: 'repeat',
label: 'Repeat' as const,
description: 'Repeats the last command. Repeats the last command.',
description: 'Repeats the last command.',
keyboard: { key: '.', meta: true },
// Repeat has no multicursor behavior of its own. It is resolved to the last command before multicursor handling, so the repeated command's own multicursor behavior is applied.
multicursor: false,
Expand Down
15 changes: 15 additions & 0 deletions src/components/__tests__/DesktopCommandUniverse.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { screen } from '@testing-library/react'
import { desktopCommandUniverseActionCreator as desktopCommandUniverse } from '../../actions/desktopCommandUniverse'
import createTestApp, { cleanupTestApp } from '../../test-helpers/createTestApp'
import dispatch from '../../test-helpers/dispatch'

beforeEach(createTestApp)
afterEach(cleanupTestApp)

// https://github.com/cybersemics/em/issues/6080
it('shows the Repeat description once', async () => {
await dispatch(desktopCommandUniverse())

const description = screen.getByText(/^Repeats the last command\./)
expect(description).toHaveTextContent(/^Repeats the last command\.$/)

Check failure on line 14 in src/components/__tests__/DesktopCommandUniverse.ts

View workflow job for this annotation

GitHub Actions / TDD — Unit tests

[unit] src/components/__tests__/DesktopCommandUniverse.ts > shows the Repeat description once

Error: expect(element).toHaveTextContent() Expected element to have text content: /^Repeats the last command\.$/ Received: Repeats the last command. Repeats the last command. ❯ src/components/__tests__/DesktopCommandUniverse.ts:14:23
})
Loading