Skip to content

Instantly share code, notes, and snippets.

View guilherme-teodoro's full-sized avatar

Guilherme Teodoro guilherme-teodoro

View GitHub Profile
const toggleMachine = Machine({
id: 'vivo-controle',
initial: 'identification',
states: {
identification: {
meta: {
step: {
number: 1
},
path: '/sp/identification'
const machine = Machine({
initial: 'verde',
states: {
verde: {
on: {
PROXIMO: 'amarelo'
}
},
const wizardMachine = Machine({
initial: 'identification',
states: {
identification: {
on: {
NEXT: 'address'
}
},
address: {
on: {
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
const wizardMachine = Machine({
initial: 'identification',
context: { isEligible: false },
states: {
identification: {
on: {
NEXT: 'address'
}
},
address: {
const productCardMobileMachine = Machine({
id: 'productMobileCard',
initial: 'overview',
states: {
overview: {
on: {
CONTINUE: 'closed'
},
initial: 'detailClosed',
states: {
set $mod Mod1
new_window pixel 1
new_float normal
hide_edge_borders none
bindsym $mod+u border none
bindsym $mod+y border pixel 1
bindsym $mod+n border normal
@guilherme-teodoro
guilherme-teodoro / fulcro_testing_library_test.cljs
Last active January 14, 2022 17:08
Fulcro + Testing Library + Karma Example
(ns test
(:require ["@testing-library/dom" :refer [fireEvent getByRole getByText waitFor]]
[cljs.test :refer [deftest async testing use-fixtures]]
[com.fulcrologic.fulcro.application :as app]
[com.fulcrologic.fulcro.components :as comp :refer [defsc]]
[com.fulcrologic.fulcro.dom :as dom]
[com.fulcrologic.fulcro.mutations :as m]))
(use-fixtures :each
{:before (fn []