-
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.
* initial testing samples * added testing for Deployment | Provider | Energy | Memory&Throughput | PerfBarContainer * completed testing for principal sections and utils * changed unit test for app.js | changed UI design of local gpu * changed app.test.js
- Loading branch information
1 parent
f2ffe04
commit 330778a
Showing
15 changed files
with
1,129 additions
and
29 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
import {act, create} from 'react-test-renderer'; | ||
import { render, screen } from "@testing-library/react"; | ||
import userEvent from "@testing-library/user-event"; | ||
import App from './App'; | ||
|
||
describe('App', () => { | ||
it ('should render successfully', () => { | ||
let root; | ||
act(() => { | ||
root = create(<App />); | ||
}); | ||
expect(root).toBeTruthy(); | ||
}); | ||
}); | ||
// For testing there is no default socket connection. It will show the error screen | ||
test("Render App correctly, must show a connection error and button to reset it", async() => { | ||
render(<App />); | ||
|
||
expect(screen.getByText(/connection error/i)).toBeTruthy(); | ||
await userEvent.click(screen.getByText('Reconnect')); | ||
}) |
Oops, something went wrong.