Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new branch check pr #229

Open
wants to merge 44 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
a78c3d4
Add work-flow
alejandrocabriales Sep 28, 2024
72aa199
Add the date and the directory
alejandrocabriales Sep 28, 2024
bce840c
add lint
alejandrocabriales Sep 29, 2024
751c050
fix the errors
alejandrocabriales Sep 29, 2024
1b69ca9
fix the errors
alejandrocabriales Sep 29, 2024
27493e1
TRY TO FIGURE OUT THE ERROR
alejandrocabriales Sep 29, 2024
63652e5
change to double quotes
alejandrocabriales Sep 29, 2024
4a0ddac
fix the quotes
alejandrocabriales Sep 29, 2024
2243ad3
change the quotes
alejandrocabriales Sep 29, 2024
22046a3
remove simple quotes
alejandrocabriales Sep 29, 2024
2d8b367
fix unnecessary var
alejandrocabriales Sep 29, 2024
ad972db
try to fix trailing spaces not allowed
alejandrocabriales Sep 29, 2024
a46a4e3
add the build and test
alejandrocabriales Sep 29, 2024
3a3382f
fix the error in the code
alejandrocabriales Sep 29, 2024
de53440
add playright
alejandrocabriales Sep 29, 2024
de789f4
add workflow playright
alejandrocabriales Sep 29, 2024
8ef3a19
change the time
alejandrocabriales Sep 29, 2024
af162bc
change the port
alejandrocabriales Sep 29, 2024
6747ff8
fix the ports
alejandrocabriales Sep 29, 2024
e8e4ebe
Check the code in pr
alejandrocabriales Sep 30, 2024
efb9769
Only allows to deploy when merge master
alejandrocabriales Sep 30, 2024
6ed014a
Exercises 11.15-11.16.
alejandrocabriales Oct 1, 2024
2e1b97f
Change to double quotes
alejandrocabriales Oct 1, 2024
4feee5e
Remove error in playwright.config
alejandrocabriales Oct 1, 2024
cb33e60
fix the playwringht file
alejandrocabriales Oct 1, 2024
055e488
remove extra semicolon
alejandrocabriales Oct 1, 2024
f46e755
fix error
alejandrocabriales Oct 1, 2024
da8b2bf
fix error
alejandrocabriales Oct 1, 2024
77e31f4
remove the sapce
alejandrocabriales Oct 1, 2024
e896a4b
Fix the test
alejandrocabriales Oct 1, 2024
5639649
try to fix
alejandrocabriales Oct 1, 2024
ba952bf
fix error in the app
alejandrocabriales Oct 1, 2024
a606698
Fix
alejandrocabriales Oct 1, 2024
d0fbbbe
change dots
alejandrocabriales Oct 1, 2024
da111b7
update the versions of package
alejandrocabriales Oct 1, 2024
621fd39
add the test_job
alejandrocabriales Oct 1, 2024
55fa973
11.16 Skipping a commit for tagging and deployment
alejandrocabriales Oct 4, 2024
5a22579
Exercise 11.18
alejandrocabriales Oct 11, 2024
507b401
Fix the error node version
alejandrocabriales Oct 11, 2024
f75e553
Add node version in test
alejandrocabriales Oct 11, 2024
cd11c09
Fix the error
alejandrocabriales Oct 11, 2024
f27029c
Add production envioroment and add user name
alejandrocabriales Oct 11, 2024
78e0ee4
Add posibility of run manually
alejandrocabriales Oct 11, 2024
c396987
Try other action
alejandrocabriales Oct 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix error in the app
  • Loading branch information
alejandrocabriales committed Oct 1, 2024
commit ba952bfcc2e3f94a95fdc89dc59fe228718d4da3
22 changes: 11 additions & 11 deletions test/App.jest.spec.jsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
import React from "react";
import { render, screen } from "@testing-library/react";
import axiosMock from "axios";
import { act } from "react"; // Manteniendo el act de react
import "@testing-library/jest-dom";
import { BrowserRouter as Router } from "react-router-dom";
import App from "../src/App";
import React from "react"
import { render, screen } from "@testing-library/react"
import axiosMock from "axios"
import { act } from "react"
import "@testing-library/jest-dom"
import { BrowserRouter as Router } from "react-router-dom"
import App from "../src/App"

jest.mock("axios");
jest.mock("axios")

describe("<App />", () => {
it("fetches data", async () => {
axiosMock.get.mockResolvedValueOnce({
data: {
results: [{ url: "https://pokeapi.co/api/v2/pokemon/1/", name: "bulbasaur", id: 1 }]
}
});
})

await act(async () => {
render(<Router><App /></Router>); // Asegúrate de que el render esté dentro de act
render(<Router><App /></Router>)
});

expect(axiosMock.get).toHaveBeenCalledTimes(1);
@@ -28,7 +28,7 @@ describe("<App />", () => {
axiosMock.get.mockRejectedValueOnce(new Error());

await act(async () => {
render(<Router><App /></Router>); // Asegúrate de que el render esté dentro de act
render(<Router><App /></Router>)
});

expect(screen.getByTestId("error")).toBeVisible();