-
Notifications
You must be signed in to change notification settings - Fork 0
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 #84 from sineverba/release-0.10.0
Release 0.10.0
- Loading branch information
Showing
16 changed files
with
223 additions
and
49 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 |
---|---|---|
|
@@ -25,8 +25,8 @@ global_job_config: | |
commands: | ||
- checkout | ||
- cp .env.bak .env | ||
- npm install -g [email protected].0 | ||
- npm ci | ||
- npm install -g [email protected].1 | ||
- NODE_ENV=production npm ci | ||
|
||
blocks: | ||
- name: "Build and deploy" | ||
|
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 |
---|---|---|
|
@@ -11,7 +11,7 @@ global_job_config: | |
prologue: | ||
commands: | ||
- checkout | ||
- npm install -g [email protected].0 | ||
- npm install -g [email protected].1 | ||
|
||
blocks: | ||
|
||
|
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { render, screen } from "@testing-library/react"; | ||
import ModalWindow from "../../components/ModalWindow"; | ||
|
||
describe("Test ModalWindow", () => { | ||
it("Can render ModalWindow", () => { | ||
render(<ModalWindow show />); | ||
const title = screen.getByText(/detail/i); | ||
expect(title).toBeInTheDocument(); | ||
}); | ||
}); |
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
34 changes: 34 additions & 0 deletions
34
src/__tests__/views/TransactionsPage/TransactionsDetail.test.js
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,34 @@ | ||
import { screen, waitFor } from "@testing-library/react"; | ||
import { renderWithProviders } from "../../__test-utils__/test-utils"; | ||
import { rest } from "msw"; | ||
// eslint-disable-next-line jest/no-mocks-import | ||
import { server } from "../../__mocks__/api/server"; | ||
import { item } from "../../__mocks__/responses/payment"; | ||
import {GenericDetail} from "../../../views/GenericPage/GenericDetail"; | ||
|
||
beforeEach(() => { | ||
server.use( | ||
rest.get(`${process.env.REACT_APP_BACKEND_URL}/bank-account-transactions/1`, (req, res, ctx) => { | ||
return res(ctx.json(item)); | ||
}) | ||
); | ||
}); | ||
|
||
// Reset any request handlers that we may add during the tests, | ||
// so they don't affect other tests. | ||
afterEach(() => { | ||
server.resetHandlers(); | ||
}); | ||
|
||
// Clean up after the tests are finished. | ||
afterAll(() => server.close()); | ||
|
||
describe("Test Transactions Detail", () => { | ||
it("Test can show single detail", async () => { | ||
renderWithProviders(<GenericDetail id={1} />); | ||
await waitFor(() => { | ||
const purpose = screen.getByText(/energy bill/i); | ||
expect(purpose).toBeInTheDocument(); | ||
}); | ||
}); | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from "react"; | ||
import { Button, Modal, ModalBody } from "react-bootstrap"; | ||
|
||
export function ModalWindow(props) { | ||
const { show, handleHide, children } = props; | ||
return ( | ||
<Modal show={show}> | ||
<Modal.Header closeButton onHide={() => handleHide(false)}> | ||
<Modal.Title>Detail</Modal.Title> | ||
</Modal.Header> | ||
<ModalBody>{children}</ModalBody> | ||
<Modal.Footer> | ||
<Button variant="secondary" onClick={() => handleHide(false)}> | ||
Close | ||
</Button> | ||
</Modal.Footer> | ||
</Modal> | ||
); | ||
} | ||
|
||
export default ModalWindow; |
Oops, something went wrong.