mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: use excal id so every element has unique id (#3696)
* fix: use excal id so every element has unique id * fix * fix * fix * add docs * fix
This commit is contained in:
parent
69b6fbb3f4
commit
9325109836
13 changed files with 53 additions and 27 deletions
|
@ -2,12 +2,12 @@
|
|||
|
||||
exports[`<Excalidraw/> Test UIOptions prop Test canvasActions should not hide any UI element when canvasActions is "undefined" 1`] = `
|
||||
<section
|
||||
aria-labelledby="canvasActions-title"
|
||||
aria-labelledby="test-id-canvasActions-title"
|
||||
class="zen-mode-transition"
|
||||
>
|
||||
<h2
|
||||
class="visually-hidden"
|
||||
id="canvasActions-title"
|
||||
id="test-id-canvasActions-title"
|
||||
>
|
||||
Canvas actions
|
||||
</h2>
|
||||
|
@ -201,12 +201,12 @@ exports[`<Excalidraw/> Test UIOptions prop Test canvasActions should not hide an
|
|||
|
||||
exports[`<Excalidraw/> Test UIOptions prop should not hide any UI element when the UIOptions prop is "undefined" 1`] = `
|
||||
<section
|
||||
aria-labelledby="canvasActions-title"
|
||||
aria-labelledby="test-id-canvasActions-title"
|
||||
class="zen-mode-transition"
|
||||
>
|
||||
<h2
|
||||
class="visually-hidden"
|
||||
id="canvasActions-title"
|
||||
id="test-id-canvasActions-title"
|
||||
>
|
||||
Canvas actions
|
||||
</h2>
|
||||
|
|
|
@ -136,7 +136,7 @@ describe("<Excalidraw/>", () => {
|
|||
await render(<Excalidraw />);
|
||||
|
||||
const canvasActions = document.querySelector(
|
||||
'section[aria-labelledby="canvasActions-title"]',
|
||||
'section[aria-labelledby="test-id-canvasActions-title"]',
|
||||
);
|
||||
|
||||
expect(canvasActions).toMatchSnapshot();
|
||||
|
@ -145,11 +145,9 @@ describe("<Excalidraw/>", () => {
|
|||
describe("Test canvasActions", () => {
|
||||
it('should not hide any UI element when canvasActions is "undefined"', async () => {
|
||||
await render(<Excalidraw UIOptions={{}} />);
|
||||
|
||||
const canvasActions = document.querySelector(
|
||||
'section[aria-labelledby="canvasActions-title"]',
|
||||
'section[aria-labelledby="test-id-canvasActions-title"]',
|
||||
);
|
||||
|
||||
expect(canvasActions).toMatchSnapshot();
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue