Skip to content

Instantly share code, notes, and snippets.

View ruanlinos's full-sized avatar

Ruan Linos Alves ruanlinos

View GitHub Profile
This file has been truncated, but you can view the full file.
# Version: 202307172006
# Description: Block. Don't break.
# Title: oisd big
# Last modified: 2023-07-17T20:06:15+0000
# Expires: 1 hours
# Homepage: https://oisd.nl
# Syntax: Domains
# License: CC BY-NC-SA 4.0
# Maintainer: Stephan van Ruth (sjhgvr)
# Contact: contact@oisd.nl
import {shallow} from "enzyme";
import React, {ReactElement, ReactNode} from "react";
import {Input} from "../Input";
import * as Formik from 'formik';
describe('Input component testing', () => {
let wrapper: any;
const useFormikContextMock = jest.spyOn(Formik, 'useFormikContext');
beforeEach(() => {
import {Provider} from 'react-redux'
import configureStore from 'redux-mock-store'
import {shallow, mount} from "enzyme";
import AddTool from "../AddTool";
import withProvider from "../../../hoc/with-provider";
import {render, screen, waitFor} from '@testing-library/react'
import userEvent from '@testing-library/user-event'
describe('Add tool testing', () => {
import React, { ReactElement } from 'react';
import { Provider } from 'react-redux';
import { persistor, store } from '../store';
import { PersistGate } from 'redux-persist/integration/react';
import { Persistor } from 'redux-persist';
export default function withProvider<T>(
WrapperComponent: React.FC<T>,
enhancedStore: any = store
): (props: T) => ReactElement {
import {shallow} from "enzyme";
import React, {ReactElement, ReactNode} from "react";
import {Input} from "../Input";
import * as Formik from 'formik';
describe('Input component testing', () => {
let wrapper: any;
const useFormikContextMock = jest.spyOn(Formik, 'useFormikContext');
beforeEach(() => {
import React from 'react'
import {DivError, DivFieldTools, LabelInputAddTool, TextareaDescriptionAddTool} from "./modal/Modal.styles";
import {Field, FieldAttributes, FormikErrors, FormikTouched, useFormikContext} from "formik";
interface InputProps extends FieldAttributes<any> {
name: string;
label: string;
}
export function Input({name, label, ...props}: InputProps) {
import {Provider} from 'react-redux'
import configureStore from 'redux-mock-store'
import {shallow, mount} from "enzyme";
import AddTool from "../AddTool";
import withProvider from "../../../hoc/with-provider";
import {render, screen, waitFor} from '@testing-library/react'
import userEvent from '@testing-library/user-event'
describe('Add tool testing', () => {
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.seuapp"
<application
android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="@style/AppTheme"
android:launchMode="singleTask">
overwrite: true
schema: "SCHEMA_URL"
generates:
src/generated/graphql.tsx:
plugins:
- "typescript"
- "typescript-operations"
- "typescript-react-apollo"
- "fragment-matcher"
./graphql.schema.json:
, - Map leader, nearly all my custom mappings starts with pressing the comma key
,q - Sidebar filetree viewer (NERDTree)
,w - Sidebar classes, functions, variables list (TagBar)
\ - Toggle both NERDTree and TagBar
,ee - Change colorscheme (with fzf fuzzy finder)
,ea - Change Airline theme
,e1 - Color mode: Dracula (Dark)
,e2 - Color mode: Seoul256 (Between Dark & Light)
,e3 - Color mode: Forgotten (Light)