Skip to content

Instantly share code, notes, and snippets.

@AlexKamaev
AlexKamaev / test.js
Created April 1, 2019 14:22
1885 testing
import { Selector, ClientFunction } from 'testcafe';
const baseSiteUrl = 'https://www.rapidonline.com';
fixture `Layout tests`
.page(baseSiteUrl)
.beforeEach(async t => {
await t.maximizeWindow();
});
@AlexKamaev
AlexKamaev / index.html
Created December 6, 2018 07:50
Shift+enter in contenteditable element
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>gh-1999</title>
</head>
<body>
<div id="editor" contenteditable="true" style="border: 1px solid black;">
test
@AlexKamaev
AlexKamaev / index.html
Created October 17, 2018 07:43
TestCafe scroll event not getting triggered
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>gh-1999</title>
</head>
<body>
<div style="height: 2000px;"></div>
<div id="section-esg-top-holdings" style="height: 100px; width: 100%; background-color: blue; color: white;"></div>
<div style="height: 2000px;"></div>
const locks = [];
function lock (key) {
locks.push(key);
}
function unlock (key) {
locks.splice(locks.indexOf(key), 1);
}