-
Notifications
You must be signed in to change notification settings - Fork 2
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
Draft: Add Jest testing framework and some tests #43
Open
nf679
wants to merge
17
commits into
master
Choose a base branch
from
jest-test-framework
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.
Conversation
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
Created the tests for StatusIcon.js. This checks that 'StatusIcon's and 'StatusIconWithText' are correctly rendered for the statuses REQUESTED, REJECTED, APPROVED, AWAITING_PROVISIONING, PROVISIONED, DECOMMISSIONED and UNKNOWN. (UNKNOWN and REQUESTED only apply to icons.)
Removed an unnecessary comment from utils.js. Set up the test for NotFound.test.js, and updated NotFound.js from class to className to reflect the latest version of React.
Daniel UI test
…a test description
Changed NotFound.test.js Line 9 Col 34 out of placeholder text so that test succeeds.
Utils.test.js and NotFound.test.js updated so tests succeed
Add NotFound.test.js to jest-test-framework branch
nf679
changed the title
Add Jest testing framework and some tests
Draft: Add Jest testing framework and some tests
Nov 27, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
jest-test-framework
branch.__mocks__/react-bootstrap-notify.js
is mocking theuseNotifications
function as we don't want to actually send notifications when testing.babel.config.js
is setting some presets to get the tests working properly.cssTransformer.js
is processing CSS files during testing to fix some issues with the tests throwing errors.jest.config.js
is setting some configuration settings for jest.jest.setup.js
is making sure all tests can find the jest testing library..snap
extension - snapshot tests are used to check the UI doesn't change unexpectedly. Jest renders a UI component, takes a snapshot, then compares it to the reference snapshot stored alongside the test and will fail if they don't match.Finished tests:
src/Components/Home.test.js
src/Components/NotFound.test.js
src/Components/utils.test.js
src/Components/Project/InvitationListItems.test.js
src/Components/Project/StatusIcon.test.js
Future tests to add:
src/Components/AllProjects/List.js
src/Components/Consortium/Detail.js
src/Components/Consortium/List.js
src/Components/Consortium/OverviewPane.js
src/Components/Consortium/ProjectSummaryPane.js
src/Components/Consortium/ProjectsPane.js
src/Components/Consortium/QuotaProgressBar.js
src/Components/Project/CardItems.js
src/Components/Project/CollaboratorsLink.js
src/Components/Project/CollaboratorsListItem.js
src/Components/Project/Detail.js
src/Components/Project/List.js
src/Components/Project/MetaCard.js
src/Components/Project/OverviewPane.js
src/Components/Project/ProjectCreateButton.js
src/Components/Project/ProjectJoinButton.js
src/Components/Project/Requirement.js
src/Components/Project/RequirementApproveButton.js
src/Components/Project/RequirementDeleteButton.js
src/Components/Project/RequirementEditButton.js
src/Components/Project/RequirementsTable.js
src/Components/Project/ServiceCard.js
src/Components/Project/ServiceCreateButton.js
src/Components/Project/ServicesPane.js
src/Components/Project/actions.js
src/Components/App.js
src/Components/Navbar.js
src/Components/index.js
Tips for writing tests: