Skip to content

Instantly share code, notes, and snippets.

Avatar

Moji Izadmehr M-Izadmehr

View GitHub Profile
@M-Izadmehr
M-Izadmehr / cypress.js
Last active Jan 5, 2019
End-to-End (E2E) code samples: searching medium with cypress
View cypress.js
describe('medium search', () => {
it('should successfully find my profile', () => {
cy.visit('https://medium.com/search');
/**
* the functional chains used to:
* select search input, type values, press enter, and assert the first test
*/
cy
.get('form [type="Search"]')
@M-Izadmehr
M-Izadmehr / Selenium_with_Jest.js
Last active Jan 5, 2019
End-to-End (E2E) code samples: searching medium
View Selenium_with_Jest.js
/* eslint-env jest */
/* eslint-disable padded-blocks, no-unused-expressions, no-unused-vars */
/**
* here we import the selenium module
*/
const webDriver = require('selenium-webdriver');
/**
* these are the main functionalities of webdriver
* By allows us to find elements
@M-Izadmehr
M-Izadmehr / Selenium.js
Last active Jan 5, 2019
End-to-End (E2E) code samples: searching medium
View Selenium.js
/**
* here we import the selenium module
*/
const webDriver = require('selenium-webdriver');
/**
* these are the main functionalities of webdriver
* By allows us to find elements
* Key allows us to simulate keyboard keys
* until helps us to wait until a certain criteria is met (for example element is visible)