►
Description
In this session we dived into writing fixtures to replace hard coded graphql responses in Frontend specs.
Thumbnail: AI-generated by DALL-E. Thanks DALL-E!
A
Record
on
james
has
got
something
good
in
the
oven.
A
B
B
So
I
received
this
comment
and
I
made
it
into
a
issue
so
we're
using
a
json
to
mock
the
rotations
for
the
on-call
schedule.
B
So
it's
just
mocking
the
graphql
call,
that's
it
and
what
is
asked
is
if
we
can
use
graphql
fixtures
to
mock
these
files-
and
I
don't
understand
how
to
do
this
at
all.
That
sounds.
A
B
So
I've
got
the
documentation
here
linked
yeah
I
read
through
and
I'm
still
pretty
stuck.
I
don't
know
where
to
start.
A
So
these
fixtures
are
a
bit
magical,
so
don't
don't
feel
bad
for
feeling
like
I'm.
Certainly
I'm
missing
something
because
you're
not
it's
it's
it's
actually
quite
magical,
so
that,
like
it
when
these,
when
these
specs
they
technically
get
run
by
rspec,
and
that
it
is
actually
gonna
be
the
name
of
the
fixture
file
that
is
going
to
output
the
graphql
response
to,
and
it
just
does
this
magically
behind
the
scenes.
So
it
is
quite
a
bit
of
magic
that
happens
here.
I
think
let's
follow.
A
B
A
To
yeah
yeah
and
that's
fine,
so
it
looks
like
there's
some
like
unrelated
tiding.
Maybe
I
mean
slightly
related.
Tidying,
that's
not
totally
related
to
what
we're
trying
to
do.
Oh,
I
see
yes,
so
previously,
this
fixture
was
just
about
the
controller
I
see
like
on
line
five.
A
It
was
just
targeting
the
jobs
controller,
so
miguel
took
it
upon
himself
to
say
no,
the
top
scope
is
jobs,
but
then
we're
going
to
have
an
inner
describe,
that's
doing
the
jobs
controller,
and
I
bet
if
you
scroll
down
you'll,
see
something
about
the
graphql
or
something
yeah.
If
you
keep
going
down,
these
changes
won't,
be
probably
won't
be
that
nice
yeah
and
then
we're
going
to
describe
the
query
and
here's
all
the
stuff
we
need
for
the
quarry
and
like
this
is
actually
new
stuff
that
we're
adding
okay,
so
yeah.
A
A
A
A
B
B
A
When
your
ide
doesn't
highlight
or
treat
anything
special,
you
don't
miss
it.
B
A
Yes,
but
I
am
now
noticing
that
this
describe,
we
might
want
to
add,
we
might
want
to
add
the
top
line
similar
to
not
this
one,
but
the
one
that
miguel
had
where
he
had
just
a
string
on
that
top
level
described
yeah
yeah
from
line
one
to
five.
Let's
have
that
be
our
or
actually,
let's
include
all
the
way
to
eight
one
to
eight
that
should
probably
be
the
top
of
the
file,
probably
not
the
api
helpers.
We
won't
need
that,
but
yeah
yep
okay.
A
So
I'm
pretty
sure
if
we
did
look
at
the
other
fixture
files,
we'll
see
that
we
need
this
javascript
fixtures
helper
and
because
we're
doing
these
graphql
methods,
I'm
pretty
sure
that
implies
us
needing
this
graphql
helper.
So
we
could
look
at
other
examples
that
do
that,
I'm
pretty
sure
we
won't
need
api
helpers,
so
we
can
get
rid
of
line
six.
A
B
B
B
Any
yeah
any
any
in
the
request:
okay
yeah.
I.
A
A
Yeah,
but
I
think
it's
I
think
it's
good
to
bring
it
up,
because
I
think
the
way
we
do
these
fixtures
might
be
different
because
there's
so
much
magic
going
on
like
it
might
be
faster,
maybe-
and
it
might
require
us-
also
doing
a
very
special
way
for
those
certain
shared
global
variables
to
get
filled
like
so
I
I
I
really
don't
know
so
when
it
comes
to
the
fixtures.
I
I
copy
a
lot
of
what's
already
there.
A
Thankfully,
this
is
all
test
code,
so
it's
gets,
you
know,
should
run
and
get
verified
automatically.
So
I
think,
on
line
12,
we
want
to
replace
this
with
a
path
to
the
query.
We
want
to
simulate.
A
A
A
B
A
Yeah
and
I'm
not
sure,
if
anything,
changes
with
how
we
do
our
path.
A
A
Okay,
so
let's
change
our
descript,
so
this
is
now
lives
in
ee.
That's
great!
Let's
change
the
describe
we're
not
in
jobs,
we're
doing
on-call
schedule.
I
guess
on
line
five
javascript
fixtures
is
probably
a
good
preface
for
it.
A
The
yeah
the
previous
title
had
in
quotes
javascript
fixtures,
which
might
be
nice
to
include
if
you
go
back
to
our
yeah.
B
A
A
That
one's
not
even
that
one
is
just
nice
javascript
pictures
go
go,
go
to
the
issues.
Well,
let's,
let's
just
do
the
javascript.
Look
at
that
one.
Do
you
see
how
it's
just
describing
the
query?
That
was
the
thing
I
was
saying
like
oh.
A
A
That's
great
so
yeah.
Let's
do
that!
Let's
get
rid
of
line
five!
We
don't
need
that
if
we
go
to
the
one
above
us,
this
on-demand
das,
scans.
A
So
it
looks
like
the
path
are
any
of
these
going
to
an
ee
folder.
Oh
look
at
look
at
that.
That's
interesting!
If
you
go
to
do
you
see
on
line
33,
how
it
says,
did
graphql
corey
a
string.
A
So
it
looks
like
we
do
the
we'll
do
the
ee
path,
but
we
have
to
say
this
is
ee.
True
for
it
to
look
in
the
ee
directory.
It
looks
like
that's
how
this
works.
A
So,
let's
just
change
line
10
to
I
forgot
what
what
path
we
needed
it
to
be
going
back
to
our
our
spec.
We
had
that
delete
modal
spec,
which
referenced
the
query
path.
A
B
A
No
sorry,
I
didn't
mean
to
throw
you
up
if
you,
let's
copy
that
into
line
13,
so
yeah
all
right.
A
No
other
way
we
want
to
keep
the
function
name,
but
the
argument
is
going
to
be
our
path.
Yeah,
we're
going
to
change
that
argument.
Yep
yep
yeah
on
call
schedules,
query
path:
that's
what
that
should
be
line.
10
needs
to
replace
all
release,
query
path
on
line
12.
B
A
Sweet
okay,
so
this
is
so
far
all
doable
and
has
been
great
the
other
bit
that
we
will
need
here.
A
So
you
see
on
line,
16
is
referencing
admin
and
project.
These
things
don't
exist.
Yet
if
we
go
to
on
the
right
hand
side
of
this
file,
if
you
go
to
the
top,
you
see
all
the
let
it
bees
let
it
be.
A
We'll
need
to
let
some
things
be,
but
I
don't
know
what
exactly
we
all
need.
So
it's
probably
whatever
you
needed
to
let
for
like
a
feature
spec.
Does
on-call
schedule
have
like
feature
specs.
A
A
B
B
B
A
B
B
B
A
Oh,
it
does
all
the
things
cool,
so
what
we
would
run.
We
definitely
don't
need
the
dost.
Let's
get
rid
of
line
11.,
that's
not
needed
and
we're
not
having
an
admin.
So,
let's
change
18
from
on
line
18,
where
we
say
current
user.
Let's
just
change
it
to
current
user
colon
current
user.
A
I
love
our
specs
so
much
yes,
okay,
and
so
then
what
I
do
is,
I
would
run
on
the
terminal,
assuming
you've
run
yarn
bundle
and
you
have
the
gdk
running.
Do
you
have
the
gdk
running.
B
A
Okay,
so
then
I
run
bundle
space,
exec,
exec,
our
no
spring
yeah,
exact
spring
space,
r,
spec
and
then
copy
the
relative
path
of
this
file.
Yep
paste
it
in
there.
B
A
B
A
Yep
two:
I
think
of
that
one.
A
A
B
B
A
B
I
mean
the
way
the
way
ruby
works
is
there's.
You
have
a
class
like
the
the
item
class
and
then
you
just
whatever
include
you
do
applies
on
top
of
that
and
overwrites
and
the
last
thing
wins.
So
if
you
have
multiple
methods
to
find
in
multiple
modules,
the
last
sequential
one
is
going
to
win
interesting.
A
That
so,
if
we
can
do
a,
I
can
navigate
you
there,
I'm
trying
to
think
like
should
we
just
do
find
for
it
I'll
show
you
where
it's
at
and
the
terminal,
let's
let's
ls
and
then
I'll,
navigate
you
to
there.
So
it's
ls
shouldn't
it
get.
A
Ls
but
not
don't
press
enter
let's,
let's
navigate
to
folders,
so
it's
in
the
temp
directory
tmp,
oh
tm.
I
think
it's
tmp.
B
A
A
B
A
B
B
A
Yeah,
so
this
is
all
great,
but
nose
is
empty,
so
this
fixture
is
not
super
helpful.
We
need
to
let
it
be
some
things
so
that
the
nodes
won't
be
empty
right,
so
I
don't
know
how
we
create
the
thing
that
is
needed
here.
B
So
let's
so
is
it
a
trait
of
you
should
look
at
the
the
factory
bot
declaration
of
of
the
project
and
see,
if
there's
a
trait,
to
give
you
on
call,
you
might
want
to
look
at
one
of
the
existing
on-call
r-spec
things,
maybe
of
the
the
model
or
the
controller
possibly
or
the
service,
and
see
if
it's
an
example.
A
A
I
would
we're
looking
for.
Oh
there
we
go,
yeah,
look,
look
there,
we
go,
let
it
be
on
the
finder
specs.
A
A
B
A
B
B
B
B
A
A
A
It's
because
it's
not
a
public
project
and
it
was
previously
a
public
project
and
we
haven't
said
that
the
user
is
an
owner
of
this
either.
Maybe
we
want
to
add
the
user
as
an
owner
of
this
project.
A
No,
no
so
we
create
a
group
so
on
line
29
you
see
like
it
does
a
thing
where
we're
creating
the
we're
creating
the
user.
As
a
group
member
okay,
I
think
we
can
set
it
in
the
factory
that
the
owner
of
the
project
is
the
user.
I
think
we
could
do
just
owner
user
yeah.
You.
B
You
just
it's,
you
can
do
creator,
that's
where.
A
A
B
B
A
A
B
So
I
mean
at
this
point
I
would
start
dropping
debugs
into
the
query
itself
and
see
what
what
data
it's
not
getting
and
why
well.
A
B
A
A
B
Also,
is
it
an
ee
permission?
Do
we
need
to
add
a
like
a
license
feature
stub
license
feature
for
this.
A
Maybe
but
right
now
the
project
is
being
null
and
that's
that's
concerning,
because
it's
like
the
that's
the
main
issue
doesn't
have
to
do
previously.
It
wasn't
null.
It
was
finding
this.
So,
let's,
let's
just
do
this
if
you
go
to
on,
let
me
try
this
and
then
we'll
do,
let's
add
a
before
after
the
let
it
be
sorry,
after
all
the
let
it
bees,
let's
just
do
it
before,
do.
A
Yeah,
if
we
do
project
dot,
add
user,
add
member.
A
Yep
ad
member,
open
parentheses,
user,
common,
comma,
colon
owner
or
maintainer
either
one
of
those
would
be
fine,
probably
yeah,
yes,
yeah
and
then
end
the.
A
B
So
I
think
another,
a
better
example
to
look
at
might
be
the
destroy
service
spec
in
on-call
rotations,
because
it
is
creating
a
a
fully
featured
one
to
destroy
sorry,
I'm
just.
B
Destroy
service
spec
like
in
where
is
it
my
nee
members
expect
services,
ee
members.
B
Okay
line
96
ish.
B
B
A
Let's
give
it
a
quick,
so,
let's,
let's
add
a
let
it
be,
let's
add
before
the
project
online
above
line
11,
let's
add
a
light
at
b
group.
A
B
And
then
so
the
project
one
schedule
just
rename
that
to
whenever
your
project
schedule
sure
yeah.
A
User
and
then
and
then
project
instead
of
project,
one
schedule
on
line
18
and
19
they'll
just
be
project
schedule,
project
rotation,.
A
B
The
let
bang
means
this
is
like,
I
think.
A
B
B
We
only
have
one
yet
so.
Oh.
A
B
What
is
this
property
supposed
to
be
on
one
project
that
we're
looking
for
sorry,
I
don't
understand
the
question:
what
are
we
missing
like
we're,
we're
looking
to
get?
What
added
can
we
look
at
the
query
and
see
our.
A
B
A
I
think
I
found
an
example:
can
we
can
we
on
on
schedule
our
fixture
that
we're
working
on
on
the
before
deal?
Can
we
do
stub
license
feature.
B
A
B
A
I
would
I
would
start
by
looking
at
the
can.
We
look
at
the
result
and
then
there's
the
graphql
property
name,
which
we
can
start
looking
at
the
resolver.
The
type
that's
needed.
A
You
go
to
I'll
lead
you
to
there.
If
you
go
to
the
to
the
response
that
we're
getting
here,
the
fixture
response
that
corey
jason
thing
incident
management
on
call
schedules,
the
that
property
name
that's
empty
nodes
on
the
back
inside.
This
is
gonna,
be
snake
case.
So
if
we
can
snake
case
it
and
see
where
it's
where
it's
referenced,
that
might
be
helpful.
A
There's
so
to
see
there
there's
a
field
on
the
project
type.
Let's
go
to
that
one.
The
project
type
has
a
field
right
below
that
one
yep.
A
B
Yeah,
okay,.
A
A
Can
we
open
up
a
rails,
console
oh
a
bit,
we
guess
we
can.
Let's
do
it.
Let's
do
it
yes,
rails
console.
Let's
do
it.
Can
we
do
like
a
binding
pry
thing
on
our
fixture.
A
A
A
We
don't
need
the
rails.
Con
yeah
it'll
open
up
its
own
little
debugger
thing.
Oh
there,
it
is
okay,
all
right
type
in
project.
It's
project,
a
thing:
that's
working,
yay,
it's
the
thing.
So
we
do
project
dot
incident
management
on
call
schedules.
A
Is
it
not
oh
really,
let's
just
try
it
then
I'll
I'll
paste,
the
it's
in
the
zoom
chat,
the
field
I'm
looking
for.
So
this
is
on
the
model
that
the
resolver
should
be
pulling
wow
and
it's
non-empty.
Why
is
it
returning
empty
when
we
do
it.
A
Yeah
you're
good.
Can
we
clear
out
our
oh.
B
A
B
A
Meant,
oh
you're
good,
I
was
gonna,
say
copyline
33
and
run
it
here
and
see
if
we
get
anything
as
a
response.
A
B
A
What
because
you're
in
a
terminal
debugger
you
can,
I
think
you
can
type
in
yeah
yeah
and
then
run
it.
Yes,
let's
do
it.
B
A
Well,
yeah,
let's
just
let's
just
go
ahead
and
press
exit,
so
it'll
continue,
let's
type
exit
and
so
it'll
continue
running
this
stuff.
Oh,
it
failed
I'll
fail,
probably
because
we've
ran
it
twice
or
something
I
didn't
like,
because
we
manipulated
stuff.
Well,
that's
not
just
yeah.
A
I
think
we
get
rid
of
the
binding
pry,
but
I
think
chad,
you
brought
up
a
good
question
of
like.
Is
this
even
working
so.
A
A
That
that's
working
okay,
yeah.
So
that
looks
like
a
thing.
So
if
we
can
run
use
the
graphql
explorer
here
so
we're.
A
Yep
man,
we're
going
through
all
all
sorts
of
all
sorts
of
knowledge
sharing,
is
happening
so
open
a
new
tab
and
go
to
your
your
the
origin,
which
is
the
ip
colon
3000
or
whatever
ip
colon
3000.
That's
a
pretty
good
show
name.
Maybe
right
makes.
A
It's
pretty
good
yep
graphql
explorer
great.
Let's
paste
the
query.
A
B
A
It'll
be
every
everything
up
to
the
empty
hyphen.
Yes,
yes,.
A
I'm
yes,
without
the
trailing
slash
for
sure.
B
A
Yeah,
I
don't.
I
don't
know
why
these
things
aren't.
A
I
I
don't
know
this,
so
this
is
the
situation
and
I
would
reach
out
to
backender
so
we've
we
spent
so
much
time
on
this
I'd
reach
out
to
a
backender.
That's
familiar
with
this
feature
for
help.
Like
I
don't
know
what
factories
I
need
to
set
up
for
this
to
not
be
empty.
A
A
If
we
dive
into
the
expect
graphql
errors
to
be
empty,
let's,
let's
copy
that
method
name
and
do
a
project
wide
search
to
see
if
we
can
find
where
that's
defined
yeah
expect
this
one
yeah.
If
you
do
project
that
should
be
deft
somewhere,
is
there
a
def
anywhere
for
that
yeah?
There
we
go
graphql,
hoppers
all
right,
there's
flattened
errors,
where's
graphql
errors,
great
reference
somewhere
in
here
we'll
also
have
graphql
errors
referenced.
I
think
that
might
be
up.
Maybe.
A
A
A
Yes
raises
an
error.
If
no
data
is
found
yeah,
let's
do
graphql
data.
I
think
I
think
that'll
be
so
instead
of
that,
let's
do
something
like
ex,
I'm
not
sure
how
to
use
dig
at,
but
one
of
these
will
be
able
to
say
something
like
this:
we'll
be
I'll
type.
It
out
we'll
be
able
to
do
something
like
graphql
data.
A
A
A
A
Yep
nodes
equals
yep
yeah.
I
re
I
have
a
strong
urge
to
like
tell
you
know
some
toddlers.
I
got
your
nodes,
I
don't
think
they
would
care.
A
B
B
It's
yeah,
it
should
be
null
or
empty.
I
mean
yeah
array
or
hash
and
p
will
fail.
A
B
Exit
yeah,
maybe
press,
save
and
takes
a
little
while
because
it
was
running
the
linter
or
whatever
it
is.
B
B
A
All
right,
I
have
no
idea
I've,
no
freaking
idea,
but
then,
instead
of
referencing
this
as
mock
data,
you
we
can
either
replace
our
references
to
that
thing
and
mock
data
or
replace
mock
data
to
actually
just
re-export
importing
from
this
fixture.
So
you
can
do
a
search
through
the
javascript
files
where
we
do
import.
I
would
do
like
a
project
white
search
for
like
import
dot,
star
fixtures
and
you'll
see,
hopefully,
some
ee
fixtures
being
imported.
A
Yeah
definitely
yeah.
You
want
to
get
rid
of
those
spaces
when
you
when
doing
the
regex
searching
yeah
yeah.
So
those
like
test
fixtures
is
the
alias
that
goes
to
that.
Folder.
A
Yep
something
like
that,
but
we
might
need
to
tweak
it
like.
We
might
need
to
add
more
rotations.
Whatever
previously
we
had,
we
want
to
try
to
get
our
fixture
looking
very
similar
to
the
what
we
previously
had
and
so
yeah.
It
should
just
be
everything
up.
A
B
What
you're
saying
is
in
this
on-call
schedules?
We
might
need
to
add
some
more
participants
so
that
the
mock
data
is
the
same.
A
Yep
yep,
but
now
we're
working
system
thanks,
wow,
that's
no
idea
why
it
was.
Oh,
my
gosh,
that's
so
wild!
I
wonder
if
vs
code
just
wasn't
updating
that
I
I
bet
that
was
it
wow.
This
was
not
a
good
day
for
vs
code.
Well,
thanks
james
thanks
john!
This
is
fun.
Sorry,
we
didn't
get
to
get
it
all
glued
together,
but
you.
B
Might
ask
that
little
helper
method?
We
we
card
occult
it
over,
like
it's
only
three
lines,
but
might
even
try
to
consider
adding
that
to
the
the
factory
or
something
make
it
easier
to
do
since
we
duplicated
it.
Yeah
say
that
again
I
don't
understand
that
ad
rotation
for
user,
like
it's
only
three
lines
that
we
copied
over.
So
it's
not
not
a
big
deal
duplication,
but
it.
B
A
Yeah
and
a
and
you
could
reach
out
to
a
backing
engineer
to
to
help
out
with
that,
if
you,
if
you
even
want
to
or
if
you
want
to
do
it.