Commit 1326d1a9 authored by Lyza Danger Gardner's avatar Lyza Danger Gardner Committed by Lyza Gardner

Finish conversion of AnnotationEditor to Tailwind

parent 5baa223b
......@@ -172,7 +172,8 @@ function AnnotationEditor({
return (
/* eslint-disable-next-line jsx-a11y/no-static-element-interactions */
<div
className="hyp-u-vertical-spacing AnnotationEditor"
data-testid="annotation-editor"
className="space-y-4"
onKeyDown={onKeyDown}
>
<MarkdownEditor
......@@ -187,7 +188,6 @@ function AnnotationEditor({
onTagInput={setPendingTag}
tagList={tags}
/>
<div className="hyp-u-layout-row annotation__form-actions">
{group && (
<AnnotationPublishControl
group={group}
......@@ -198,7 +198,6 @@ function AnnotationEditor({
onSetPrivate={onSetPrivate}
/>
)}
</div>
{shouldShowLicense && <AnnotationLicense />}
</div>
);
......
......@@ -19,6 +19,8 @@ describe('AnnotationEditor', () => {
let fakeStore;
const editorSelector = '[data-testid="annotation-editor"]';
function createComponent(props = {}) {
return mount(
<AnnotationEditor
......@@ -199,7 +201,7 @@ describe('AnnotationEditor', () => {
const wrapper = createComponent({ draft });
wrapper
.find('.AnnotationEditor')
.find(editorSelector)
.simulate('keydown', { key: 'Enter', ctrlKey: true });
assert.calledOnce(fakeAnnotationsService.save);
......@@ -216,7 +218,7 @@ describe('AnnotationEditor', () => {
const wrapper = createComponent({ draft });
wrapper
.find('.AnnotationEditor')
.find(editorSelector)
.simulate('keydown', { key: 'Enter', metaKey: true });
assert.calledOnce(fakeAnnotationsService.save);
......@@ -230,7 +232,7 @@ describe('AnnotationEditor', () => {
const wrapper = createComponent();
wrapper
.find('.AnnotationEditor')
.find(editorSelector)
.simulate('keydown', { key: 'Enter', metaKey: true });
assert.notCalled(fakeAnnotationsService.save);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment