Skip to content

Instantly share code, notes, and snippets.

View M-Izadmehr's full-sized avatar

Moji Izadmehr M-Izadmehr

  • ABN AMRO Bank N.V. / New10
  • Amsterdam, Netherlands
View GitHub Profile
@M-Izadmehr
M-Izadmehr / Selenium.js
Last active January 5, 2019 10:42
End-to-End (E2E) code samples: searching medium
/**
* 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)
@M-Izadmehr
M-Izadmehr / Selenium_with_Jest.js
Last active January 5, 2019 14:12
End-to-End (E2E) code samples: searching medium
/* 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 / cypress.js
Last active January 5, 2019 21:24
End-to-End (E2E) code samples: searching medium with cypress
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"]')