►
Description
In this session we learn how to contribute to this epic, about converting old Frontend tests to use @vue/test-utils.
https://gitlab.com/groups/gitlab-org/-/epics/2445
We also go over this set up, about contributing just to Frontend tests, avoiding the whole GDK setup:
https://gitlab.com/-/snippets/2293410
Here's the resulting MR we made during this session:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/85145
A
Alrighty,
I
am
going
to
show
you
all
how
to
run
front-end
tests
contributing
to
git
lab.
If
you
don't
want
to
run
the
whole
gdk,
which
sometimes
your
machine
may
not
be
able
to
do,
but
you
would
still
like
to
contribute
to
big
epics
such
as
this
one,
where
we
are
trying
to
convert
our
just
specs
to
use
view
test
details
which
we
do
for
like
90
of
the
js
specs.
A
But
there
are
some
very
old
ones
which
are
not
doing
that
and
use
things
such
as
the
view
mount
component,
helper
and
yeah,
so
we'll
just
walk
through
running
tests
locally
and
making
this
change
and
seeing
what
happens.
So.
I
picked
an
issue
for
us
from
this
epic.
A
A
So
if
I
look
at
my
remotes,
my
fork
is
the
origin.
The
main
git
lab
repo
is
upstream.
I
wrote
a
little
snippet
that
walks
through
setting
this
up,
including
installing
the
prerequisites
which
are
node
and
yarn
and
forking
and
cloning
and
creating
branch
for
us
to
work
on
I've
already
forked.
So,
let's
create
a
branch
for
us
to
work
on.
A
I
am
going
to
go
back
to
my
project.
You
notice
I'm
at
my
project
directory.
A
I
can
run
branch
dash
v
to
see
what
branch
I'm
on
and
I'm
just
on
the
master
branch.
So
let's
go
ahead
and
check
out
a
new
branch.
It's
kind
of
nice
when
we
put
our
the
relevant
issue
number
in
the
branch
name
because
then
git
lab
can
automatically
associate
things.
A
A
Hopefully
that
works
without
taking
that
long
and
I'm
going
to
try
to
drag
out
my
sentences
right
now,
so
that
okay,
awesome
cool,
so
I've
got
upstream
master
I'll,
go
ahead
and
reset
my
new
branch
to
upstream
master
great.
So
I
can
check
out
branch
v,
I'm
on
my
new
branch,
I'm
on
the
latest
upstream
master.
That's
great
I'll!
Go
ahead
and
push
my
new
branch
up.
A
It's
not
ready
yet,
obviously,
because
I
haven't
done
anything
but
I'll
push
it
up
so
that
the
upstream
relationship
is
set-
and
I
can
just
push
commits
when
I
remember
whenever
I'm
ready
and
I
can
create
a
merge
request
right
here
from
the
terminal.
So
that's
great!
Okay!
Let
me
go
and
clear
these
up
and
let
me
open
this
in
vs
code
I
like
to
use
vs
code
to
edit
things
so
going
back
to
this
instruction
set,
which
I'll
include
in
the
youtube
description
descriptions.
A
The
very
first
thing
you
want
to
make
sure
you
have
is
node.js
and
yarn
installed.
If
you
have
asdf.
This
is
very
easy.
You
can
just
run
asdf
install
at
your
project
directory.
I
already
have
ascf
installed.
I
have
all
these
things
already
installed,
so
that's
the
option
I
went
with
or
you
can
choose
to
do
this
manually,
which
is
going
to
be
really
dependent
on
your
system
on
all
sorts
of
things.
So
good
luck!
I
know
you
can
do
it.
A
We've
already
created
branch
to
work
on
great,
so
let's
run
the
specs.
All
we
have
to
do
is
call
yarn
run
jest
and
the
path
is
back
great.
Now,
if
I
do
this.
A
Let's
go
ahead
and
copy
this
one.
If
I
do
this
boom
see
if
it
works,
it's
working,
that's
awesome.
Okay,
there's
one
step
missing
from
this,
which
is
you
might
not
have
the
node
modules
downloaded,
and
so,
if
I
try
to
run
yarn
run,
just
it
kind
of
will
blow
up
because
it
says:
hey
things
that
are
in
node
modules.
Aren't
up
to
date,
probably
need
to
run
yarn.
Install
my
dependencies,
probably
don't
match
the
yarn
lock
file.
Please
run
yarn,
install.
A
Hopefully,
yarn
has
things
cached
and
it's
not
having
to
build
everything
from
scratch,
but
thankfully
yeah
yarn,
it's
pretty
fast,
the
second
time,
the
first
time
you
run
this
might
be
a
little
bit
slower,
but
now
I
run
yarn
run
just
I
just
pressed
up
on
my
keyboard
to
get
back
to
the
that
command.
I
just
ran.
A
And
boom
we're
running
tests
great.
So
let's
go
back
to
the
issue
that
we
want
to
contribute
to.
I
want
to
convert
these
tests,
these
folders
away
from
the
old
style,
so
they
use
view
test
utils.
Let's
look
at
the
epic
again,
so
the
old
style,
so
we
can
search
for
specs
that
import
yeah.
We
want
to
update
specs
using
the
deprecated
helpers
to
use
the
view
to
test
utils
helpers
like
shallow
mount
or
mount
cool.
So
let's
look
at
this
one.
A
A
Let's
see
if
it
works,
that's
great!
It
works
well
so
that
one's
already
done.
Let's
see
these
other
ones
here
in
the
directory
that
one's
using
view
details
that
one's
already
done
and
that
one's
using
v-test
tools,
man.
This
is
making
my
job
easy,
this
one's
already
done,
and
so
is
this
one
great,
but
these
ones
are
not
okay.
A
These
ones
are
not
okay,
but
it
looks
like
these
ones
are.
Since
I'm
a
member
of
this
project,
I
could
probably
already
check
these
off,
but
you
may
not
be
able
to,
and
also
you
can
see
that
some
of
these
files
may
not
even
exist
anymore,
because
some
of
these
issues
were
created
a
long
time
ago,
things
kind
of
changed
since
then
we
can
already
see,
but
there
are
some
that
we
will
need
to
address.
A
So,
let's
first
get
a
test
running
before
we
start
changing
things.
So
let
me
copy
I'm
copying
the
relative
path
for
this
file,
which
is
not
using
v-tests
tails,
and
I'm
going
to
yarn
run
just
paste
that
path
in,
let's
see
what
happens.
A
A
Well,
let's
see
what's
inside
this
directory,
I'm
already
in
the
gitlab
folder,
let's
see
what's
inside
this
directory
wow,
that
directory
doesn't
even
exist.
Well,
this
isn't
a
huge
surprise
if
you're
familiar
with
what
these
are.
So
some
of
our
front-end
tests
will
take
as
an
input
data
generated
from
the
back,
because
we
want
to
avoid
setting
up
the
whole
backup.
A
How
do
we
get
this
data
generated
from
the
back
end?
Well,
there's
a
little
trick
that
we
can
use.
We
can
steal
these
fixtures
from
the
main
gitlab
repo,
so
rather
than
generating
them
locally,
I'm
actually
going
to
steal
them
and
stealing
isn't
quotes.
I
don't
endorse
stealing,
but
I
do
endorse
sometimes
not
running
the
fixtures.
A
So
what
we're
going
to
do?
This
is
a
bit
of
a
wordy
instructions
to
figure
out
how
to
run
specs
that
need
these
front-end
fixtures.
What
we're
basically
going
to
look
for
are
jobs,
these
front-end
fixture
jobs
that
ran
on
the
main
gitlab
repo,
we're
going
to
try
to
find
a
job
that
generated
the
fixture
that
we're
looking
for
and
we're
going
to
download
that
locally
and
extract
it
and
copy
those
contents
and
then
we'll
be
good
to
go.
A
So,
let's
go
to
the
main
gitlab
commits
page,
and
let's
look
for
oh
look
there.
I
am:
let's
look
for
a
pipeline
that
passed
which
had
a
fixture
stage.
A
A
How
many
is
that
five
jobs
for
these
fixtures,
so
I'm
gonna
go
ahead
and
middle
click
on
each
one
of
those
to
open
them
all
up
we're
looking
for
the
job
that
has
epic
mock
meta,
json,
all
right.
Let
me
close
these
other
tabs,
so
let's
just
go
ahead
and
start
here.
Oh
look!
It's
already
telling
us
what
got
printed
up.
No,
these
are
just
actually
the
names
of
the
specs.
A
Let's
go
ahead
and
look
at
the
artifacts
that
may
be
helpful,
so
I'm
going
to
go
to
browse
the
job
artifacts,
I'm
going
to
hit
temp
tests
front
end
fixtures,
ee,
all
right,
we're
looking
for
epic
there's
no
epic
here.
So
this
isn't
the
job.
Let's
look
for
the
next
job,
so
I'm
actually
going
to
just
copy
this
job
id
pop
paste
it
into
my
url.
A
A
A
A
A
You'll
notice
that
this
directory,
when
I
move
these
files
and
I
clean
up
my
temporary
directory,
not
temp
attempt
downloads,
you
notice
that
this
is
all
get
ignored.
So
this
is
why
I
had
to
pull
our
artifacts
from
the
pipeline
they're
not
going
to
be
in
source
control
because
they're
computed
and
derived,
so
we
don't
check
them
into
source
control,
which
is
why
I
have
to
create
this
directory.
A
So
I've
created
that
directory,
but
now
I
want
to
copy
into
there
recursively.
So
I
did
dash
r.
Let
me
go
to
the
downloads
temp
test
front.
End
fixtures
d,
e,
all
of
the
directories
on
there.
I
want
to
copy
them
into
temp
test
front
end
fixtures,
ee
boom.
All
right.
Let
me
go
ahead
and
remove
temp
downloads.
A
A
Nice
now
it's
passing
that's
great.
What
was
I
doing
here?
Oh
yeah.
I
needed
to
convert
this
to
view
tests.
You
tell
us,
so
we
were
just
extending
this
and
calling
mount
component
with
store.
We
don't
need
to
do
that.
We
can
use
view
test
details
so
if
you're
not
familiar
with
futasi
tills,
this
is
all
pretty
much
the
same,
but
I
was
really
hoping
to
find
an
example,
but
I
think
I
closed
it
out.
Let's
see
if
I
can
get
back
to
it
by
searching
for
vtu.
A
All
right,
let's
see
if
you
can
see
an
example,
okay,
here's
an
example
of
your
test
skills
being
being
done.
You
see,
we
have
some
create
component
function,
let's
see
if
we
have
that
kind
of
helper,
so
it
looks
like
we
don't
have
that
kind
of
helper
we're
just
doing
this
in
a
before
each
that's
fine.
A
But
one
of
the
things
that's
sticking
out
is
you
notice
that
this
option
we
pass
to
the
mount
is
actually
called
props
data?
Not
just
props,
pretty
sure
store
is
going
to
be
called
the
same
thing.
I
can
actually
just
look
up
view
test
details.
They
have
pretty
good
documentation,
so
I
can
just
look
up
view
test
details
and
see
what
gets
passed
to
this
mounter.
A
We
can
pass
props
data
and
anything
else
that
we
would
normally
pass
to
there.
I'm
not
sure
where
store
would
go
to,
but
I'm
pretty
sure
that's
I'm
pretty
sure
it
would
go
there
as
well,
but
we
might
need
to
do
something
like
view
use
view
x,
so
we'll
see
what
happens
there,
but
let's
just
play
around
and
see.
Let's
see
what
happens
so
I
I
am
actually
going
to
remove
this
and
I'm
going
to
remove
this
because
we
want
to
get
rid
of
those
and
I
like
resulting
just
resolving
errors.
A
A
A
A
A
A
So
then,
instead
of
using
accessing
the
direct
view
model,
we
want
to
use
the
wrapper
elements,
so
we
can
use
classes
to
determine
if
a
class
exists
or
not.
So
let's
use
that
instead
of
accessing
this
class
list,
then
so
we
can
do
wrapper
classes
block.
A
A
So
we
can
use,
find
and
do
any
kind
of
query
selector
here
and
that's
going
to
give
us
another
view
test
details
wrapper
we
can
see
if
this
is
gonna
exist.
Now,
because
we're
finding
for
a
button,
something
tells
me
we
might
need
to
actually
full
mount.
This
shallow
mount
is
going
to
not
expand
whatever
other
components
it
sees.
So
it's
going
to
stub
out
all
the
components,
so
this
button
happens
to
not
necessarily
be
this
component's
child,
but
a
child
components,
child
component
child
we
won't
find.
So
if
this
test
fails.
A
A
A
Awesome
all
right,
it's
awesome
and
as
I
was,
I
was
expecting
this
one
actually
fails
and
that's
because
this
sidebar
action
is
probably
within
a
grandchild
component.
So
I'm
actually-
and
I
can-
I
can
confirm
that
by
let's
just
look
at
this
file.
A
Oh
no
problem,
but
let's
look
at
that
file.
Yeah.
You
see
the
button
isn't
in
this
immediate
template,
it's
in
this
child.
So
that's
why
we'll
need
to
do
a
full
mount
or
we
could
change
our
tests,
but
that's
kind
of
outscoped
out
of
the
scope
of
what
we're
trying
to
do
here.
A
Awesome
we
passed,
we
converted
this
to
view
tests,
details
per
the
instructions
all
right,
let's
see
if
we
can
do
one
more
man
this
got.
I
think
this
has
the
same
number
of
tests.
Okay,
but
we're
masters
at
this
now
we
can
go
ahead
and
use
next
tick.
That's
fine!
We
don't
need
the
view
and
the
view
extend,
and
we
don't
need
this
helpers
thing.
This
one
is
coming
view
mount
component
helper.
We
don't
want
that.
A
A
A
We
don't
want
to
mutate
our
view
model
in
a
test,
but
rapper
has
a
cool
method
for
doing
this.
Yes,
yes,
yes,
yes,
where
we
can
actually
update
the
props
and
see
what
will
happen
so
we
can
actually
call
this.
We
can
call
rapper
dot,
set
props
sidebar
collapse.
I
hope
this
works.
If
it
doesn't,
I
know
what
another
thing
we
can
do.
A
What
this
is
basically
confirming
is
that
we
can
be
reactive
to
this,
because
the
wrapper
has
already
been
set
up,
and
so
we're
going
to
update
one
of
its
props
and
all
the
things
reacting
to
it
are
going
to
update
which
we're
waiting
for
with
this
next
tick,
and
then
we
could
do
our
confirmations
here.
So
we'll
do
wrapper
classes.
A
Yes,
that's
right,
oops,
all
right.
A
So
now
here
we
are
trying
to
find
a
child.
Something
is
telling
me
that
we
might
not
be
able
to
shallow
mount
this,
but
that's
fine,
that's
kind
of
out
of
scope
with
what
we're
trying
to
do
here,
but
let's
see
if
find
works,
and
this
is
going
to
give
us
a
wrapper,
not
an
element.
So
we
want
to
say
this
is
going
to
exist
to
be
true.
A
But
this
returns,
whether
it's
found
or
not,
it's
always
going
to
be
not
known,
always
gives
us
a
wrapper.
So
all
of
these
null
or
not
null
checks
actually
need
to
be
converted
to
these
exist
to
be
true
checks,
and
then
to
get
these
properties,
we
can
use
the
attributes
method
to
get
see
what
data
attributes
they
are.
So
what
I'm
really
interest?
What
I'm
kind
of
interested
in
doing
would
be
something
like,
let's
say,
attributes.
A
And
let's
see
what
we
get,
let's
just
throw
this
in
there.
I
think
it's
gonna
fail
hopefully
well
and
we'll
see
what
we
get.
Okay,
we
don't
have
any
red
squigglies,
because
we
updated
all
of
the
references
we
got
rid
of
that's
great.
So,
let's
copy
this,
I
probably
should
run
this
first
before
updating
it.
A
A
So,
let's
just
that
might
be
a
nice
thing
to
do,
but
it's
outside
the
scope
of
just
converting
it
to
the
test
details,
great
awesome,
cool,
and
so
I
was
expecting
this
failure,
because,
rather
than
actually
asserting
on
the
elements,
data
set
and
stuff
which
we
could
totally
do
and
we
can
always
access
the
underlying
element
by
dot
elements
from
the
utas
details
wrapper
exposes
that
attribute.
A
A
Maybe
maybe
it'd
be
nice
to
be
concerned
about
aria
label
so,
but
to
only
match
on
some
properties
instead
of
doing
two
equal
for
this
whole
attributes.
That's
giving
me
this
whole
object
of
five
different
properties.
A
I'm
gonna
do
two
match
objects,
and
so
I'm
going
to
pass
into
here
aria
label
add
a
to
do
and
I'll
just
copy.
These
I'll
have
to
get
rid
of
the
oh
gosh.
I
have
to
get
rid
of
the
plus,
but
that's
fine.
A
A
A
A
Oh,
that's
why
I
reviewed
the
target
project
for
okay.
I
guess
I
had
mine
set
as
private
to
test
things
out
at
some
earlier
date,
which
is
why
it
defaulted
to
the
previous
behavior.
I
should
go
ahead
and
set
mine
to
public,
because
there's
no
reason
for
it
to
be
private,
and
that
would
be
just
fine.
A
A
And
after
this
merge
request
is
created,
the
gitlab
bot
and
other
things
will
should
pick
it
up
and
help
triage
it
to
certain
reviewers
so
that
they
can
review
it
and
hopefully,
in
a
matter
of
a
day
or
two,
you
should
have
a
mr
emerged
yeah.
So
thanks
for
watching
glad
this
was
successful
and
have
fun
contributing
to
gitlab.