Skip to content

Instantly share code, notes, and snippets.

View pablocattaneo's full-sized avatar

Pablo Cattaneo pablocattaneo

View GitHub Profile
// TextInput has to have the next props
<TextInput
autoComplete="email"
autoCorrect={false}
keyboardType="email-address"
textContentType="emailAddress"
/>
https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/removing-sensitive-data-from-a-repository
# https://reactnative.dev/docs/running-on-simulator-ios
xcrun simctl list devices
yarn ios --simulator "iPhone 14 Pro (16.0)"
https://github.com/react-native-community/cli/blob/main/docs/commands.md
# Problem CONFLICT (content): Merge conflict in ios/Podfile.lock
# Solution
Delete podfile.lock
and pods folder and run pod install
sudo nano /etc/pulse/default.pa
load-module module-echo-cancel aec_args="analog_gain_control=0 digital_gain_control=0"
// https://docs.cypress.io/api/commands/should#Assert-the-checkbox-is-disabled
// source: https://www.udemy.com/course/cypress-end-to-end-testing-getting-started/learn/lecture/36409698?start=123#notes
cy.get('button').should('be.disabled')
// https://www.udemy.com/course/cypress-end-to-end-testing-getting-started/learn/lecture/36409544?start=46#notes
cy.visit('http://localhost:3000/admin')
cy.location('pathname').should('eq', '/admin')
// source: https://docs.cypress.io/guides/tooling/IDE-integration#Triple-slash-directives
//The simplest way to see IntelliSense when typing a Cypress command or assertion is to add a triple-slash directive to the head of your JavaScript or TypeScript testing file. This will turn the IntelliSense on a per file basis. Copy the comment line below and paste it into your spec file.
/// <reference types="Cypress" />
//your code....
// Source: https://docs.cypress.io/guides/references/best-practices#Selecting-Elements
// 1 - Add attribute data-cy="the_name_you_want" to the element that you want to select
// 2 - Use [data-cy='the_name_you_want']
// html
<button id="main" class="btn btn-large" data-cy="submit">Submit</button>
// my-test.cy.js
cy.get('[data-cy="submit"]').click()