fix: controls prop causing text mismatching #57
Annotations
7 errors and 1 warning
src/code/code.test.tsx > Code > default props:
src/code/code.test.tsx#L7
Error: Snapshot `Code > default props 1` mismatched
- Expected
+ Received
@@ -15,10 +15,11 @@
}
[data-codice-editor-title] {
display: inline-block;
flex: 1 0;
text-align: center;
+ line-height: 1;
}
[data-codice-editor-controls] {
display: inline-flex;
align-self: center;
justify-self: start;
@@ -29,12 +30,12 @@
[data-codice-editor-controls-placeholder] {
width: 52px;
}
[data-codice-editor-control] {
display: flex;
- width: 11px;
+ width: 10px;
- height: 11px;
+ height: 10px;
margin: 3px;
border-radius: 50%;
background-color: var(--codice-editor-control-color);
}
</style><pre data-codice-code-content="true"><code>test</code></pre></div>"
❯ src/code/code.test.tsx:7:47
|
src/code/code.test.tsx > Code > with title:
src/code/code.test.tsx#L52
Error: Snapshot `Code > with title 1` mismatched
- Expected
+ Received
@@ -15,10 +15,11 @@
}
[data-codice-editor-title] {
display: inline-block;
flex: 1 0;
text-align: center;
+ line-height: 1;
}
[data-codice-editor-controls] {
display: inline-flex;
align-self: center;
justify-self: start;
@@ -29,12 +30,12 @@
[data-codice-editor-controls-placeholder] {
width: 52px;
}
[data-codice-editor-control] {
display: flex;
- width: 11px;
+ width: 10px;
- height: 11px;
+ height: 10px;
margin: 3px;
border-radius: 50%;
background-color: var(--codice-editor-control-color);
}
</style><div data-codice-editor-header="true"><div data-codice-editor-title="true">file.js</div></div><pre data-codice-code-content="true"><code>test</code></pre></div>"
❯ src/code/code.test.tsx:52:63
|
src/code/code.test.tsx > Code > with controls:
src/code/code.test.tsx#L97
Error: Snapshot `Code > with controls 1` mismatched
- Expected
+ Received
@@ -15,10 +15,11 @@
}
[data-codice-editor-title] {
display: inline-block;
flex: 1 0;
text-align: center;
+ line-height: 1;
}
[data-codice-editor-controls] {
display: inline-flex;
align-self: center;
justify-self: start;
@@ -29,12 +30,12 @@
[data-codice-editor-controls-placeholder] {
width: 52px;
}
[data-codice-editor-control] {
display: flex;
- width: 11px;
+ width: 10px;
- height: 11px;
+ height: 10px;
margin: 3px;
border-radius: 50%;
background-color: var(--codice-editor-control-color);
}
</style><div data-codice-editor-header="true"><div data-codice-editor-controls="true"><span data-codice-editor-control="true"></span><span data-codice-editor-control="true"></span><span data-codice-editor-control="true"></span></div><span data-codice-editor-controls-placeholder="true"></span></div><pre data-codice-code-content="true"><code>test</code></pre></div>"
❯ src/code/code.test.tsx:97:56
|
src/editor/editor.test.tsx > Code > default props:
src/editor/editor.test.tsx#L11
Error: Snapshot `Code > default props 1` mismatched
- Expected
+ Received
@@ -47,11 +47,11 @@
left: 0;
right: 0;
height: 100%;
overflow: hidden;
}
- </style><div data-codice-editor-content="true"><div data-codice-code="true"><style>
+ </style><div data-codice-editor-header="true"><div data-codice-editor-controls="true"><span data-codice-editor-control="true"></span><span data-codice-editor-control="true"></span><span data-codice-editor-control="true"></span></div><span data-codice-editor-controls-placeholder="true"></span></div><div data-codice-editor-content="true"><div data-codice-code="true"><style>
[data-codice-code] pre {
white-space: pre-wrap;
margin: 0;
}
[data-codice-code] code {
@@ -66,10 +66,11 @@
}
[data-codice-editor-title] {
display: inline-block;
flex: 1 0;
text-align: center;
+ line-height: 1;
}
[data-codice-editor-controls] {
display: inline-flex;
align-self: center;
justify-self: start;
@@ -80,12 +81,12 @@
[data-codice-editor-controls-placeholder] {
width: 52px;
}
[data-codice-editor-control] {
display: flex;
- width: 11px;
+ width: 10px;
- height: 11px;
+ height: 10px;
margin: 3px;
border-radius: 50%;
background-color: var(--codice-editor-control-color);
}
- </style><div data-codice-editor-header="true"><div data-codice-editor-controls="true"><span data-codice-editor-control="true"></span><span data-codice-editor-control="true"></span><span data-codice-editor-control="true"></span></div><span data-codice-editor-controls-placeholder="true"></span></div><pre data-codice-code-content="true"><code></code></pre></div><textarea></textarea></div></div>"
+ </style><pre data-codice-code-content="true"><code></code></pre></div><textarea></textarea></div></div>"
❯ src/editor/editor.test.tsx:11:7
|
src/editor/editor.test.tsx > Code > with title:
src/editor/editor.test.tsx#L111
Error: Snapshot `Code > with title 1` mismatched
- Expected
+ Received
@@ -47,11 +47,11 @@
left: 0;
right: 0;
height: 100%;
overflow: hidden;
}
- </style><div data-codice-editor-header="true"><div data-codice-editor-title="true">file.js</div></div><div data-codice-editor-content="true"><div data-codice-code="true"><style>
+ </style><div data-codice-editor-header="true"><div data-codice-editor-controls="true"><span data-codice-editor-control="true"></span><span data-codice-editor-control="true"></span><span data-codice-editor-control="true"></span></div><div data-codice-editor-title="true">file.js</div><span data-codice-editor-controls-placeholder="true"></span></div><div data-codice-editor-content="true"><div data-codice-code="true"><style>
[data-codice-code] pre {
white-space: pre-wrap;
margin: 0;
}
[data-codice-code] code {
@@ -66,10 +66,11 @@
}
[data-codice-editor-title] {
display: inline-block;
flex: 1 0;
text-align: center;
+ line-height: 1;
}
[data-codice-editor-controls] {
display: inline-flex;
align-self: center;
justify-self: start;
@@ -80,12 +81,12 @@
[data-codice-editor-controls-placeholder] {
width: 52px;
}
[data-codice-editor-control] {
display: flex;
- width: 11px;
+ width: 10px;
- height: 11px;
+ height: 10px;
margin: 3px;
border-radius: 50%;
background-color: var(--codice-editor-control-color);
}
- </style><div data-codice-editor-header="true"><div data-codice-editor-controls="true"><span data-codice-editor-control="true"></span><span data-codice-editor-control="true"></span><span data-codice-editor-control="true"></span></div><span data-codice-editor-controls-placeholder="true"></span></div><pre data-codice-code-content="true"><code></code></pre></div><textarea></textarea></div></div>"
+ </style><pre data-codice-code-content="true"><code></code></pre></div><textarea></textarea></div></div>"
❯ src/editor/editor.test.tsx:111:7
|
src/editor/editor.test.tsx > Code > without controls and with className:
src/editor/editor.test.tsx#L211
Error: Snapshot `Code > without controls and with className 1` mismatched
- Expected
+ Received
@@ -66,10 +66,11 @@
}
[data-codice-editor-title] {
display: inline-block;
flex: 1 0;
text-align: center;
+ line-height: 1;
}
[data-codice-editor-controls] {
display: inline-flex;
align-self: center;
justify-self: start;
@@ -80,12 +81,12 @@
[data-codice-editor-controls-placeholder] {
width: 52px;
}
[data-codice-editor-control] {
display: flex;
- width: 11px;
+ width: 10px;
- height: 11px;
+ height: 10px;
margin: 3px;
border-radius: 50%;
background-color: var(--codice-editor-control-color);
}
</style><pre data-codice-code-content="true"><code></code></pre></div><textarea></textarea></div></div>"
❯ src/editor/editor.test.tsx:211:7
|
Node 22
Process completed with exit code 1.
|
Node 22
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|