generated from Arquisoft/lomap_0
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
affdcc3
commit 60ce74f
Showing
14 changed files
with
168 additions
and
33 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import MyPlacesSidebar from "../../components/MyPlacesSidebar/MyPlacesSidebar"; | ||
import {fireEvent, render, screen} from "@testing-library/react"; | ||
import userEvent from '@testing-library/user-event'; | ||
import App from "../../App"; | ||
import ImageCommentCard from "../../components/CommentCards/ImageCommentCard/ImageCommentCard"; | ||
|
||
test('testing ImageCommentCard', () => { | ||
|
||
render(<ImageCommentCard />); | ||
|
||
//ebusca el boton | ||
//const dataProvider = screen.getByTestId("dataProvider") | ||
//expect(dataProvider).toBeInTheDocument(); | ||
|
||
}); | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import MyPlacesSidebar from "../../components/MyPlacesSidebar/MyPlacesSidebar"; | ||
import {fireEvent, render, screen} from "@testing-library/react"; | ||
import userEvent from '@testing-library/user-event'; | ||
import App from "../../App"; | ||
import RatingCommentCard from "../../components/CommentCards/RatingCommentCard/RatingCommentCard"; | ||
|
||
test('testing RatingCommentCard', () => { | ||
|
||
render(<RatingCommentCard />); | ||
|
||
/* | ||
const avatarElement = screen.getByTestId('avatarCard'); | ||
const imageElement = screen.getByRole('img'); | ||
const typographyElement = screen.getByText(/@/i); | ||
expect(avatarElement).toBeInTheDocument(); | ||
expect(imageElement).toBeInTheDocument(); | ||
expect(typographyElement).toBeInTheDocument(); | ||
*/ | ||
|
||
}); | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import MyPlacesSidebar from "../../components/MyPlacesSidebar/MyPlacesSidebar"; | ||
import {fireEvent, render, screen} from "@testing-library/react"; | ||
import userEvent from '@testing-library/user-event'; | ||
import App from "../../App"; | ||
import TextCommentCard from "../../components/CommentCards/TextCommentCard/TextCommentCard"; | ||
|
||
test('testing textCommentCard', () => { | ||
|
||
render(<TextCommentCard />); | ||
|
||
/* | ||
const avatarElement = screen.getByTestId('avatarCard'); | ||
const imageElement = screen.getByRole('img'); | ||
const typographyElement = screen.getByText(/@/i); | ||
expect(avatarElement).toBeInTheDocument(); | ||
expect(imageElement).toBeInTheDocument(); | ||
expect(typographyElement).toBeInTheDocument(); | ||
*/ | ||
|
||
}); | ||
|
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import MyPlacesSidebar from "../../components/MyPlacesSidebar/MyPlacesSidebar"; | ||
import {fireEvent, render, screen} from "@testing-library/react"; | ||
import userEvent from '@testing-library/user-event'; | ||
import App from "../../App"; | ||
import AddCommentButton from "../../components/CommentsSidebar/AddCommentButton/AddCommentButton"; | ||
|
||
test('testing AddCommentButton', () => { | ||
|
||
render(<AddCommentButton />); | ||
|
||
//ebusca el boton | ||
const boton = screen.getByTestId("AddCommentBotton") | ||
expect(boton).toBeInTheDocument(); | ||
|
||
// Comprueba que el texto del botón sea el esperado | ||
expect(boton.textContent).toBe('Add a text comment '); | ||
|
||
|
||
// Comprueba que el menú desplegable se ha renderizado | ||
const menu = screen.getByTestId("botonMenuComment"); | ||
expect(menu).toBeInTheDocument(); | ||
}); | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import MyPlacesSidebar from "../../components/MyPlacesSidebar/MyPlacesSidebar"; | ||
import {fireEvent, render, screen} from "@testing-library/react"; | ||
import userEvent from '@testing-library/user-event'; | ||
import App from "../../App"; | ||
import CommentsSidebar from "../../components/CommentsSidebar/CommentsSidebar"; | ||
|
||
test('testing CommentsSidebar', () => { | ||
|
||
render(<CommentsSidebar />); | ||
|
||
//busca el boton para añadir comentario | ||
const addBotton = screen.getByRole("button", {name:'Add a text comment'}); | ||
expect(addBotton).toBeInTheDocument(); | ||
|
||
//etiqueta showing | ||
const showing = screen.getByTestId("commentSidebarLabelShowing") | ||
expect(showing).toBeInTheDocument(); | ||
|
||
//tipo de comentarios | ||
const select = screen.getByTestId('Type of comments to show'); | ||
expect(select).toBeInTheDocument(); | ||
|
||
|
||
|
||
|
||
|
||
}); | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import {fireEvent, render, screen} from "@testing-library/react"; | ||
import userEvent from '@testing-library/user-event'; | ||
import App from "../App"; | ||
import Map from "../components/Map/Map"; | ||
|
||
test('testing Map', () => { | ||
|
||
const setSelectedPoint = {lat : -1.22222, lng:-3.564642}; | ||
//mismo problema: expected a string but got undefined | ||
//render(<Map setSelectedPoint={setSelectedPoint} />); | ||
|
||
|
||
|
||
}); | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import {fireEvent, render, screen} from "@testing-library/react"; | ||
import userEvent from '@testing-library/user-event'; | ||
import App from "../App"; | ||
import MyPlacesSidebar from "../components/MyPlacesSidebar/MyPlacesSidebar"; | ||
|
||
test('testing MyPlacesSidebar', () => { | ||
|
||
render(<MyPlacesSidebar />); | ||
|
||
|
||
|
||
}); | ||
|