Skip to content

Commit 9d6ebc4

Browse files
committed
Item/test: fix text
1 parent df6b8b8 commit 9d6ebc4

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/App/Item/index.test.tsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,9 @@ test('should work edit mode toggle', () => {
9292
// double click todo text label, then enable todo text edit code
9393
fireEvent.doubleClick(getByTestId('todo-body-text'))
9494
expect(getByTestId('todo-item')).toHaveClass('editing')
95-
// @TODO in jsdom, dynamic .editing classCSSSelector doesn't apply. So tipically show/hide UI test are difficult.
95+
// @TODO in jsdom, dynamic .editing css class doesn't apply. So tipically show/hide UI test are difficult.
9696
// @ref https://spectrum.chat/testing-library/general/testing-an-accordion~b004a9b1-b104-4eb1-a73b-43c60b1a3630?m=MTU1NDQ4NDIzMTQ5Ng==
9797
//expect(getByTestId('todo-edit-input')).toBeVisible()
98-
9998
fireEvent.change(getByTestId('todo-edit-input'), {
10099
target: { value: 'cut tomato plus' }
101100
})
@@ -108,7 +107,7 @@ test('should work edit mode toggle', () => {
108107
expect(getByTestId('todo-body-text')).toHaveTextContent('cut tomato plus')
109108
// @TODO why fireEvent.keyPress() didn't work?
110109
//expect(container.querySelector('[class*="editing"]')).toBe(null)
111-
// @TODO in jsdom, dynamic .editing classCSSSelector doesn't apply. So tipically show/hide UI test are difficult.
110+
// @TODO in jsdom, dynamic .editing css class doesn't apply. So tipically show/hide UI test are difficult.
112111
// @ref https://spectrum.chat/testing-library/general/testing-an-accordion~b004a9b1-b104-4eb1-a73b-43c60b1a3630?m=MTU1NDQ4NDIzMTQ5Ng==
113112
//expect(getByTestId('todo-edit-input')).not.toBeVisible()
114113
})

0 commit comments

Comments
 (0)