@storybook/test 0.0.0-pr-28483-sha-c6902abe → 0.0.0-pr-28483-sha-b6e8d097

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -189,4 +189,4 @@ Unable to find an `+(hidden===!1?"accessible ":"")+'element with the role "'+rol
189
189
  <rect width="800" height="800" fill="white" />
190
190
  </clipPath>
191
191
  </defs>
192
- </svg>`),cursorEl.addEventListener("transitionend",()=>{cursorEl&&(cursorEl.className="sb-cursor-hide"),target.dispatchEvent(new MouseEvent("mouseover",{view:window,bubbles:!0,cancelable:!0}))},{capture:!0}),document.body.appendChild(cursorEl)),!target.getBoundingClientRect){console.log("target does not have getBoundingClientRect",target);return}(el=>{let rect=el.getBoundingClientRect();return rect.top>=0&&rect.left>=0&&rect.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&rect.right<=(window.innerWidth||document.documentElement.clientWidth)})(target)||target.scrollIntoView({block:"center",inline:"center"}),setTimeout(()=>{let{left,top,width,height}=target.getBoundingClientRect(),sTop=Math.round(top+Math.min(height/2,50))+"px",sLeft=Math.round(left+Math.min(width/2,50))+"px";cursorEl.className="",cursorStyle==="circle"&&(cursorEl.className="sb-cursor-moving"),cursorEl.style.top=sTop,cursorEl.style.left=sLeft,cursorEl.style.transitionDuration=`${Math.round(delay*.9)}ms`,setTimeout(resolve,delay)},300)})}var{expect:expect3}=(0,import_instrumenter2.instrument)({expect:expect2},{getKeys:(obj,depth)=>{let privateApi=["assert","__methods","__flags","_obj"];if(obj.constructor===chai_default.Assertion){let keys2=Object.keys(Object.getPrototypeOf(obj)).filter(it=>!privateApi.includes(it));return depth>2?keys2:[...keys2,"not"]}return Object.keys(obj)},intercept:method=>method!=="expect"}),resetAllMocksLoader=({parameters})=>{parameters?.test?.mockReset===!0?resetAllMocks():parameters?.test?.clearMocks===!0?clearAllMocks():parameters?.test?.restoreMocks!==!1&&restoreAllMocks()},traverseArgs=(value,depth=0,key)=>{if(depth>5||value==null)return value;if(isMockFunction(value))return key&&value.mockName(key),value;if(typeof value=="function"&&"isAction"in value&&value.isAction&&!("implicit"in value&&value.implicit)){let mock=fn2(value);return key&&mock.mockName(key),mock}if(Array.isArray(value))return depth++,value.map(item=>traverseArgs(item,depth));if(typeof value=="object"&&value.constructor===Object){depth++;for(let[k,v2]of Object.entries(value))Object.getOwnPropertyDescriptor(value,k)?.writable&&(value[k]=traverseArgs(v2,depth,k));return value}return value},nameSpiesAndWrapActionsInSpies=({initialArgs})=>{traverseArgs(initialArgs)},enhanceContext=context=>{if(globalThis.HTMLElement&&context.canvasElement instanceof globalThis.HTMLElement){context.canvas=within(context.canvasElement);let user=userEvent2.setup({delay:context.parameters.test?.demoMode?50:0});context.userEvent={...user,type:context.parameters.test?.inputDemoMode?async(...params)=>{let[element,text,options]=params;return await mouseTo(element,{cursorStyle:context.parameters.test?.cursorStyle,delay:context.parameters.test?.demoModeDelay}),user.type(element,text,options)}:user.click,click:context.parameters.test?.demoMode?async target=>(await mouseTo(target,{cursorStyle:context.parameters.test?.cursorStyle,delay:context.parameters.test?.demoModeDelay}),user.click(target)):user.click}}};scope.__STORYBOOK_TEST_LOADERS__=[resetAllMocksLoader,nameSpiesAndWrapActionsInSpies,enhanceContext];scope.__STORYBOOK_TEST_ON_MOCK_CALL__=onMockCall;0&&(module.exports={buildQueries,clearAllMocks,configure,createEvent,expect,findAllByAltText,findAllByDisplayValue,findAllByLabelText,findAllByPlaceholderText,findAllByRole,findAllByTestId,findAllByText,findAllByTitle,findByAltText,findByDisplayValue,findByLabelText,findByPlaceholderText,findByRole,findByTestId,findByText,findByTitle,fireEvent,fn,getAllByAltText,getAllByDisplayValue,getAllByLabelText,getAllByPlaceholderText,getAllByRole,getAllByTestId,getAllByText,getAllByTitle,getByAltText,getByDisplayValue,getByLabelText,getByPlaceholderText,getByRole,getByTestId,getByText,getByTitle,getConfig,getDefaultNormalizer,getElementError,getNodeText,getQueriesForElement,getRoles,getSuggestedQuery,isInaccessible,isMockFunction,logDOM,logRoles,mocked,mocks,onMockCall,prettyDOM,prettyFormat,queries,queryAllByAltText,queryAllByAttribute,queryAllByDisplayValue,queryAllByLabelText,queryAllByPlaceholderText,queryAllByRole,queryAllByTestId,queryAllByText,queryAllByTitle,queryByAltText,queryByAttribute,queryByDisplayValue,queryByLabelText,queryByPlaceholderText,queryByRole,queryByTestId,queryByText,queryByTitle,queryHelpers,resetAllMocks,restoreAllMocks,screen,spyOn,traverseArgs,userEvent,waitFor,waitForElementToBeRemoved,within});
192
+ </svg>`),cursorEl.addEventListener("transitionend",()=>{cursorEl&&(cursorEl.className="sb-cursor-hide"),target.dispatchEvent(new MouseEvent("mouseover",{view:window,bubbles:!0,cancelable:!0}))},{capture:!0}),document.body.appendChild(cursorEl)),!target.getBoundingClientRect){console.log("target does not have getBoundingClientRect",target);return}(el=>{let rect=el.getBoundingClientRect();return rect.top>=0&&rect.left>=0&&rect.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&rect.right<=(window.innerWidth||document.documentElement.clientWidth)})(target)||target.scrollIntoView({block:"center",inline:"center"}),setTimeout(()=>{let{left,top,width,height}=target.getBoundingClientRect(),sTop=Math.round(top+Math.min(height/2,50))+"px",sLeft=Math.round(left+Math.min(width/2,50))+"px";cursorEl.className="",cursorStyle==="circle"&&(cursorEl.className="sb-cursor-moving"),cursorEl.style.top=sTop,cursorEl.style.left=sLeft,cursorEl.style.transitionDuration=`${Math.round(delay*.9)}ms`,setTimeout(resolve,delay)},300)})}var{expect:expect3}=(0,import_instrumenter2.instrument)({expect:expect2},{getKeys:(obj,depth)=>{let privateApi=["assert","__methods","__flags","_obj"];if(obj.constructor===chai_default.Assertion){let keys2=Object.keys(Object.getPrototypeOf(obj)).filter(it=>!privateApi.includes(it));return depth>2?keys2:[...keys2,"not"]}return Object.keys(obj)},intercept:method=>method!=="expect"}),resetAllMocksLoader=({parameters})=>{parameters?.test?.mockReset===!0?resetAllMocks():parameters?.test?.clearMocks===!0?clearAllMocks():parameters?.test?.restoreMocks!==!1&&restoreAllMocks()},traverseArgs=(value,depth=0,key)=>{if(depth>5||value==null)return value;if(isMockFunction(value))return key&&value.mockName(key),value;if(typeof value=="function"&&"isAction"in value&&value.isAction&&!("implicit"in value&&value.implicit)){let mock=fn2(value);return key&&mock.mockName(key),mock}if(Array.isArray(value))return depth++,value.map(item=>traverseArgs(item,depth));if(typeof value=="object"&&value.constructor===Object){depth++;for(let[k,v2]of Object.entries(value))Object.getOwnPropertyDescriptor(value,k)?.writable&&(value[k]=traverseArgs(v2,depth,k));return value}return value},nameSpiesAndWrapActionsInSpies=({initialArgs})=>{traverseArgs(initialArgs)},enhanceContext=context=>{if(globalThis.HTMLElement&&context.canvasElement instanceof globalThis.HTMLElement)if(context.canvas=within(context.canvasElement),context.parameters.test?.demoMode||context.globals.interactionsDemoMode){let user=userEvent2.setup();context.userEvent={...user,type:async(...args)=>{let[target,text,options]=args;return userEvent2.setup({delay:Math.floor(Math.max(500/text.length,0))}).type(target,text,options)},click:async target=>(await mouseTo(target,{cursorStyle:context.parameters.test?.cursorStyle,delay:context.parameters.test?.demoModeDelay}),user.click(target))}}else context.userEvent=userEvent2.setup()};scope.__STORYBOOK_TEST_LOADERS__=[resetAllMocksLoader,nameSpiesAndWrapActionsInSpies,enhanceContext];scope.__STORYBOOK_TEST_ON_MOCK_CALL__=onMockCall;0&&(module.exports={buildQueries,clearAllMocks,configure,createEvent,expect,findAllByAltText,findAllByDisplayValue,findAllByLabelText,findAllByPlaceholderText,findAllByRole,findAllByTestId,findAllByText,findAllByTitle,findByAltText,findByDisplayValue,findByLabelText,findByPlaceholderText,findByRole,findByTestId,findByText,findByTitle,fireEvent,fn,getAllByAltText,getAllByDisplayValue,getAllByLabelText,getAllByPlaceholderText,getAllByRole,getAllByTestId,getAllByText,getAllByTitle,getByAltText,getByDisplayValue,getByLabelText,getByPlaceholderText,getByRole,getByTestId,getByText,getByTitle,getConfig,getDefaultNormalizer,getElementError,getNodeText,getQueriesForElement,getRoles,getSuggestedQuery,isInaccessible,isMockFunction,logDOM,logRoles,mocked,mocks,onMockCall,prettyDOM,prettyFormat,queries,queryAllByAltText,queryAllByAttribute,queryAllByDisplayValue,queryAllByLabelText,queryAllByPlaceholderText,queryAllByRole,queryAllByTestId,queryAllByText,queryAllByTitle,queryByAltText,queryByAttribute,queryByDisplayValue,queryByLabelText,queryByPlaceholderText,queryByRole,queryByTestId,queryByText,queryByTitle,queryHelpers,resetAllMocks,restoreAllMocks,screen,spyOn,traverseArgs,userEvent,waitFor,waitForElementToBeRemoved,within});
package/dist/index.mjs CHANGED
@@ -193,6 +193,6 @@ Unable to find an `+(hidden===!1?"accessible ":"")+'element with the role "'+rol
193
193
  <rect width="800" height="800" fill="white" />
