Skip to content

Instantly share code, notes, and snippets.

$event.type == 1 AND $event.path CONTAINS "Adobe\ Acrobat\ Reader.app/Contents/Info.plist"
$event.type == 3 AND $event.path CONTAINS[cd] ".Trash/Adobe\ Acrobat\ Reader." AND $event.prevFile CONTAINS[cd] "/Applications/Adobe\ Acrobat\ Reader.app"
it('Should Mark a Todo Item As Done And Delete It', () => {
cy.get('#todoText').should('be.empty').and('be.visible').type('Learn About Cypress{enter}')
cy.get('.form-check-input').should('be.visible').check()
cy.get('.pointerMouse').should('be.visible').click()
})
it('Should Add Two New Todos to The List', () => {
cy.get('#todoText').should('be.empty').and('be.visible').type('Learn About Cypress')
cy.get('#addBtn').contains('Add').should('be.visible').click()
cy.get('#todoText').should('be.empty').and('be.visible').type('Learn About Cypress{enter}')
cy.get('.list-group-item').should('be.visible')
cy.get('.list-group > .btn').contains('Delete list').should('be.visible')
})
it('Input Should Have Required Attribute', () => {
cy.get('#todoText').should('have.attr', 'required')
})
it('Page Should Containt The Following Strings', () => {
cy.get('#heading').contains('todolist').should('be.visible')
cy.get('#subHeading').contains('What needs to be done?').should('be.visible')
cy.get('#todoText').should('be.empty').and('be.visible')
cy.get('#addBtn').contains('Add').should('be.visible')
cy.contains('There\'s nothing to do today.').should('be.visible')
})
describe('todolist app', () => {
beforeEach(() => {
cy.visit('/')
})
})
<script>
getThreads();
</script>
// Event Listeners
// Reload Home
$$(document).on('click', '.back-link', function () {
$$(document).on('page:init', '.page[data-name="home"]', function () {
window.location.reload();
});
});
// Get Data for Thread Details Page
$$(document).on('click', '.thread-details', function () {
// Listen for Auth Status Changes
auth.onAuthStateChanged(user => setUpUI(user));