How to use the @synerise/ds-utils.renderWithProvider function in @synerise/ds-utils

To help you get started, we’ve selected a few @synerise/ds-utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Synerise / synerise-design / packages / components / tabs / src / __specs__ / Tabs.spec.tsx View on Github external
it('should render tabs container with 3 items', () => {
    // ARRANGE
    const content = <div style="{{width:"> {}} /&gt;</div>;
    const { rerender, queryAllByTestId } = renderWithProvider(content);

    // ACT
    setTimeout(() =&gt; {
      rerender(content);

      // ASSERT
      expect(queryAllByTestId('tab-container').length).toBe(3);
    }, WAIT_FOR_HOOKS)
  });
github Synerise / synerise-design / packages / components / tabs / src / __specs__ / Tabs.spec.tsx View on Github external
it('should render dropdown', () =&gt; {
    // ARRANGE
    const handleConfigurationAction = jest.fn();
    const content = <div style="{{width:"> {}} configuration={{label: 'Button label', action: handleConfigurationAction}} /&gt;</div>;
    const { baseElement } = renderWithProvider(content, { container: document.body});

    // ASSERT
    expect(baseElement.getElementsByClassName('ant-dropdown')).toBeTruthy();
  });
github Synerise / synerise-design / packages / components / inline-edit / src / __specs__ / InlineEdit.spec.tsx View on Github external
const setup = ({
    disabled = false, 
    maxLength,
    autoComplete,
    name = 'name-of-input',
    hideIcon,
  }: {
    disabled?: boolean,
    maxLength?: number,
    autoComplete?: string,
    name?: string
    hideIcon?: boolean
  }) =&gt; {
  const utils = renderWithProvider(
     onChange(e.target.value)}
      maxLength={maxLength}
      placeholder={PLACEHOLDER}
      size={'normal'}
      error={false}
      disabled={disabled}
      autoComplete={autoComplete}
      hideIcon={hideIcon}
    /&gt;
  )
  const input = utils.getByPlaceholderText(PLACEHOLDER) as HTMLInputElement

@synerise/ds-utils

Utils UI Component for the Synerise Design System

MIT
Latest version published 17 hours ago

Package Health Score

66 / 100
Full package analysis

Similar packages