194
194
  </clipPath>
195
195
  </defs>
196
- </svg>`),cursorEl.addEventListener("transitionend",()=>{cursorEl&&(cursorEl.className="sb-cursor-hide"),target.dispatchEvent(new MouseEvent("mouseover",{view:window,bubbles:!0,cancelable:!0}));},{capture:!0}),document.body.appendChild(cursorEl)),!target.getBoundingClientRect){console.log("target does not have getBoundingClientRect",target);return}(el=>{let rect=el.getBoundingClientRect();return rect.top>=0&&rect.left>=0&&rect.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&rect.right<=(window.innerWidth||document.documentElement.clientWidth)})(target)||target.scrollIntoView({block:"center",inline:"center"}),setTimeout(()=>{let{left,top,width,height}=target.getBoundingClientRect(),sTop=Math.round(top+Math.min(height/2,50))+"px",sLeft=Math.round(left+Math.min(width/2,50))+"px";cursorEl.className="",cursorStyle==="circle"&&(cursorEl.className="sb-cursor-moving"),cursorEl.style.top=sTop,cursorEl.style.left=sLeft,cursorEl.style.transitionDuration=`${Math.round(delay*.9)}ms`,setTimeout(resolve,delay);},300);})}var {expect:expect3}=instrument({expect:expect2},{getKeys:(obj,depth)=>{let privateApi=["assert","__methods","__flags","_obj"];if(obj.constructor===chai_default.Assertion){let keys2=Object.keys(Object.getPrototypeOf(obj)).filter(it=>!privateApi.includes(it));return depth>2?keys2:[...keys2,"not"]}return Object.keys(obj)},intercept:method=>method!=="expect"}),resetAllMocksLoader=({parameters})=>{parameters?.test?.mockReset===!0?resetAllMocks():parameters?.test?.clearMocks===!0?clearAllMocks():parameters?.test?.restoreMocks!==!1&&restoreAllMocks();},traverseArgs=(value,depth=0,key)=>{if(depth>5||value==null)return value;if(isMockFunction(value))return key&&value.mockName(key),value;if(typeof value=="function"&&"isAction"in value&&value.isAction&&!("implicit"in value&&value.implicit)){let mock=fn2(value);return key&&mock.mockName(key),mock}if(Array.isArray(value))return depth++,value.map(item=>traverseArgs(item,depth));if(typeof value=="object"&&value.constructor===Object){depth++;for(let[k,v2]of Object.entries(value))Object.getOwnPropertyDescriptor(value,k)?.writable&&(value[k]=traverseArgs(v2,depth,k));return value}return value},nameSpiesAndWrapActionsInSpies=({initialArgs})=>{traverseArgs(initialArgs);},enhanceContext=context=>{if(globalThis.HTMLElement&&context.canvasElement instanceof globalThis.HTMLElement){context.canvas=within(context.canvasElement);let user=userEvent2.setup({delay:context.parameters.test?.demoMode?50:0});context.userEvent={...user,type:context.parameters.test?.inputDemoMode?async(...params)=>{let[element,text,options]=params;return await mouseTo(element,{cursorStyle:context.parameters.test?.cursorStyle,delay:context.parameters.test?.demoModeDelay}),user.type(element,text,options)}:user.click,click:context.parameters.test?.demoMode?async target=>(await mouseTo(target,{cursorStyle:context.parameters.test?.cursorStyle,delay:context.parameters.test?.demoModeDelay}),user.click(target)):user.click};}};scope.__STORYBOOK_TEST_LOADERS__=[resetAllMocksLoader,nameSpiesAndWrapActionsInSpies,enhanceContext];scope.__STORYBOOK_TEST_ON_MOCK_CALL__=onMockCall;
196
+ </svg>`),cursorEl.addEventListener("transitionend",()=>{cursorEl&&(cursorEl.className="sb-cursor-hide"),target.dispatchEvent(new MouseEvent("mouseover",{view:window,bubbles:!0,cancelable:!0}));},{capture:!0}),document.body.appendChild(cursorEl)),!target.getBoundingClientRect){console.log("target does not have getBoundingClientRect",target);return}(el=>{let rect=el.getBoundingClientRect();return rect.top>=0&&rect.left>=0&&rect.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&rect.right<=(window.innerWidth||document.documentElement.clientWidth)})(target)||target.scrollIntoView({block:"center",inline:"center"}),setTimeout(()=>{let{left,top,width,height}=target.getBoundingClientRect(),sTop=Math.round(top+Math.min(height/2,50))+"px",sLeft=Math.round(left+Math.min(width/2,50))+"px";cursorEl.className="",cursorStyle==="circle"&&(cursorEl.className="sb-cursor-moving"),cursorEl.style.top=sTop,cursorEl.style.left=sLeft,cursorEl.style.transitionDuration=`${Math.round(delay*.9)}ms`,setTimeout(resolve,delay);},300);})}var {expect:expect3}=instrument({expect:expect2},{getKeys:(obj,depth)=>{let privateApi=["assert","__methods","__flags","_obj"];if(obj.constructor===chai_default.Assertion){let keys2=Object.keys(Object.getPrototypeOf(obj)).filter(it=>!privateApi.includes(it));return depth>2?keys2:[...keys2,"not"]}return Object.keys(obj)},intercept:method=>method!=="expect"}),resetAllMocksLoader=({parameters})=>{parameters?.test?.mockReset===!0?resetAllMocks():parameters?.test?.clearMocks===!0?clearAllMocks():parameters?.test?.restoreMocks!==!1&&restoreAllMocks();},traverseArgs=(value,depth=0,key)=>{if(depth>5||value==null)return value;if(isMockFunction(value))return key&&value.mockName(key),value;if(typeof value=="function"&&"isAction"in value&&value.isAction&&!("implicit"in value&&value.implicit)){let mock=fn2(value);return key&&mock.mockName(key),mock}if(Array.isArray(value))return depth++,value.map(item=>traverseArgs(item,depth));if(typeof value=="object"&&value.constructor===Object){depth++;for(let[k,v2]of Object.entries(value))Object.getOwnPropertyDescriptor(value,k)?.writable&&(value[k]=traverseArgs(v2,depth,k));return value}return value},nameSpiesAndWrapActionsInSpies=({initialArgs})=>{traverseArgs(initialArgs);},enhanceContext=context=>{if(globalThis.HTMLElement&&context.canvasElement instanceof globalThis.HTMLElement)if(context.canvas=within(context.canvasElement),context.parameters.test?.demoMode||context.globals.interactionsDemoMode){let user=userEvent2.setup();context.userEvent={...user,type:async(...args)=>{let[target,text,options]=args;return userEvent2.setup({delay:Math.floor(Math.max(500/text.length,0))}).type(target,text,options)},click:async target=>(await mouseTo(target,{cursorStyle:context.parameters.test?.cursorStyle,delay:context.parameters.test?.demoModeDelay}),user.click(target))};}else context.userEvent=userEvent2.setup();};scope.__STORYBOOK_TEST_LOADERS__=[resetAllMocksLoader,nameSpiesAndWrapActionsInSpies,enhanceContext];scope.__STORYBOOK_TEST_ON_MOCK_CALL__=onMockCall;
197
197
 
