level_0
int64
0
10k
index
int64
0
0
repo_id
stringlengths
22
152
file_path
stringlengths
41
203
content
stringlengths
11
11.5M
2,385
0
petrpan-code/gitify-app/gitify/src
petrpan-code/gitify-app/gitify/src/components/NotificationRow.test.tsx
import * as React from 'react'; import * as TestRenderer from 'react-test-renderer'; import { fireEvent, render } from '@testing-library/react'; const { shell } = require('electron'); import { AppContext } from '../context/App'; import { mockedSingleNotification } from '../__mocks__/mockedData'; import { Notification...
2,387
0
petrpan-code/gitify-app/gitify/src
petrpan-code/gitify-app/gitify/src/components/Oops.test.tsx
import * as React from 'react'; import * as TestRenderer from 'react-test-renderer'; import { mockMathRandom } from './test-utils'; import { Oops } from './Oops'; describe('components/oops.tsx', function () { // The error emoji randomly rotates, but then the snapshots would never match // Have to make it consist...
2,389
0
petrpan-code/gitify-app/gitify/src
petrpan-code/gitify-app/gitify/src/components/Repository.test.tsx
import React from 'react'; import TestRenderer from 'react-test-renderer'; import { render, fireEvent } from '@testing-library/react'; import { AppContext } from '../context/App'; import { mockedGithubNotifications } from '../__mocks__/mockedData'; import { RepositoryNotifications } from './Repository'; const { shell...
2,391
0
petrpan-code/gitify-app/gitify/src
petrpan-code/gitify-app/gitify/src/components/Sidebar.test.tsx
import { fireEvent, render, screen } from '@testing-library/react'; import * as React from 'react'; import { MemoryRouter } from 'react-router-dom'; import * as TestRenderer from 'react-test-renderer'; const { shell, ipcRenderer } = require('electron'); import { mockSettings } from '../__mocks__/mock-state'; import {...
2,394
0
petrpan-code/gitify-app/gitify/src/components
petrpan-code/gitify-app/gitify/src/components/__snapshots__/AccountNotifications.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`components/AccountNotifications.tsx should render itself (github.com with notifications) 1`] = ` [ <div className="flex flex-1 items-center justify-between py-2 px-4 bg-gray-300 dark:bg-gray-darkest dark:text-white text-sm" > github.com <svg ari...
2,395
0
petrpan-code/gitify-app/gitify/src/components
petrpan-code/gitify-app/gitify/src/components/__snapshots__/AllRead.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`components/all-read.tsx should render itself & its children 1`] = ` <div className="flex flex-1 flex-col justify-center items-center p-4 bg-white dark:bg-gray-dark text-black dark:text-white" > <h1 className="text-5xl mb-5" > 😉 </h1> <h2 classN...
2,396
0
petrpan-code/gitify-app/gitify/src/components
petrpan-code/gitify-app/gitify/src/components/__snapshots__/Logo.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`components/ui/logo.tsx renders correctly (light) 1`] = ` <svg className="" onClick={[Function]} role="logo" viewBox="0 0 500 500" xmlns="http://www.w3.org/2000/svg" xmlnsXlink="http://www.w3.org/1999/xlink" > <defs> <linearGradient id="linearG...
2,397
0
petrpan-code/gitify-app/gitify/src/components
petrpan-code/gitify-app/gitify/src/components/__snapshots__/NotificationRow.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`components/Notification.js should render itself & its children 1`] = ` <div className="flex space-x-2 p-2 bg-white dark:bg-gray-dark dark:text-white hover:bg-gray-100 dark:hover:bg-gray-darker border-b border-gray-100 dark:border-gray-darker" > <div className...
2,398
0
petrpan-code/gitify-app/gitify/src/components
petrpan-code/gitify-app/gitify/src/components/__snapshots__/Oops.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`components/oops.tsx should render itself & its children 1`] = ` <div className="flex flex-1 flex-col justify-center items-center p-4 bg-white dark:bg-gray-dark text-black dark:text-white" > <h1 className="text-5xl mb-5" > 🤔 </h1> <h2 className=...
2,399
0
petrpan-code/gitify-app/gitify/src/components
petrpan-code/gitify-app/gitify/src/components/__snapshots__/Repository.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`components/Repository.tsx should render itself & its children 1`] = ` [ <div className="flex p-2 bg-gray-100 dark:bg-gray-darker dark:text-white" > <div className="flex flex-1 p-0.5 items-center mt-0 text-sm font-medium overflow-hidden overflow-elli...
2,400
0
petrpan-code/gitify-app/gitify/src/components
petrpan-code/gitify-app/gitify/src/components/__snapshots__/Sidebar.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`components/Sidebar.tsx should render itself & its children (logged in) 1`] = ` <div className="flex flex-col fixed left-14 w-14 -ml-14 h-full bg-gray-sidebar overflow-y-auto " > <div className="flex flex-col flex-1 items-center py-4" > <svg classN...
2,403
0
petrpan-code/gitify-app/gitify/src/components
petrpan-code/gitify-app/gitify/src/components/fields/RadioGroup.test.tsx
import * as React from 'react'; import * as TestRendener from 'react-test-renderer'; import { fireEvent, render } from '@testing-library/react'; import { FieldRadioGroup } from './RadioGroup'; describe('components/fields/radiogroup.tsx', () => { const props = { label: 'Appearance', name: 'appearance', p...
2,405
0
petrpan-code/gitify-app/gitify/src/components/fields
petrpan-code/gitify-app/gitify/src/components/fields/__snapshots__/RadioGroup.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`components/fields/radiogroup.tsx should render 1`] = ` <fieldset className="mb-1" id="appearance" > <div> <legend className="mb-1 text-base font-medium dark:text-white" > Appearance </legend> <p className="text-sm text-gray-50...
2,406
0
petrpan-code/gitify-app/gitify/src
petrpan-code/gitify-app/gitify/src/context/App.test.tsx
import React, { useContext } from 'react'; import { act, fireEvent, render, waitFor } from '@testing-library/react'; import { AppContext, AppProvider } from './App'; import { AuthState, SettingsState } from '../types'; import { mockAccounts, mockSettings } from '../__mocks__/mock-state'; import { useNotifications } fr...
2,409
0
petrpan-code/gitify-app/gitify/src
petrpan-code/gitify-app/gitify/src/hooks/useNotifications.test.ts
import axios from 'axios'; import nock from 'nock'; import { act, renderHook } from '@testing-library/react-hooks'; import { mockAccounts, mockSettings } from '../__mocks__/mock-state'; import { useNotifications } from './useNotifications'; import { AuthState } from '../types'; import { mockedUser } from '../__mocks__...
2,416
0
petrpan-code/gitify-app/gitify/src
petrpan-code/gitify-app/gitify/src/routes/Login.test.tsx
import React from 'react'; import TestRenderer from 'react-test-renderer'; import { MemoryRouter } from 'react-router-dom'; import { render, fireEvent } from '@testing-library/react'; const { ipcRenderer } = require('electron'); import { AppContext } from '../context/App'; import { LoginRoute } from './Login'; const...
2,418
0
petrpan-code/gitify-app/gitify/src
petrpan-code/gitify-app/gitify/src/routes/LoginEnterprise.test.tsx
import * as React from 'react'; import * as TestRenderer from 'react-test-renderer'; import { fireEvent, render } from '@testing-library/react'; import { MemoryRouter } from 'react-router-dom'; const { ipcRenderer } = require('electron'); import { AppContext } from '../context/App'; import { AuthState } from '../type...
2,420
0
petrpan-code/gitify-app/gitify/src
petrpan-code/gitify-app/gitify/src/routes/LoginWithToken.test.tsx
import React from 'react'; import TestRenderer from 'react-test-renderer'; import { act, fireEvent, render, waitFor } from '@testing-library/react'; import { MemoryRouter } from 'react-router-dom'; import { shell } from 'electron'; import { AppContext } from '../context/App'; import { LoginWithToken, validate } from '...
2,422
0
petrpan-code/gitify-app/gitify/src
petrpan-code/gitify-app/gitify/src/routes/Notifications.test.tsx
import React from 'react'; import TestRenderer from 'react-test-renderer'; import { AppContext } from '../context/App'; import { mockedAccountNotifications } from '../__mocks__/mockedData'; import { NotificationsRoute } from './Notifications'; jest.mock('../components/AccountNotifications', () => ({ AccountNotifica...
2,424
0
petrpan-code/gitify-app/gitify/src
petrpan-code/gitify-app/gitify/src/routes/Settings.test.tsx
import React from 'react'; import TestRenderer, { act } from 'react-test-renderer'; import { render, fireEvent } from '@testing-library/react'; import { MemoryRouter } from 'react-router-dom'; const { ipcRenderer } = require('electron'); import { SettingsRoute } from './Settings'; import { AppContext } from '../conte...
2,426
0
petrpan-code/gitify-app/gitify/src/routes
petrpan-code/gitify-app/gitify/src/routes/__snapshots__/Login.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`routes/Login.tsx should render itself & its children 1`] = ` <div className="flex flex-1 flex-col justify-center items-center p-4 bg-white dark:bg-gray-dark dark:text-white" > <svg className="w-16 h-16" onClick={[Function]} role="logo" viewBox="0 ...
2,427
0
petrpan-code/gitify-app/gitify/src/routes
petrpan-code/gitify-app/gitify/src/routes/__snapshots__/LoginEnterprise.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`routes/LoginEnterprise.js renders correctly 1`] = ` <div className="flex-1 bg-white dark:bg-gray-dark dark:text-white" > <div className="flex justify-between items-center mt-4 py-2 mx-8" > <button aria-label="Go Back" className="focus:outlin...
2,428
0
petrpan-code/gitify-app/gitify/src/routes
petrpan-code/gitify-app/gitify/src/routes/__snapshots__/LoginWithToken.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`routes/LoginWithToken.js renders correctly 1`] = ` <div className="flex-1 bg-white dark:bg-gray-dark dark:text-white" > <div className="flex justify-between items-center mt-4 py-2 mx-8" > <button aria-label="Go Back" className="focus:outline...
2,429
0
petrpan-code/gitify-app/gitify/src/routes
petrpan-code/gitify-app/gitify/src/routes/__snapshots__/Notifications.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`routes/Notifications.ts should render itself & its children (all read notifications) 1`] = `<AllRead />`; exports[`routes/Notifications.ts should render itself & its children (error page - oops) 1`] = `<Oops />`; exports[`routes/Notifications.ts should render itsel...
2,430
0
petrpan-code/gitify-app/gitify/src/routes
petrpan-code/gitify-app/gitify/src/routes/__snapshots__/Settings.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`routes/Settings.tsx should render itself & its children 1`] = ` <div className="flex flex-1 flex-col dark:bg-gray-dark dark:text-white" > <div className="flex justify-between items-center mt-4 py-2 mx-8" > <button aria-label="Go Back" classN...
2,432
0
petrpan-code/gitify-app/gitify/src
petrpan-code/gitify-app/gitify/src/utils/appearance.test.ts
import { Appearance } from '../types'; import { setAppearance } from './appearance'; import * as appearanceHelpers from './appearance'; describe('utils/appearance.tsx', () => { beforeAll(() => { jest.spyOn(appearanceHelpers, 'setLightMode'); jest.spyOn(appearanceHelpers, 'setDarkMode'); }); beforeEach(...
2,434
0
petrpan-code/gitify-app/gitify/src
petrpan-code/gitify-app/gitify/src/utils/auth.test.ts
import { AxiosPromise, AxiosResponse } from 'axios'; import remote from '@electron/remote'; const browserWindow = new remote.BrowserWindow(); import * as auth from './auth'; import * as apiRequests from './api-requests'; import { AuthState } from '../types'; describe('utils/auth.tsx', () => { describe('authGitHub'...
2,436
0
petrpan-code/gitify-app/gitify/src
petrpan-code/gitify-app/gitify/src/utils/comms.test.ts
import { ipcRenderer, shell } from 'electron'; import { updateTrayIcon, openExternalLink, setAutoLaunch, restoreSetting, } from './comms'; describe('utils/comms.ts', () => { beforeEach(function () { jest.spyOn(ipcRenderer, 'send'); }); afterEach(() => { jest.clearAllMocks(); }); it('should ...
2,439
0
petrpan-code/gitify-app/gitify/src
petrpan-code/gitify-app/gitify/src/utils/github-api.test.ts
import { formatReason, getNotificationTypeIcon } from './github-api'; import { Reason, SubjectType } from '../typesGithub'; describe('./utils/github-api.ts', () => { it('should format the notification reason', () => { expect(formatReason('assign')).toMatchSnapshot(); expect(formatReason('author')).toMatchSna...
2,441
0
petrpan-code/gitify-app/gitify/src
petrpan-code/gitify-app/gitify/src/utils/helpers.test.ts
import { generateGitHubWebUrl, generateGitHubAPIUrl, generateNotificationReferrerId, getCommentId, getLatestDiscussionCommentId, } from './helpers'; import { mockedSingleNotification, mockedUser, mockedGraphQLResponse, } from '../__mocks__/mockedData'; const URL = { normal: { api: 'https://api.gi...
2,443
0
petrpan-code/gitify-app/gitify/src
petrpan-code/gitify-app/gitify/src/utils/notifications.test.ts
import { ipcRenderer } from 'electron'; import { generateGitHubWebUrl, getCommentId } from './helpers'; import { mockedAccountNotifications, mockedGithubNotifications, mockedSingleAccountNotifications, mockedUser, } from '../__mocks__/mockedData'; import { mockAccounts } from '../__mocks__/mock-state'; import ...
2,445
0
petrpan-code/gitify-app/gitify/src
petrpan-code/gitify-app/gitify/src/utils/remove-notification.test.ts
import { mockedSingleAccountNotifications, mockedSingleNotification, } from '../__mocks__/mockedData'; import { removeNotification } from './remove-notification'; describe('utils/remove-notification.ts', () => { const notificationId = mockedSingleNotification.id; const hostname = mockedSingleAccountNotificatio...
2,447
0
petrpan-code/gitify-app/gitify/src
petrpan-code/gitify-app/gitify/src/utils/remove-notifications.test.ts
import { mockedAccountNotifications, mockedSingleAccountNotifications, mockedSingleNotification, } from '../__mocks__/mockedData'; import { removeNotifications } from './remove-notifications'; describe('utils/remove-notification.ts', () => { const repoSlug = mockedSingleNotification.repository.full_name; con...
2,449
0
petrpan-code/gitify-app/gitify/src
petrpan-code/gitify-app/gitify/src/utils/storage.test.ts
import { mockSettings } from '../__mocks__/mock-state'; import { clearState, loadState, saveState } from './storage'; describe('utils/storage.ts', () => { it('should load the state from localstorage - existing', () => { jest.spyOn(localStorage.__proto__, 'getItem').mockReturnValueOnce( JSON.stringify({ ...
2,451
0
petrpan-code/gitify-app/gitify/src/utils
petrpan-code/gitify-app/gitify/src/utils/__snapshots__/github-api.test.ts.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`./utils/github-api.ts should format the notification reason 1`] = ` { "description": "You were assigned to the issue.", "type": "Assign", } `; exports[`./utils/github-api.ts should format the notification reason 2`] = ` { "description": "You created the thread...
2,476
0
petrpan-code/geist-org/geist-ui/components/auto-complete
petrpan-code/geist-org/geist-ui/components/auto-complete/__tests__/index.test.tsx
import React from 'react' import { mount } from 'enzyme' import { AutoComplete } from 'components' import { nativeEvent } from 'tests/utils' import { act } from 'react-dom/test-utils' describe('AutoComplete', () => { it('should render correctly', () => { const wrapper = mount(<AutoComplete />) expect(() => w...
2,477
0
petrpan-code/geist-org/geist-ui/components/auto-complete
petrpan-code/geist-org/geist-ui/components/auto-complete/__tests__/search.test.tsx
import React from 'react' import { mount, render } from 'enzyme' import { AutoComplete } from 'components' import { nativeEvent, updateWrapper } from 'tests/utils' import { act } from 'react-dom/test-utils' const mockOptions = [{ label: 'London', value: 'london' }] describe('AutoComplete Search', () => { it('should ...
2,478
0
petrpan-code/geist-org/geist-ui/components/auto-complete
petrpan-code/geist-org/geist-ui/components/auto-complete/__tests__/use-input.test.tsx
import React, { useEffect } from 'react' import { mount } from 'enzyme' import { AutoComplete, useInput } from 'components' describe('UseInput', () => { it('should follow change with use-input', () => { let log = '' const logSpy = jest.spyOn(console, 'log').mockImplementation(msg => (log = msg)) const Mo...
2,479
0
petrpan-code/geist-org/geist-ui/components/auto-complete/__tests__
petrpan-code/geist-org/geist-ui/components/auto-complete/__tests__/__snapshots__/index.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`AutoComplete should render correctly 1`] = `<ScaleGeistAutoComplete />`;
2,480
0
petrpan-code/geist-org/geist-ui/components/auto-complete/__tests__
petrpan-code/geist-org/geist-ui/components/auto-complete/__tests__/__snapshots__/search.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`AutoComplete Search should hide empty component 1`] = ` LoadedCheerio { "0": Node { "attribs": Object { "class": "auto-complete", }, "children": Array [ Node { "attribs": Object { "class": "with-label", }, "...
2,484
0
petrpan-code/geist-org/geist-ui/components/avatar
petrpan-code/geist-org/geist-ui/components/avatar/__tests__/index.test.tsx
import React from 'react' import { mount, render, shallow } from 'enzyme' import { Avatar } from 'components' describe('Avatar', () => { it('should support square and circle', () => { const circle = shallow(<Avatar />) expect(() => circle.unmount()).not.toThrow() const square = shallow(<Avatar isSquare /...
2,485
0
petrpan-code/geist-org/geist-ui/components/avatar/__tests__
petrpan-code/geist-org/geist-ui/components/avatar/__tests__/__snapshots__/index.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Avatar should render text element 1`] = ` LoadedCheerio { "0": Node { "attribs": Object { "class": "avatar", }, "children": Array [ Node { "attribs": Object { "class": "avatar-text", }, "children": Array [],...
2,489
0
petrpan-code/geist-org/geist-ui/components/badge
petrpan-code/geist-org/geist-ui/components/badge/__tests__/anchor.test.tsx
import React from 'react' import { mount } from 'enzyme' import { Badge } from 'components' describe('BadgeAnchor', () => { it('should render correctly', () => { const wrapper = mount( <Badge.Anchor> <Badge>test</Badge> <a>link</a> </Badge.Anchor>, ) expect(() => wrapper.unmou...
2,490
0
petrpan-code/geist-org/geist-ui/components/badge
petrpan-code/geist-org/geist-ui/components/badge/__tests__/index.test.tsx
import React from 'react' import { mount, render, shallow } from 'enzyme' import Badge from '../badge' describe('Badge', () => { it('should supoort text', () => { const html = render(<Badge>count</Badge>) expect(html).toMatchSnapshot() const badge = mount(<Badge>count</Badge>) expect(() => badge.unmo...
2,491
0
petrpan-code/geist-org/geist-ui/components/badge/__tests__
petrpan-code/geist-org/geist-ui/components/badge/__tests__/__snapshots__/anchor.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`BadgeAnchor should be support multiple position 1`] = ` "<div class=\\"anchor\\"><button>btn</button><sup><span class=\\"badge\\">test<style> .badge { display: inline-block; border-radius: 16px; font-variant: tabular-nums; ...
2,492
0
petrpan-code/geist-org/geist-ui/components/badge/__tests__
petrpan-code/geist-org/geist-ui/components/badge/__tests__/__snapshots__/index.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Badge should re-render when size changed 1`] = `ReactWrapper {}`; exports[`Badge should re-render when size changed 2`] = `ReactWrapper {}`; exports[`Badge should render different types 1`] = ` LoadedCheerio { "0": Node { "attribs": Object {}, "children":...
2,497
0
petrpan-code/geist-org/geist-ui/components/breadcrumbs
petrpan-code/geist-org/geist-ui/components/breadcrumbs/__tests__/breadcrumbs.test.tsx
import React from 'react' import { mount } from 'enzyme' import { Breadcrumbs } from 'components' describe('Breadcrumbs', () => { it('should render correctly', () => { const wrapper = mount( <Breadcrumbs> <Breadcrumbs.Item>test-1</Breadcrumbs.Item> </Breadcrumbs>, ) expect(wrapper.htm...
2,498
0
petrpan-code/geist-org/geist-ui/components/breadcrumbs/__tests__
petrpan-code/geist-org/geist-ui/components/breadcrumbs/__tests__/__snapshots__/breadcrumbs.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Breadcrumbs should redefined all separators 1`] = ` "<nav class=\\"\\"><span class=\\"breadcrumbs-item\\">test-1</span><div class=\\"separator\\">*<style> .separator { display: inline-flex; user-select: none; pointer-events: none...
2,505
0
petrpan-code/geist-org/geist-ui/components/button-dropdown
petrpan-code/geist-org/geist-ui/components/button-dropdown/__tests__/index.test.tsx
import React from 'react' import { mount, render } from 'enzyme' import { ButtonDropdown } from 'components' import { mockNativeEvent, nativeEvent } from 'tests/utils' const Icon: React.FC<any> = () => <svg /> describe('Button Dropdown', () => { it('should render correctly', () => { const wrapper = mount( ...
2,506
0
petrpan-code/geist-org/geist-ui/components/button-dropdown/__tests__
petrpan-code/geist-org/geist-ui/components/button-dropdown/__tests__/__snapshots__/index.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Button Dropdown should render multiple types 1`] = ` LoadedCheerio { "0": Node { "attribs": Object { "class": "btn-dropdown", }, "children": Array [ Node { "attribs": Object { "class": "", }, "children": Arr...
2,510
0
petrpan-code/geist-org/geist-ui/components/button-group
petrpan-code/geist-org/geist-ui/components/button-group/__tests__/index.test.tsx
import React from 'react' import { mount } from 'enzyme' import { ButtonGroup, Button } from 'components' import { nativeEvent } from 'tests/utils' describe('ButtonGroup', () => { it('should render correctly', () => { const wrapper = mount( <ButtonGroup> <Button>action</Button> </ButtonGroup>...
2,511
0
petrpan-code/geist-org/geist-ui/components/button-group/__tests__
petrpan-code/geist-org/geist-ui/components/button-group/__tests__/__snapshots__/index.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`ButtonGroup buttons should be displayed vertically 1`] = ` "<div class=\\"btn-group vertical\\"><button type=\\"button\\" class=\\"btn\\"><div class=\\"text\\">action1</div><style> .btn { box-sizing: border-box; display: inline-block...
2,519
0
petrpan-code/geist-org/geist-ui/components/button
petrpan-code/geist-org/geist-ui/components/button/__tests__/icon.test.tsx
import React from 'react' import { mount } from 'enzyme' import { Button } from 'components' const Icon: React.FC<any> = () => <svg /> describe('ButtonIcon', () => { it('should render correctly', () => { const wrapper = mount(<Button icon={<Icon />}>action</Button>) expect(wrapper.html()).toMatchSnapshot() ...
2,520
0
petrpan-code/geist-org/geist-ui/components/button
petrpan-code/geist-org/geist-ui/components/button/__tests__/index.test.tsx
import React from 'react' import { mount } from 'enzyme' import { Button } from 'components' import { sleep } from 'tests/utils' describe('Button', () => { it('should render correctly', () => { const wrapper = mount(<Button>Button</Button>) expect(() => wrapper.unmount()).not.toThrow() }) it('should sup...
2,521
0
petrpan-code/geist-org/geist-ui/components/button/__tests__
petrpan-code/geist-org/geist-ui/components/button/__tests__/__snapshots__/icon.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`ButtonIcon should render correctly 1`] = ` "<button type=\\"button\\" class=\\"btn\\"><span class=\\"icon\\"><svg></svg><style> .icon { position: absolute; left: var(--geist-ui-button-icon-padding); right: auto; top: 50...
2,522
0
petrpan-code/geist-org/geist-ui/components/button/__tests__
petrpan-code/geist-org/geist-ui/components/button/__tests__/__snapshots__/index.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Button should render empty button correctly 1`] = `<ScaleGeistButton />`; exports[`Button should render special styles 1`] = `ReactWrapper {}`; exports[`Button should render special styles 2`] = ` <ScaleGeistButton loading={true} > button </ScaleGeistButton> `;...
2,525
0
petrpan-code/geist-org/geist-ui/components/capacity
petrpan-code/geist-org/geist-ui/components/capacity/__tests__/index.test.tsx
import React from 'react' import { render, mount } from 'enzyme' import { Capacity } from 'components' describe('Capacity', () => { it('should render value correctly', () => { const wrapper = mount(<Capacity value={50} />) expect(() => wrapper.unmount()).not.toThrow() }) it('should render title correctl...
2,526
0
petrpan-code/geist-org/geist-ui/components/capacity/__tests__
petrpan-code/geist-org/geist-ui/components/capacity/__tests__/__snapshots__/index.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Capacity should override background color 1`] = ` LoadedCheerio { "0": Node { "attribs": Object { "class": "capacity", "title": "50%", }, "children": Array [ Node { "attribs": Object {}, "children": Array [], "n...
2,532
0
petrpan-code/geist-org/geist-ui/components/card
petrpan-code/geist-org/geist-ui/components/card/__tests__/footer.test.tsx
import React from 'react' import { mount } from 'enzyme' import { Card } from 'components' describe('Card Footer', () => { it('should render correctly', () => { const wrapper = mount( <Card> <p>card</p> <Card.Footer>footer</Card.Footer> </Card>, ) expect(wrapper.html()).toMatc...
2,533
0
petrpan-code/geist-org/geist-ui/components/card
petrpan-code/geist-org/geist-ui/components/card/__tests__/index.test.tsx
import React from 'react' import { mount, render } from 'enzyme' import { Card } from 'components' describe('Card', () => { it('should render correctly', () => { const wrapper = mount(<Card>card</Card>) expect(() => wrapper.unmount()).not.toThrow() }) it('should support shadow and hoverable', () => { ...
2,534
0
petrpan-code/geist-org/geist-ui/components/card/__tests__
petrpan-code/geist-org/geist-ui/components/card/__tests__/__snapshots__/footer.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Card Footer should render correctly 1`] = ` "<div class=\\"card\\"><div class=\\"content\\"><p>card</p><style> .content { width: 100%; height: auto; padding: calc(1 * 16px) calc(1 * 16px) calc(1 * 16px) calc(1 * 16px); ...
2,535
0
petrpan-code/geist-org/geist-ui/components/card/__tests__
petrpan-code/geist-org/geist-ui/components/card/__tests__/__snapshots__/index.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Card should render correctly when nested 1`] = ` LoadedCheerio { "0": Node { "attribs": Object { "class": "card", }, "children": Array [ Node { "attribs": Object { "class": "content", }, "children": Array [ ...
2,542
0
petrpan-code/geist-org/geist-ui/components/checkbox
petrpan-code/geist-org/geist-ui/components/checkbox/__tests__/group.test.tsx
import React from 'react' import { mount, render } from 'enzyme' import { Checkbox } from 'components' describe('Checkbox Group', () => { it('should render correctly', () => { const wrapper = mount( <Checkbox.Group value={[]}> <Checkbox value="sydney">Sydney</Checkbox> </Checkbox.Group>, ...
2,543
0
petrpan-code/geist-org/geist-ui/components/checkbox
petrpan-code/geist-org/geist-ui/components/checkbox/__tests__/index.test.tsx
import React from 'react' import { mount, render } from 'enzyme' import { Checkbox } from 'components' describe('Checkbox', () => { it('should render correctly', () => { const wrapper = mount(<Checkbox checked={true}>Sydney</Checkbox>) expect(() => wrapper.unmount()).not.toThrow() const rendered = render...
2,544
0
petrpan-code/geist-org/geist-ui/components/checkbox/__tests__
petrpan-code/geist-org/geist-ui/components/checkbox/__tests__/__snapshots__/group.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Checkbox Group should render correctly 1`] = ` LoadedCheerio { "0": Node { "attribs": Object { "class": "group", }, "children": Array [ Node { "attribs": Object { "class": "checkbox", }, "children": Array [ ...
2,545
0
petrpan-code/geist-org/geist-ui/components/checkbox/__tests__
petrpan-code/geist-org/geist-ui/components/checkbox/__tests__/__snapshots__/index.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Checkbox should render correctly 1`] = ` LoadedCheerio { "0": Node { "attribs": Object { "class": "checkbox", }, "children": Array [ Node { "attribs": Object { "fill": "none", "viewBox": "0 0 12 12", }, ...
2,548
0
petrpan-code/geist-org/geist-ui/components/code
petrpan-code/geist-org/geist-ui/components/code/__tests__/index.test.tsx
import React from 'react' import { mount, render } from 'enzyme' import { Code } from 'components' describe('Code', () => { it('should render correctly', () => { const wrapper = mount(<Code>code</Code>) expect(() => wrapper.unmount()).not.toThrow() }) it('should support block mode', () => { const wr...
2,549
0
petrpan-code/geist-org/geist-ui/components/code/__tests__
petrpan-code/geist-org/geist-ui/components/code/__tests__/__snapshots__/index.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Code should repspond to changed by width 1`] = ` LoadedCheerio { "0": Node { "attribs": Object { "class": "pre", }, "children": Array [ Node { "attribs": Object { "class": "", }, "children": Array [ ...
2,552
0
petrpan-code/geist-org/geist-ui/components/col
petrpan-code/geist-org/geist-ui/components/col/__tests__/index.test.tsx
import React from 'react' import { mount, render } from 'enzyme' import Col from '../index' describe('Col', () => { it('should render correctly', () => { const wrapper = mount(<Col>col</Col>) expect(wrapper).toMatchSnapshot() expect(() => wrapper.unmount()).not.toThrow() }) it('should work with span...
2,553
0
petrpan-code/geist-org/geist-ui/components/col/__tests__
petrpan-code/geist-org/geist-ui/components/col/__tests__/__snapshots__/index.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Col should render correctly 1`] = `ReactWrapper {}`; exports[`Col should work with span and offset 1`] = ` LoadedCheerio { "0": Node { "attribs": Object {}, "children": Array [ Node { "attribs": Object { "class": "col ", }, ...
2,559
0
petrpan-code/geist-org/geist-ui/components/collapse
petrpan-code/geist-org/geist-ui/components/collapse/__tests__/group.test.tsx
import React from 'react' import { mount, render } from 'enzyme' import { Collapse } from 'components' import { updateWrapper } from 'tests/utils' describe('Collapse Group', () => { it('should render correctly', () => { const wrapper = mount( <Collapse.Group> <Collapse title="title1">content1</Coll...
2,560
0
petrpan-code/geist-org/geist-ui/components/collapse
petrpan-code/geist-org/geist-ui/components/collapse/__tests__/index.test.tsx
import React from 'react' import { mount, render } from 'enzyme' import { Collapse } from 'components' import { updateWrapper } from 'tests/utils' describe('Collapse', () => { it('should render correctly', () => { const wrapper = mount(<Collapse title="title">content</Collapse>) expect(wrapper).toMatchSnapsh...
2,561
0
petrpan-code/geist-org/geist-ui/components/collapse/__tests__
petrpan-code/geist-org/geist-ui/components/collapse/__tests__/__snapshots__/group.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Collapse Group should be no errors when children are missing 1`] = `ReactWrapper {}`; exports[`Collapse Group should render correctly 1`] = `ReactWrapper {}`; exports[`Collapse Group should work without accordion 1`] = ` LoadedCheerio { "0": Node { "attribs":...
2,562
0
petrpan-code/geist-org/geist-ui/components/collapse/__tests__
petrpan-code/geist-org/geist-ui/components/collapse/__tests__/__snapshots__/index.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Collapse should render correctly 1`] = `ReactWrapper {}`; exports[`Collapse should work with initial visible 1`] = ` LoadedCheerio { "0": Node { "attribs": Object {}, "children": Array [ Node { "attribs": Object { "class": "collapse...
2,565
0
petrpan-code/geist-org/geist-ui/components/css-baseline
petrpan-code/geist-org/geist-ui/components/css-baseline/__tests__/baseline.test.tsx
import React from 'react' import { render } from 'enzyme' import { CssBaseline, GeistProvider } from 'components' describe('CSSBaseline', () => { it('should render correctly', () => { const wrapper = render( <GeistProvider> <CssBaseline /> </GeistProvider>, ) expect(wrapper).toMatchSn...
2,566
0
petrpan-code/geist-org/geist-ui/components/css-baseline/__tests__
petrpan-code/geist-org/geist-ui/components/css-baseline/__tests__/__snapshots__/baseline.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`CSSBaseline should render correctly 1`] = ` LoadedCheerio { "0": Node { "attribs": Object {}, "children": Array [ Node { "data": " html, body { background-color: #fff; color: #000; } html { ...
2,569
0
petrpan-code/geist-org/geist-ui/components/description
petrpan-code/geist-org/geist-ui/components/description/__tests__/index.test.tsx
import React from 'react' import { mount } from 'enzyme' import { Description } from 'components' describe('Description', () => { it('should render correctly', () => { const wrapper = mount(<Description title="title" />) expect(wrapper).toMatchSnapshot() expect(() => wrapper.unmount()).not.toThrow() })...
2,570
0
petrpan-code/geist-org/geist-ui/components/description/__tests__
petrpan-code/geist-org/geist-ui/components/description/__tests__/__snapshots__/index.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Description should render correctly 1`] = `ReactWrapper {}`;
2,573
0
petrpan-code/geist-org/geist-ui/components/display
petrpan-code/geist-org/geist-ui/components/display/__tests__/index.test.tsx
import React from 'react' import { mount, render } from 'enzyme' import { Display } from 'components' describe('Display', () => { it('should render correctly', () => { const wrapper = mount(<Display caption="caption">display</Display>) expect(wrapper).toMatchSnapshot() expect(() => wrapper.unmount()).not...
2,574
0
petrpan-code/geist-org/geist-ui/components/display/__tests__
petrpan-code/geist-org/geist-ui/components/display/__tests__/__snapshots__/index.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Display should render correctly 1`] = `ReactWrapper {}`; exports[`Display should support react-node 1`] = `ReactWrapper {}`; exports[`Display should work with shadow and width 1`] = ` LoadedCheerio { "0": Node { "attribs": Object {}, "children": Array [ ...
2,577
0
petrpan-code/geist-org/geist-ui/components/divider
petrpan-code/geist-org/geist-ui/components/divider/__tests__/index.test.tsx
import React from 'react' import { mount, render } from 'enzyme' import { Divider } from 'components' describe('Divider', () => { it('should render correctly', () => { const wrapper = mount(<Divider />) expect(wrapper).toMatchSnapshot() expect(() => wrapper.unmount()).not.toThrow() }) it('should wor...
2,578
0
petrpan-code/geist-org/geist-ui/components/divider/__tests__
petrpan-code/geist-org/geist-ui/components/divider/__tests__/__snapshots__/index.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Divider should render correctly 1`] = `ReactWrapper {}`; exports[`Divider should support float 1`] = `ReactWrapper {}`; exports[`Divider should work with align and volume 1`] = ` LoadedCheerio { "0": Node { "attribs": Object {}, "children": Array [ ...
2,581
0
petrpan-code/geist-org/geist-ui/components/dot
petrpan-code/geist-org/geist-ui/components/dot/__tests__/index.test.tsx
import React from 'react' import { mount, render } from 'enzyme' import { Dot } from 'components' describe('Dot', () => { it('should render correctly', () => { const wrapper = mount(<Dot />) expect(wrapper).toMatchSnapshot() expect(() => wrapper.unmount()).not.toThrow() }) it('should supports types'...
2,582
0
petrpan-code/geist-org/geist-ui/components/dot/__tests__
petrpan-code/geist-org/geist-ui/components/dot/__tests__/__snapshots__/index.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Dot should render correctly 1`] = `ReactWrapper {}`; exports[`Dot should supports types 1`] = ` LoadedCheerio { "0": Node { "attribs": Object {}, "children": Array [ Node { "attribs": Object { "class": "dot", }, "chi...
2,587
0
petrpan-code/geist-org/geist-ui/components/drawer
petrpan-code/geist-org/geist-ui/components/drawer/__tests__/index.test.tsx
import React from 'react' import { mount } from 'enzyme' import { Drawer } from 'components' import { nativeEvent, updateWrapper } from 'tests/utils' import { expectDrawerIsClosed, expectDrawerIsOpened } from './use-modal.test' import userEvent from '@testing-library/user-event' describe('Drawer', () => { it('should...
2,588
0
petrpan-code/geist-org/geist-ui/components/drawer
petrpan-code/geist-org/geist-ui/components/drawer/__tests__/use-modal.test.tsx
import React, { useEffect } from 'react' import { mount, ReactWrapper } from 'enzyme' import { Drawer, useModal } from 'components' import { updateWrapper } from 'tests/utils' export const expectDrawerIsOpened = (wrapper: ReactWrapper) => { expect(wrapper.find('.position').length).not.toBe(0) } export const expectD...
2,589
0
petrpan-code/geist-org/geist-ui/components/drawer/__tests__
petrpan-code/geist-org/geist-ui/components/drawer/__tests__/__snapshots__/index.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Drawer customization should be supported 1`] = ` "<div class=\\"wrapper right test-class wrapper-enter\\" role=\\"dialog\\" tabindex=\\"-1\\"><div tabindex=\\"0\\" class=\\"hide-tab start\\" aria-hidden=\\"true\\"></div><h2 class=\\"\\">Modal</h2><style> h2 ...
2,598
0
petrpan-code/geist-org/geist-ui/components/fieldset
petrpan-code/geist-org/geist-ui/components/fieldset/__tests__/group.test.tsx
import React from 'react' import { mount } from 'enzyme' import { Fieldset } from 'components' describe('Fieldset Group', () => { it('should trigger callback when tab clicked', () => { const callbcak = jest.fn() const wrapper = mount( <Fieldset.Group value="two" onChange={callbcak}> <Fieldset l...
2,599
0
petrpan-code/geist-org/geist-ui/components/fieldset
petrpan-code/geist-org/geist-ui/components/fieldset/__tests__/index.test.tsx
import React from 'react' import { mount, render } from 'enzyme' import { Fieldset } from 'components' describe('Fieldset', () => { it('should mount correctly', () => { const wrapper = mount( <Fieldset> <Fieldset.Title>title</Fieldset.Title> <Fieldset.Subtitle>subtitle</Fieldset.Subtitle> ...
2,600
0
petrpan-code/geist-org/geist-ui/components/fieldset/__tests__
petrpan-code/geist-org/geist-ui/components/fieldset/__tests__/__snapshots__/index.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Fieldset should render correctly 1`] = ` LoadedCheerio { "0": Node { "attribs": Object { "class": "fieldset", }, "children": Array [ Node { "attribs": Object { "class": "content", }, "children": Array [ ...
2,609
0
petrpan-code/geist-org/geist-ui/components/grid
petrpan-code/geist-org/geist-ui/components/grid/__tests__/index.test.tsx
import React from 'react' import { mount } from 'enzyme' import { Grid } from 'components' describe('Grid', () => { it('should render correctly', () => { const wrapper = mount( <Grid.Container> <Grid>test</Grid> <Grid>test</Grid> </Grid.Container>, ) expect(wrapper.html()).to...
2,610
0
petrpan-code/geist-org/geist-ui/components/grid/__tests__
petrpan-code/geist-org/geist-ui/components/grid/__tests__/__snapshots__/index.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Grid all breakpoint values should be supported 1`] = ` "<div class=\\"item xs sm md lg xl mock\\"><div class=\\"item xs sm md lg xl mock\\">test<style> .item { font-size: inherit; height: auto; } .justify { justif...
2,618
0
petrpan-code/geist-org/geist-ui/components/image
petrpan-code/geist-org/geist-ui/components/image/__tests__/browser.test.tsx
import React from 'react' import { mount, render } from 'enzyme' import { Image } from 'components' const link = 'https://geist-ui.dev/en-us/guide/introduction' const url = 'data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAUA' + 'AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO' + '9TXL0Y4OHwAAAABJRU...
2,619
0
petrpan-code/geist-org/geist-ui/components/image
petrpan-code/geist-org/geist-ui/components/image/__tests__/index.test.tsx
import React from 'react' import { mount } from 'enzyme' import { Image } from 'components' import { updateWrapper } from 'tests/utils' const url = 'data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAUA' + 'AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO' + '9TXL0Y4OHwAAAABJRU5ErkJggg==' const svg = ...
2,620
0
petrpan-code/geist-org/geist-ui/components/image/__tests__
petrpan-code/geist-org/geist-ui/components/image/__tests__/__snapshots__/browser.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Image Browser should render correctly 1`] = ` LoadedCheerio { "0": Node { "attribs": Object { "class": "browser", }, "children": Array [ Node { "attribs": Object {}, "children": Array [ Node { "attribs":...
2,621
0
petrpan-code/geist-org/geist-ui/components/image/__tests__
petrpan-code/geist-org/geist-ui/components/image/__tests__/__snapshots__/index.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Image should render correctly 1`] = `ReactWrapper {}`; exports[`Image should render correctly 2`] = `ReactWrapper {}`; exports[`Image should render correctly 3`] = `ReactWrapper {}`; exports[`Image should render correctly with svg string 1`] = `ReactWrapper {}`; ...
2,632
0
petrpan-code/geist-org/geist-ui/components/input
petrpan-code/geist-org/geist-ui/components/input/__tests__/index.test.tsx
import React from 'react' import { mount } from 'enzyme' import { Input } from 'components' import { nativeEvent } from 'tests/utils' describe('Input', () => { it('should render correctly', () => { const wrapper = mount(<Input placeholder="placeholder" />) expect(() => wrapper.unmount()).not.toThrow() }) ...
2,633
0
petrpan-code/geist-org/geist-ui/components/input
petrpan-code/geist-org/geist-ui/components/input/__tests__/password.test.tsx
import React from 'react' import { mount, shallow } from 'enzyme' import { Input } from 'components' import { nativeEvent } from 'tests/utils' describe('InputPassword', () => { it('should render correctly', () => { const wrapper = mount(<Input.Password />) const el = wrapper.find('input').getDOMNode() as HTM...
2,634
0
petrpan-code/geist-org/geist-ui/components/input/__tests__
petrpan-code/geist-org/geist-ui/components/input/__tests__/__snapshots__/index.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Input should be work with icon 1`] = ` "<div><div class=\\"with-label\\"><div class=\\"input-container\\"><div class=\\"input-wrapper\\"><span class=\\"input-icon\\"><span>test-icon</span><style> .input-icon { box-sizing: border-box; displ...
2,635
0
petrpan-code/geist-org/geist-ui/components/input/__tests__
petrpan-code/geist-org/geist-ui/components/input/__tests__/__snapshots__/password.test.tsx.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`InputPassword should render correctly 1`] = ` "<div class=\\"with-label\\"><div class=\\"input-container\\"><div class=\\"input-wrapper\\"><input type=\\"password\\" class=\\"right-icon\\" placeholder=\\"\\" autocomplete=\\"off\\" value=\\"\\"><span class=\\"input-ic...