Skip to content

Commit

Permalink
Merge pull request #309 from Program-AR/sceneViewTests
Browse files Browse the repository at this point in the history
Tests skipeados de SceneView con cypress
  • Loading branch information
dlopezalvas authored Sep 30, 2024
2 parents 5eba50b + 6649b1d commit 7d19669
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 43 deletions.
18 changes: 18 additions & 0 deletions src/test/unit/components/ChallengeView/SceneView.cy.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { mount } from 'cypress/react18'
import React from 'react'
import { SceneView } from '../../../../components/challengeView/SceneView'
import { allDescriptors } from '../../../../staticData/challenges'
import { scene } from '../../../../components/challengeView/scene'
import { screen } from '@testing-library/react'


describe('SceneView renders all challenges', () => {

allDescriptors().forEach((descriptor) => {
it(`Scene ${scene.sceneName(descriptor)} renders ok`, () => {
mount(<SceneView descriptor={descriptor}
onLoad={() => expect((screen.getByTestId("scene-iframe") as any).contentWindow.eval("pilas.escena_actual().automata")).to.exist} />)
})
})
})

43 changes: 0 additions & 43 deletions src/test/unit/components/ChallengeView/SceneView.test.tsx

This file was deleted.

0 comments on commit 7d19669

Please sign in to comment.