198
198
  export { buildQueries2 as buildQueries, clearAllMocks, configure2 as configure, createEvent3 as createEvent, expect3 as expect, findAllByAltText2 as findAllByAltText, findAllByDisplayValue2 as findAllByDisplayValue, findAllByLabelText2 as findAllByLabelText, findAllByPlaceholderText2 as findAllByPlaceholderText, findAllByRole2 as findAllByRole, findAllByTestId2 as findAllByTestId, findAllByText2 as findAllByText, findAllByTitle2 as findAllByTitle, findByAltText2 as findByAltText, findByDisplayValue2 as findByDisplayValue, findByLabelText2 as findByLabelText, findByPlaceholderText2 as findByPlaceholderText, findByRole2 as findByRole, findByTestId2 as findByTestId, findByText2 as findByText, findByTitle2 as findByTitle, fireEvent2 as fireEvent, fn2 as fn, getAllByAltText2 as getAllByAltText, getAllByDisplayValue2 as getAllByDisplayValue, getAllByLabelText2 as getAllByLabelText, getAllByPlaceholderText2 as getAllByPlaceholderText, getAllByRole2 as getAllByRole, getAllByTestId2 as getAllByTestId, getAllByText2 as getAllByText, getAllByTitle2 as getAllByTitle, getByAltText2 as getByAltText, getByDisplayValue2 as getByDisplayValue, getByLabelText2 as getByLabelText, getByPlaceholderText2 as getByPlaceholderText, getByRole2 as getByRole, getByTestId2 as getByTestId, getByText2 as getByText, getByTitle2 as getByTitle, getConfig2 as getConfig, getDefaultNormalizer2 as getDefaultNormalizer, getElementError2 as getElementError, getNodeText2 as getNodeText, getQueriesForElement2 as getQueriesForElement, getRoles2 as getRoles, getSuggestedQuery2 as getSuggestedQuery, isInaccessible2 as isInaccessible, isMockFunction, logDOM2 as logDOM, logRoles2 as logRoles, mocked, mocks, onMockCall, prettyDOM2 as prettyDOM, prettyFormat2 as prettyFormat, queries2 as queries, queryAllByAltText2 as queryAllByAltText, queryAllByAttribute2 as queryAllByAttribute, queryAllByDisplayValue2 as queryAllByDisplayValue, queryAllByLabelText2 as queryAllByLabelText, queryAllByPlaceholderText2 as queryAllByPlaceholderText, queryAllByRole2 as queryAllByRole, queryAllByTestId2 as queryAllByTestId, queryAllByText2 as queryAllByText, queryAllByTitle2 as queryAllByTitle, queryByAltText2 as queryByAltText, queryByAttribute2 as queryByAttribute, queryByDisplayValue2 as queryByDisplayValue, queryByLabelText2 as queryByLabelText, queryByPlaceholderText2 as queryByPlaceholderText, queryByRole2 as queryByRole, queryByTestId2 as queryByTestId, queryByText2 as queryByText, queryByTitle2 as queryByTitle, queryHelpers2 as queryHelpers, resetAllMocks, restoreAllMocks, screen2 as screen, spyOn2 as spyOn, traverseArgs, userEvent2 as userEvent, waitFor2 as waitFor, waitForElementToBeRemoved2 as waitForElementToBeRemoved, within };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/test",
3
- "version": "0.0.0-pr-28483-sha-c6902abe",
3
+ "version": "0.0.0-pr-28483-sha-b6e8d097",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "storybook"
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "dependencies": {
47
47
  "@storybook/csf": "0.1.11",
48
- "@storybook/instrumenter": "0.0.0-pr-28483-sha-c6902abe",
48
+ "@storybook/instrumenter": "0.0.0-pr-28483-sha-b6e8d097",
49
49
  "@testing-library/dom": "10.1.0",
50
50
  "@testing-library/jest-dom": "6.4.5",
51
51
  "@testing-library/user-event": "14.5.2",
@@ -61,7 +61,7 @@
61
61
  "typescript": "^5.3.2"
62
62
  },
63
63
  "peerDependencies": {
64
- "storybook": "^0.0.0-pr-28483-sha-c6902abe"
64
+ "storybook": "^0.0.0-pr-28483-sha-b6e8d097"
65
65
  },
66
66
  "publishConfig": {
67
67
  "access": "public"