Skip to content

Instantly share code, notes, and snippets.

View dominikkaegi's full-sized avatar
🎯
Focusing

Dominik dominikkaegi

🎯
Focusing
View GitHub Profile

Start Machine up

<!--startup application-->
docker-compose up
<!--remove application-->
docker-compose down --rmi all
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

E2E Testing With Cypress

Goal of E2E testing

  1. In a first step we aim to automate the smoke tests we run before each release.
  2. In a second step the goal is to increase the scope of the tests to also run with mock data so that we can simulate all kind of states in the FE application and test if the FE behaves correctly. And example for mocked state could be a request failing and making sure the correct error state is displayed on the FE.
  3. In a last step we want to add visual regression tests.

Test Setup

@dominikkaegi
dominikkaegi / Blocking Websites on mac.md
Last active October 12, 2020 07:44
This is an instruction on how to block websites on your computer

1. Edit the /etc/hosts

First open the hosts file:

sudo vim /etc/hosts

Then add the websites you want to be blocked. Make sure to keep the spacing between the ip and the website you want to be bocked. For it to work also with safari we need to add not noly the ipv4 address but also the ipv6 address.

@dominikkaegi
dominikkaegi / jest-mocking-monkey.md
Last active August 24, 2020 14:47
How to change a mock implementation of an imported module without mokey patching?

1. Question concerning Mocking -> Mokey Patching / ES Modules

  • Why does monkey-patching only work for commonJS?
  • Or maybe broader what is an ES module situation?
  • What’s the difference between commonJS and ES Module JS?
  • What is their relation to ES versions?

2. Question concerning mocking whole Modules

Canvas Introduction

1. Setting up Canvas and drawing first line

const canvas = document.querySelector('canvas')

canvas.width = window.innerWidth
canvas.height = window.innerHeight
@dominikkaegi
dominikkaegi / LoopingOverArrays.md
Last active April 3, 2020 15:19
Challenges to iterate over arrays

Challenges

Challeng 1

Create a function which accepts a number as argument and adds 10 to the number.

function addTen(num) {

}