Skip to content

Commit

Permalink
fix(tests): update snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrobonamin committed Nov 2, 2023
1 parent 4cdeb66 commit b19899e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/sanity/src/core/studio/Studio.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@ describe('Studio', () => {
const sheet = new ServerStyleSheet()
try {
const html = renderToStaticMarkup(sheet.collectStyles(<Studio config={config} />))

expect(html).toMatchInlineSnapshot(
`"<div data-ui=\\"Flex\\" data-scheme=\\"light\\" data-tone=\\"default\\" class=\\"sc-jXbUNg bbOBvc sc-dLMFU bVnOTN sc-jXbUNg gwUwPO sc-jlZhew blWHRn\\"><div data-ui=\\"Text\\" class=\\"sc-aXZVg fsTqmC\\"><span>Loading…</span></div><div data-ui=\\"Spinner\\" class=\\"sc-aXZVg fsTqmC sc-cwHptR hNIzxo\\"><span><svg data-sanity-icon=\\"spinner\\" width=\\"1em\\" height=\\"1em\\" viewBox=\\"0 0 25 25\\" fill=\\"none\\" xmlns=\\"http://www.w3.org/2000/svg\\"><path d=\\"M4.5 12.5C4.5 16.9183 8.08172 20.5 12.5 20.5C16.9183 20.5 20.5 16.9183 20.5 12.5C20.5 8.08172 16.9183 4.5 12.5 4.5\\" stroke=\\"currentColor\\" stroke-width=\\"1.2\\" stroke-linejoin=\\"round\\"></path></svg></span></div></div>"`,
`"<div data-ui=\\"Flex\\" data-scheme=\\"light\\" data-tone=\\"default\\" class=\\"sc-jXbUNg bbOBvc sc-jEACwC icLxTH sc-jXbUNg gwUwPO sc-kpDqfm byEEoI\\"><div data-ui=\\"Text\\" class=\\"sc-aXZVg fsTqmC\\"><span>Loading…</span></div><div data-ui=\\"Spinner\\" class=\\"sc-aXZVg fsTqmC sc-dAlyuH hFIkQL\\"><span><svg data-sanity-icon=\\"spinner\\" width=\\"1em\\" height=\\"1em\\" viewBox=\\"0 0 25 25\\" fill=\\"none\\" xmlns=\\"http://www.w3.org/2000/svg\\"><path d=\\"M4.5 12.5C4.5 16.9183 8.08172 20.5 12.5 20.5C16.9183 20.5 20.5 16.9183 20.5 12.5C20.5 8.08172 16.9183 4.5 12.5 4.5\\" stroke=\\"currentColor\\" stroke-width=\\"1.2\\" stroke-linejoin=\\"round\\"></path></svg></span></div></div>"`,
)
} finally {
sheet.seal()
Expand All @@ -62,7 +61,7 @@ describe('Studio', () => {
try {
const html = renderToString(sheet.collectStyles(<Studio config={config} />))
expect(html).toMatchInlineSnapshot(
`"<div data-ui=\\"Flex\\" data-scheme=\\"light\\" data-tone=\\"default\\" class=\\"sc-jXbUNg bbOBvc sc-dLMFU bVnOTN sc-jXbUNg gwUwPO sc-jlZhew blWHRn\\"><div data-ui=\\"Text\\" class=\\"sc-aXZVg fsTqmC\\"><span>Loading…</span></div><div data-ui=\\"Spinner\\" class=\\"sc-aXZVg fsTqmC sc-cwHptR hNIzxo\\"><span><svg data-sanity-icon=\\"spinner\\" width=\\"1em\\" height=\\"1em\\" viewBox=\\"0 0 25 25\\" fill=\\"none\\" xmlns=\\"http://www.w3.org/2000/svg\\"><path d=\\"M4.5 12.5C4.5 16.9183 8.08172 20.5 12.5 20.5C16.9183 20.5 20.5 16.9183 20.5 12.5C20.5 8.08172 16.9183 4.5 12.5 4.5\\" stroke=\\"currentColor\\" stroke-width=\\"1.2\\" stroke-linejoin=\\"round\\"></path></svg></span></div></div>"`,
`"<div data-ui=\\"Flex\\" data-scheme=\\"light\\" data-tone=\\"default\\" class=\\"sc-jXbUNg bbOBvc sc-jEACwC icLxTH sc-jXbUNg gwUwPO sc-kpDqfm byEEoI\\"><div data-ui=\\"Text\\" class=\\"sc-aXZVg fsTqmC\\"><span>Loading…</span></div><div data-ui=\\"Spinner\\" class=\\"sc-aXZVg fsTqmC sc-dAlyuH hFIkQL\\"><span><svg data-sanity-icon=\\"spinner\\" width=\\"1em\\" height=\\"1em\\" viewBox=\\"0 0 25 25\\" fill=\\"none\\" xmlns=\\"http://www.w3.org/2000/svg\\"><path d=\\"M4.5 12.5C4.5 16.9183 8.08172 20.5 12.5 20.5C16.9183 20.5 20.5 16.9183 20.5 12.5C20.5 8.08172 16.9183 4.5 12.5 4.5\\" stroke=\\"currentColor\\" stroke-width=\\"1.2\\" stroke-linejoin=\\"round\\"></path></svg></span></div></div>"`,
)
} finally {
sheet.seal()
Expand All @@ -82,7 +81,7 @@ describe('Studio', () => {
const html = renderToString(sheet.collectStyles(<Studio config={config} />))
node.innerHTML = html
expect(html).toMatchInlineSnapshot(
`"<div data-ui=\\"Flex\\" data-scheme=\\"light\\" data-tone=\\"default\\" class=\\"sc-jXbUNg bbOBvc sc-dLMFU bVnOTN sc-jXbUNg gwUwPO sc-jlZhew blWHRn\\"><div data-ui=\\"Text\\" class=\\"sc-aXZVg fsTqmC\\"><span>Loading…</span></div><div data-ui=\\"Spinner\\" class=\\"sc-aXZVg fsTqmC sc-cwHptR hNIzxo\\"><span><svg data-sanity-icon=\\"spinner\\" width=\\"1em\\" height=\\"1em\\" viewBox=\\"0 0 25 25\\" fill=\\"none\\" xmlns=\\"http://www.w3.org/2000/svg\\"><path d=\\"M4.5 12.5C4.5 16.9183 8.08172 20.5 12.5 20.5C16.9183 20.5 20.5 16.9183 20.5 12.5C20.5 8.08172 16.9183 4.5 12.5 4.5\\" stroke=\\"currentColor\\" stroke-width=\\"1.2\\" stroke-linejoin=\\"round\\"></path></svg></span></div></div>"`,
`"<div data-ui=\\"Flex\\" data-scheme=\\"light\\" data-tone=\\"default\\" class=\\"sc-jXbUNg bbOBvc sc-jEACwC icLxTH sc-jXbUNg gwUwPO sc-kpDqfm byEEoI\\"><div data-ui=\\"Text\\" class=\\"sc-aXZVg fsTqmC\\"><span>Loading…</span></div><div data-ui=\\"Spinner\\" class=\\"sc-aXZVg fsTqmC sc-dAlyuH hFIkQL\\"><span><svg data-sanity-icon=\\"spinner\\" width=\\"1em\\" height=\\"1em\\" viewBox=\\"0 0 25 25\\" fill=\\"none\\" xmlns=\\"http://www.w3.org/2000/svg\\"><path d=\\"M4.5 12.5C4.5 16.9183 8.08172 20.5 12.5 20.5C16.9183 20.5 20.5 16.9183 20.5 12.5C20.5 8.08172 16.9183 4.5 12.5 4.5\\" stroke=\\"currentColor\\" stroke-width=\\"1.2\\" stroke-linejoin=\\"round\\"></path></svg></span></div></div>"`,
)
document.head.innerHTML += sheet.getStyleTags()

Expand Down

0 comments on commit b19899e

Please sign in to comment.