Skip to content

Instantly share code, notes, and snippets.

View jclaveau's full-sized avatar

Jean Claveau jclaveau

View GitHub Profile
@graffhyrum
graffhyrum / 00_ComposablePageObject.md
Last active May 14, 2026 09:42
A Playwright Page (and Component) Object Model template.

Playwright Page and Component Object Model for Robust E2E Testing

This document outlines a highly effective and scalable pattern for organizing Playwright end-to-end tests using a combination of the Page Object Model (POM) and Component Object Model (COM). This approach dramatically enhances code reusability, improves test readability, and ensures maintainability as your application and test suite grow.

Introduction

In the realm of automated testing, particularly with frameworks like Playwright, managing selectors and test logic can become complex. Unstructured test suites often lead to brittle tests that are hard to understand and expensive to maintain. The POM and COM patterns address this by encapsulating the interactions and elements of your web application into dedicated objects.

  • Page Object Model (POM): Represents a distinct page within your web application. It abstracts the underlying HTML structure, providing high-level methods to interact with page elements and query their state. Thi
@cecilemuller
cecilemuller / example.yml
Created October 20, 2020 01:49
Run Docker Compose + in Github Action
name: Test
on:
push:
branches:
- main
- features/**
- dependabot/**
pull_request:
branches:
@vimtaai
vimtaai / markdown-flavors.md
Last active December 23, 2025 23:13
Comparison of features in various Markdown flavors

Comparison of syntax extensions in Markdown flavors

I created a crude comparison of the syntax of the various common Markdown extensions to have a better view on what are the most common extensions and what is the most widely accepted syntax for them. The list of Markdown flavors that I looked at was based on the list found on CommonMark's GitHub Wiki.

Flavor Superscript Subscript Deletion*
Strikethrough
Insertion* Highlight* Footnote Task list Table Abbr Deflist Smart typo TOC Math Math Block Mermaid
GFM
@ahaggart
ahaggart / X1C6_S3_DSDT.patch
Created July 26, 2018 07:05
The patch for the Thinkpad X1 Carbon sleep patch guide
--- dsdt.dsl 2018-03-03 14:47:12.279105691 +0100
+++ dsdt.dsl 2018-03-03 14:26:30.606427931 +0100
@@ -18,9 +18,8 @@
* Compiler ID "INTL"
* Compiler Version 0x20160527 (538314023)
*/
-DefinitionBlock ("", "DSDT", 2, "LENOVO", "SKL ", 0x00000000)
+DefinitionBlock ("", "DSDT", 2, "LENOVO", "SKL ", 0x00000001)
{
- External (_GPE.TBNF, MethodObj) // 0 Arguments
@mlocati
mlocati / exceptions-tree.php
Created March 9, 2017 10:58
Throwable and Exceptions tree
<?php
if (!function_exists('interface_exists')) {
die('PHP version too old');
}
$throwables = listThrowableClasses();
$throwablesPerParent = splitInParents($throwables);
printTree($throwablesPerParent);
if (count($throwablesPerParent) !== 0) {
die('ERROR!!!');
@colemanw
colemanw / font-awesome-mime-type-icons.php
Last active June 5, 2025 19:55 — forked from guedressel/font-awesome-mime-type-icons.php
Font Awesome File Icons: Mapping MIME Types to correct icon classes
<?php
/**
* Get font awesome file icon class for specific MIME Type
* @see https://gist.github.com/guedressel/0daa170c0fde65ce5551
*
*/
function ($mime_type) {
// List of official MIME Types: http://www.iana.org/assignments/media-types/media-types.xhtml
$icon_classes = array(
@wpscholar
wpscholar / vagrant-cheat-sheet.md
Last active May 10, 2026 16:01
Vagrant Cheat Sheet

Typing vagrant from the command line will display a list of all available commands.

Be sure that you are in the same directory as the Vagrantfile when running these commands!

Creating a VM

  • vagrant init -- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.
  • vagrant init <boxpath> -- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example, vagrant init ubuntu/trusty64.

Starting a VM

  • vagrant up -- starts vagrant environment (also provisions only on the FIRST vagrant up)
@simonsmith
simonsmith / amd-jquery-plugin.js
Last active April 29, 2020 15:28
AMD compatible plugin for jQuery
// UMD dance - https://github.com/umdjs/umd
!function(root, factory) {
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else {
factory(root.jQuery);
}
}(this, function($) {
'use strict';