This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$event.type == 1 AND $event.path CONTAINS "Adobe\ Acrobat\ Reader.app/Contents/Info.plist" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$event.type == 3 AND $event.path CONTAINS[cd] ".Trash/Adobe\ Acrobat\ Reader." AND $event.prevFile CONTAINS[cd] "/Applications/Adobe\ Acrobat\ Reader.app" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it('Input Should Have Required Attribute', () => { | |
cy.get('#todoText').should('have.attr', 'required') | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('todolist app', () => { | |
beforeEach(() => { | |
cy.visit('/') | |
}) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Show Delete For Content Creator | |
const deleteOption = (element, content) => { | |
const elements = document.querySelectorAll(element); | |
auth.onAuthStateChanged(user => { | |
if (user) { | |
for (let i = 0; i < elements.length; i++) { | |
if (elements[i].id == firebase.auth().currentUser.uid) | |
elements[i].querySelector(content).classList.remove('display'); | |
else elements[i].querySelector(content).classList.add('display'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Delete A Comment or A Thread | |
const deleteContent = (collection, id) => { | |
let toDelete = db.collection(collection).where(firebase.firestore.FieldPath.documentId(), '==', id); | |
toDelete.get().then(snapshot => { | |
snapshot.forEach(doc => { | |
const data = doc.data(); | |
if (firebase.auth().currentUser.uid == data.user) { | |
doc.ref.delete().then(() => { | |
(collection == 'threads') ? getThreads() : setUpComments(data.thread); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 () { |
NewerOlder