Skip to content

Instantly share code, notes, and snippets.

View SpencerCooley's full-sized avatar

Spencer Cooley SpencerCooley

View GitHub Profile
import { randomIntFromInterval } from './utils.js';
class InteractiveCube {
// data is a an object with {type: 'thing1', info: 'some info'}
constructor(data, app, position) {
this.app = app;
this.rotateFactor = randomIntFromInterval(1, 5);
this.data = data;
this.type = data.type;
<template>
<Button v-if="moralis" type="button" class="p-button-outlined p-button-primary" id="entryButton" @click="loginWithMoralis(moralis)">
<img alt="logo" :src="`/images/${buttonData.icon}`" style="width: 1.5rem" />
<span class="ml-2 font-bold">{{buttonData.copy}}</span>
</Button>
<Button v-else class="p-button-outlined">
<ProgressSpinner style="width:20px;height:20px" strokeWidth="8" fill="var(--surface-ground)" animationDuration=".5s"/>
</Button>
</template>
<script>
This file has been truncated, but you can view the full file.
{"traceEvents":[{"pid":261,"tid":261,"ts":659882796153,"ph":"X","cat":"toplevel","name":"TaskQueueManager::ProcessTaskFromWorkQueue","args":{"src_file":"../../base/trace_event/trace_log.cc","src_func":"SetEnabled"},"dur":56,"tdur":56,"tts":72057},
{"pid":261,"tid":261,"ts":659882796216,"ph":"X","cat":"toplevel","name":"TaskQueueManager::ProcessTaskFromWorkQueue","args":{"src_file":"../../base/trace_event/trace_log.cc","src_func":"SetEnabled"},"dur":16,"tdur":16,"tts":72119},
{"pid":261,"tid":261,"ts":659882796236,"ph":"X","cat":"toplevel","name":"TaskQueueManager::ProcessTaskFromWorkQueue","args":{"src_file":"../../base/trace_event/trace_log.cc","src_func":"SetEnabled"},"dur":14,"tdur":14,"tts":72140},
{"pid":261,"tid":261,"ts":659884589851,"ph":"X","cat":"toplevel","name":"MessageLoop::RunTask","args":{"src_file":"../../third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc","src_func":"PostDoWorkContinuationLocked"},"dur":412,"tdur":375,"tts":72234},
<template>
<div class="col-md-12">
<h1>Email crud</h1>
<div v-if="loading" class="animated-loader">Loading...</div>
</div>
</template>
<script>
// this tests everything I was pretty much trying to test without worrying about status codes in the axios request.
describe('LoginForm', () => {
it('should trigger attemptLogin on form submit.', ()=>{
const spy = spyOn(cmp.vm, 'attemptLogin')
cmp.update()
cmp.vm.username = 'spencercooley'
cmp.vm.password = 'top_secret'
const theForm = cmp.find('form');
theForm.trigger('submit');
expect(cmp.vm.attemptLogin).toBeCalled()
<template>
<div class="row">
<div class="container">
<div class="col-md-4 col-md-offset-4">
<div class="col-md-12">
<!-- <img src="http://spencercooley.com/static/app/public/images/logo.png" style="width:100%;"> -->
</div>
<div class="col-md-12 no-p no-m">
<template>
<div class="row">
<div class="container">
<div class="col-md-4 col-md-offset-4">
<div class="col-md-12">
</div>
<div class="col-md-12 no-p no-m">
<ul class="error-list " v-for="error in submitErrors">
<li class="error">{{error}}</li>
</ul>
<template>
<div class="row">
<div class="container">
<div class="col-md-4 col-md-offset-4">
<div class="col-md-12">
</div>
<div class="col-md-12 no-p no-m">
<ul class="error-list " v-for="error in submitErrors">
<li class="error">{{error}}</li>
</ul>
<template>
<div class="row">
<div class="container">
<div class="col-md-4 col-md-offset-4">
<div class="col-md-12">
</div>
<div class="col-md-12 no-p no-m">
<ul class="error-list " v-for="error in submitErrors">
<li class="error">{{error}}</li>
</ul>