This repository was archived by the owner on Jul 11, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 39
11_Andrea Toledo, Laura Bailón, Yaki Romero #21
Open
Yaki-Zeltzin
wants to merge
33
commits into
Laboratoria:master
Choose a base branch
from
Yaki-Zeltzin:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
80df8e6
subiendo mis estilos
andreatoledo 5c7904b
Changes in CSS, please check
9JazzCodeLBM 3300015
subiendo funcionalidad de likes
andreatoledo 40c9941
Merge branch 'master' of https://github.com/Zeltzin1996/CDMX009-Socia…
andreatoledo 4b557f0
Inicio de Sesión con facebook y google
Yaki-Zeltzin 92a7bdb
uploading likes functionality
andreatoledo f42db11
uploading likes functionality
andreatoledo 75b77f2
Starting with testing
9JazzCodeLBM 287b9e5
login validation testing
Yaki-Zeltzin 681565d
Working with testing
9JazzCodeLBM dc774a0
Trying to download changes
9JazzCodeLBM 9850ec8
Update Readme.md
9JazzCodeLBM ce2e8eb
Update Readme.md
9JazzCodeLBM c7784f4
testing create account
andreatoledo 6eb688b
changes readme
andreatoledo 3bd5a1d
Add files via upload
9JazzCodeLBM a625487
Adding images in ReadMe
9JazzCodeLBM 0de4c4d
Update Readme.md
9JazzCodeLBM 8512a3d
Adding images in ReadMe
9JazzCodeLBM 4a32626
Cleanning files
9JazzCodeLBM 2609348
Checking readme
9JazzCodeLBM 2801454
ReadMe
9JazzCodeLBM 6ea1915
Again readme
9JazzCodeLBM 614d636
Again readme with images
9JazzCodeLBM 6b70448
Update Readme.md
9JazzCodeLBM 353ae06
Update Readme.md
9JazzCodeLBM f482e25
adding commits
Yaki-Zeltzin 5bd21e9
adding commits
Yaki-Zeltzin 6499c98
modifying post and user profile
andreatoledo d708dde
modifying post and user profile
andreatoledo df789df
Update Readme.md
andreatoledo 851442e
Update Readme.md
andreatoledo 4b4f0f0
Update Readme.md
9JazzCodeLBM File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| 0 info it worked if it ends with ok | ||
| 1 verbose cli [ '/usr/bin/node', | ||
| 1 verbose cli '/usr/bin/npm', | ||
| 1 verbose cli 'config', | ||
| 1 verbose cli 'set', | ||
| 1 verbose cli 'prefix', | ||
| 1 verbose cli '/npm', | ||
| 1 verbose cli '-g' ] | ||
| 2 info using npm@3.5.2 | ||
| 3 info using node@v8.10.0 | ||
| 4 info config set "prefix" "/npm" | ||
| 5 verbose stack Error: EACCES: permission denied, open '/etc/npmrc' | ||
| 6 verbose cwd /home/laboratoria112-am/Documentos/laboratoria/CDMX009-Social-Network | ||
| 7 error Linux 4.15.0-72-generic | ||
| 8 error argv "/usr/bin/node" "/usr/bin/npm" "config" "set" "prefix" "/npm" "-g" | ||
| 9 error node v8.10.0 | ||
| 10 error npm v3.5.2 | ||
| 11 error path /etc/npmrc | ||
| 12 error code EACCES | ||
| 13 error errno -13 | ||
| 14 error syscall open | ||
| 15 error Error: EACCES: permission denied, open '/etc/npmrc' | ||
| 15 error { Error: EACCES: permission denied, open '/etc/npmrc' | ||
| 15 error errno: -13, | ||
| 15 error code: 'EACCES', | ||
| 15 error syscall: 'open', | ||
| 15 error path: '/etc/npmrc' } | ||
| 16 error Please try running this command again as root/Administrator. | ||
| 17 verbose exit [ -13, true ] |
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "liveServer.settings.port": 5501 | ||
| } |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
|
|
||
|
|
||
| // LOGIN CON EMAIL Y PWD | ||
|
|
||
| function emailLogin(email, password) { | ||
| //(!email || !password) return 'No existe email o password' | ||
| //if (password.length < 6) return 'No cumple con 6 caracteres' | ||
|
|
||
| firebase.auth() | ||
| .signInWithEmailAndPassword(email, password) | ||
| .catch(function(error) { | ||
| // Handle Errors here. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Estos comentarios deben eliminarse |
||
| const errorCode = error.code; | ||
| const errorMessage = error.message; | ||
| if (errorCode === "auth/invalid-email"){ | ||
| alert("Email inválido") | ||
| } if (errorCode === "auth/user-disabled"){ | ||
| alert("Usuario deshabilitado") | ||
| } if (errorCode === "auth/user-not-found"){ | ||
| alert("Usuario no encontrado") | ||
| } if (errorCode === "auth/wrong-password"){ | ||
| alert("Contraseña incorrecta") | ||
| } | ||
| console.log(`${errorCode} ${errorMessage}`) | ||
| // ... | ||
| }); | ||
| } | ||
|
|
||
|
|
||
| function logout() { | ||
| firebase.auth().signOut().then(function() { | ||
| // Sign-out successful. | ||
| //return true | ||
| }).catch(function(error) { | ||
| // An error happened. | ||
| //return false | ||
| console.log(error) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Todos estos comentarios deben eliminarse |
||
| }); | ||
| } | ||
|
|
||
| // CREAR CUENTA MAIL Y PWD | ||
| function createAccount(mail, pwd) { | ||
| firebase.auth().createUserWithEmailAndPassword(mail, pwd) | ||
| .then(function(){ | ||
| window.socialNetwork.verification(); | ||
| }) | ||
| .catch(function(error) { | ||
| // Handle Errors here. | ||
| const errorCode = error.code; | ||
| const errorMessage = error.message; | ||
| if (errorCode === "auth/email-already-in-use"){ | ||
| alert("Correo en uso") | ||
| //return "Correo en uso" | ||
| } if (errorCode === "auth/invalid-email"){ | ||
| alert("Email inválido") | ||
| //return "Email inválido" | ||
| } if (errorCode === "auth/weak-password"){ | ||
| alert("Contraseña tiene que tener más de 6 caracteres") | ||
| } | ||
| console.log(`${errorCode} ${errorMessage}`) | ||
| }); | ||
| } | ||
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| /*import * as auth from "./auth.js" | ||
|
|
||
| /global.firebase = { | ||
| auth: jest.fn(() => ({ | ||
| signInWithEmailAndPassword: jest.fn(() => new Promise((resolve, reject) => { | ||
| resolve(true) | ||
| })) | ||
| })) | ||
| } | ||
|
|
||
| test('Validaciones de emailLogin', () => { | ||
| let email = "antropologia@gmail.com" | ||
| let password = "123D" | ||
|
|
||
| expect(auth.emailLogin(email, password)).toBe('No cumple con 6 caracteres'); | ||
| expect(auth.emailLogin('', password)).toBe('No existe email o password'); | ||
| }); | ||
|
|
||
| test('emailLogin se ejecuta correctamente', () => { | ||
| let email = "antropologia@gmail.com" | ||
| let password = "123DKL" | ||
|
|
||
| auth.emailLogin(email, password).then(valor => { | ||
| expect(valor).toBe(true) | ||
| }); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Que pro se ven estas pruebas! muy bien! |
||
| }); | ||
|
|
||
|
|
||
|
|
||
| global.firebase = { | ||
| auth: jest.fn(() => ({ | ||
| createUserWithEmailAndPassword: jest.fn(() => new Promise((resolve, reject) => { | ||
| resolve(true) | ||
| })) | ||
| })) | ||
| } | ||
|
|
||
| function falsaCreateAccount(email, pass){ | ||
| if(!email.includes("@")){ | ||
| return "Email inválido" | ||
| } | ||
| } | ||
|
|
||
| test('Validacion incorrecta', () => { | ||
| let email = "suregmail.com" | ||
| let password = "123D" | ||
|
|
||
| expect(falseCreateAccount(email, password)).toBe('Email inválido'); | ||
| expect(auth.createAccount(password)).toBe('No cumple con los 6 caracteres'); | ||
| }); | ||
|
|
||
|
|
||
| test('Validacion correcta', () => { | ||
| let email = "sure@gmail.com" | ||
| let password = "123DOP" | ||
|
|
||
| auth.createAccount(email, password).then(valor => { | ||
| expect(valor).toBe(true) | ||
| }); | ||
| });*/ | ||
|
|
||
| /*function falsesignInWithEmailAndPassword(email, password){ | ||
| if(!email.includes("@")){ | ||
| return "email invalido" | ||
| } | ||
| } | ||
|
|
||
| test('Validacion incorrecta', () => { | ||
| let email = "suregmail.com" | ||
| let password = "123D" | ||
|
|
||
| expect(falsesignInWithEmailAndPassword(email, password)).toBe('Email inválido'); | ||
| expect(auth.emailLogin(password)).toBe('No cumple con los 6 caracteres'); | ||
| });*/ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Todo este archivo está comentado, si no se utiliza debe eliminarse. |
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eliminar este comentario