Skip to content

Instantly share code, notes, and snippets.

View MiguelMadero's full-sized avatar

Miguel Madero MiguelMadero

View GitHub Profile
@MiguelMadero
MiguelMadero / machine.js
Last active March 13, 2021 01:59
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@MiguelMadero
MiguelMadero / machine.js
Last active January 27, 2021 18:53
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions

Summary

Describes the different levels of testing, tools and techniques available on z-frontend for Web Apps. The RFC touches on the levels of testing, how they interact, which tools we use for each, how do we make them scale, when do we run them (locally and different CI/CD) stages. Finally, we also propose changes to our deployment process.

Motivation

There is currently a big Test Gap today. This leads to lack of confidence on doing changes, slower

import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
import Ember from 'ember';
export default Ember.Component.extend({
items: [],
newName: '',
actions: {
addItem () {
console.log('action fired');
console.log(this.get('newName'));
this.get('items').pushObject({name: this.get('newName')});
// initializers/x-routing-service.js
export default {
name: 'x-routing-service',
initialize: function(container, application) {
application.inject('service:routing', 'router', 'router:main');
application.inject('service:routing', 'applicationController', 'controller:application');
}
};
// services/routing.js
import Ember from 'ember';
export default Ember.Component.extend({
init () {
this._super(...arguments);
console.log(this.get('name') + " component init");
},
willInsertElement () {
console.log(this.get('name') + " component willInsertElement");
},
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
init () {
this._super(...arguments);
console.log('app controller init');
Ember.run.scheduleOnce('afterRender', function () {
console.log('app controller init afterRender');
});
import Ember from 'ember';
let counter = 0;
const actualData = {x:1};
const queue = [];
const ProxyObject = Ember.ObjectProxy.extend({
unknownProperty (key) {
console.log('unkknownProperty was called', counter, key);
if (++counter < 15 ) {
//Ember.run.throttle(this,
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
onStreetAddressChange: function() {
var address = this.get('streetAddress2');
address = (address) ? this.get('streetAddress') + ', ' + address : this.get('streetAddress');
this.set('address', address);
}.observes('streetAddress', 'streetAddress2'),
streetAddress: null,