-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from USB-CI3715/test-estilo
Test para verificacion de estilos
- Loading branch information
Showing
1 changed file
with
22 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Importamos las bibliotecas necesarias | ||
import "@testing-library/jest-dom"; | ||
import { render } from "@testing-library/react"; | ||
|
||
// Importamos el archivo SCSS | ||
import "../node_modules/nodebb-theme-harmony/scss/topic.scss"; | ||
|
||
describe("Estilos de Topic SCSS", () => { | ||
test("debe aplicar la clase de estrella en amarillo a los mensajes urgentes", () => { | ||
// Renderizamos un elemento simulado con la clase de estrella | ||
const { container } = render( | ||
<i className="fa fa-star text-warning me-2"></i> | ||
); | ||
|
||
// Seleccionamos el ícono y verificamos que tenga el estilo de color amarillo | ||
const starIcon = container.querySelector(".fa-star.text-warning"); | ||
expect(starIcon).toHaveClass("text-warning"); | ||
|
||
// Verificamos que el ícono tenga el color amarillo aplicado | ||
expect(starIcon).toHaveStyle("color: #f0ad4e"); // Ajusta al color exacto si es necesario | ||
}); | ||
}); |