Skip to content

Instantly share code, notes, and snippets.

View carlobeltrame's full-sized avatar

Carlo Beltrame carlobeltrame

  • Zürich, Switzerland
View GitHub Profile
@carlobeltrame
carlobeltrame / hitobito-on-windows.md
Last active March 5, 2021 21:11
Hitobito Setup auf Windows

Setup ist nur mit Administrator-Account auf Windows 10 getestet.

Achtung: Ubuntu und Docker müssen in demselben User installiert werden

WSL 2 und Ubuntu installieren https://ubuntu.com/tutorials/ubuntu-on-windows

Sicherstellen dass das Ubuntu auf WSL Version 2 läuft: PowerShell als Admin starten und wsl --list --verbose ausführen. Dann sollte Ubuntu mit Version 2 aufgeführt sein. Falls Version 1 steht, https://docs.mivrosoft.com/en-us/windows/wsl/install-win10

Docker Desktop for Windows installieren https://hub.docker.com/editions/community/docker-ce-desktop-windows/ und WSL 2 Integration aktivieren wenn nachgefragt wird

@carlobeltrame
carlobeltrame / get-visible-text-content.js
Created February 1, 2021 17:57
A custom Jest matcher in the style of jest-dom, with the power to test only for visible text
import {checkHtmlElement, getMessage, matches, normalize} from '@testing-library/jest-dom/dist/utils'
function isStyleVisible(element) {
const {getComputedStyle} = element.ownerDocument.defaultView
const {display, visibility, opacity} = getComputedStyle(element)
return (
display !== 'none' &&
visibility !== 'hidden' &&
visibility !== 'collapse' &&