Skip to content

Instantly share code, notes, and snippets.

View llaine's full-sized avatar
🚀

Louis Lainé llaine

🚀
View GitHub Profile
@llaine
llaine / change.sh
Created September 15, 2020 11:36
Change author commits of a branch
git filter-branch -f --env-filter "GIT_AUTHOR_NAME='llaine'; GIT_AUTHOR_EMAIL='darksioul6@gmail.com'; GIT_COMMITTER_NAME='llaine'; GIT_COMMITTER_EMAIL='darksioul6@gmail.com';" HEAD
expect(element(by.id('UniqueId204'))).toBeVisible();
expect(element(by.id('UniqueId205'))).toBeNotVisible();
expect(element(by.id('UniqueId205'))).toExist();
expect(element(by.id('UniqueId204'))).toHaveText('I contain some text');
expect(element(by.text('I contain some text'))).toHaveId('UniqueId204');
expect(element(by.id('UniqueId533'))).toHaveValue('0');
// Basic press
element(by.id('tappable')).tap();
element(by.id('tappable')).longPress();
element(by.id('tappable')).multiTap(3);
// Fill in inputs
element(by.id('textField')).typeText('passcode');
element(by.id('textField')).replaceText('passcode again');
element(by.id('textField')).clearText();
// Basic selectors example
element(by.id('tap_me'));
element(by.text('Tap Me'));
element(by.type('RCTImageView'));
element(by.traits(['button']));
// Advanced selectors example
element(by.id('mother').withAncestor(by.id('daughter')));
element(by.id('daughter').withDescendant(by.id('mother')));
@llaine
llaine / test.spec.js
Last active August 3, 2017 10:12
How to do end-to-end testing with React-Native. Spec
const { components, typeText, multiTap, reloadApp, asserElementIsVisible, assertElementIsNotVisible, textIsVisible } = require('./helpers');
describe('Employee List', () => {
beforeEach(async () => {
await reloadApp();
});
it('should be able to search for a specific employee and see his profile', async () => {
const ceoName = 'Amy';
const employeeItemId = `${components.employee_list_item}AnupGupta`
@llaine
llaine / helpers.js
Last active August 3, 2017 10:12
How to do end-to-end testing with React-Native - better test.
const components = {
// Components
search_bar: 'search_bar',
employee_list_item: 'employee_list_item_',
employee_show_view: 'employee_details_view',
action_bar_email_button: 'action_bar_email_button'
};
function reloadApp() {
return device.reloadReactNative();
@llaine
llaine / test.spec.js
Last active August 2, 2017 15:03
How to do end-to-end testing with React-Native - easy test.
describe('Employee List', () => {
beforeEach(async () => {
await device.reloadReactNative();
});
it('should be able to search for a specific employee and see his profile', async () => {
await element(by.id('search_bar')).typeText('Amy');
await expect(element(by.id('employee_list_item_AnupGupta'))).toBeNotVisible();
await expect(element(by.id('employee_list_item_AmyTaylor'))).toBeVisible();
@llaine
llaine / Message.rb
Last active October 27, 2016 16:38
ActionCable
class Message < ApplicationRecord
belongs_to :user
belongs_to :channel
validates :body, presence: true, length: {minimum: 2, maximum: 1000}
after_create_commit {
MessageBroadcastWorker.perform_async(self.id)
}
https://www.google.fr/maps/dir/13+Rue+Francis+Plant%C3%A9,+33600+Pessac/44.6305741,-1.2561969/Andernos-les-Bains/Arcachon/Belhade/Vieux-Boucau-les-Bains/Biarritz/Saint-Jean-de-Luz/Carcans/46.1786098,-1.3306003/@44.7081949,-1.3282176,8.21z/data=!4m54!4m53!1m5!1m1!1s0xd54d86047e60ceb:0x250f32a9f56308fd!2m2!1d-0.6186727!2d44.8126677!1m0!1m5!1m1!1s0xd54a36b5c67c873:0x40665174816f0a0!2m2!1d-1.102449!2d44.743536!1m5!1m1!1s0xd549ef8c86711e3:0x40665174816f060!2m2!1d-1.1785016!2d44.652297!1m5!1m1!1s0xd545612b8a1e2d3:0x588bfb764772c032!2m2!1d-0.68446!2d44.378048!1m5!1m1!1s0xd53e284c639f7e7:0x406651748162b30!2m2!1d-1.400962!2d43.785811!1m5!1m1!1s0xd51152b0af31e33:0x40665174813a830!2m2!1d-1.558626!2d43.4831519!1m5!1m1!1s0xd51117e6a0092db:0x406651748139250!2m2!1d-1.663055!2d43.388051!1m5!1m1!1s0x4801e497ff07bea3:0x40665174816eaf0!2m2!1d-1.042335!2d45.079019!1m0!2m1!1b1!3e0
Electric : D’Addario Set Pure Nickel Blues/Jazz Rock 11-48
Acoustic : D’Addario EJ16 Phosphor Bronze