Skip to content

Instantly share code, notes, and snippets.

<!--
These comments are just guidelines
not a strict set of rules to follow.
-->
**Jira**:
**Design**:
<!--
import addContext from "mochawesome/addContext";
Cypress.Screenshot.defaults({
// Disable default screenshot on fail because we want to change the filename
screenshotOnRunFailure: false,
});
function generateScreenshotName(test) {
const MAX_SPEC_NAME_LENGTH = 220;
return [
Cypress.on('test:after:run', (test, runnable) => {
if (test.state === 'failed') {
let item = runnable
const nameParts = [runnable.title]
// Iterate through all parents and grab the titles
while (item.parent) {
nameParts.unshift(item.parent.title)
item = item.parent
}
@przemuh
przemuh / Eg-Prototype.js
Last active November 8, 2019 07:52
Egnyte Interview Prototype
function A(){
if(!this.name)
this.name = 'A';
}
A.prototype.sayHello = function(){
console.log(this.name + ' says hello');
};
function B(){
import React from "react";
const CharacterCard = ({ children }) => (
<div className="id-card-wrapper">
<div className="id-card">
{ children }
</div>
</div>
);