-
Notifications
You must be signed in to change notification settings - Fork 12
Sprint 4 PR. #9
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
Open
qopci
wants to merge
11
commits into
kellerflint:main
Choose a base branch
from
qopci:main
base: main
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.
Open
Sprint 4 PR. #9
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
7e7700d
dynamically set user and password from env; fixed relative path routi…
kellerflint 182ca04
removing unnecessary .env
kellerflint 963d4de
Added and installed jest unit tests, updated README.md, completed task 1
LauraV-702 be11cb8
Task 2 Finished, got Jest to work for Frontend testing, updated the R…
60c94ce
Finished task 1, task 2, WIP on task 3
LauraV-702 7e92185
Added changes from service-fix branch, and tried to rewrite the integ…
LauraV-702 29b0d1e
Updated README.md file and modified integration.test.js file
LauraV-702 9f874ea
Installed cypress and modified README instructions for frontend tests
LauraV-702 3a06641
Fixed integrations test and task 3
LauraV-702 ddfe7bc
Completed task 4, got basic cypress tests to work
LauraV-702 e77f864
Updated README
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -39,3 +39,6 @@ yarn-error.log* | |
| # typescript | ||
| *.tsbuildinfo | ||
| next-env.d.ts | ||
|
|
||
| # Node coverage reports | ||
| coverage/ | ||
This file contains hidden or 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 hidden or 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,6 @@ | ||
| module.exports = { | ||
| presets: [ | ||
| ["@babel/preset-env", { targets: { node: "current" } }], | ||
| ["@babel/preset-react", { runtime: "automatic" }] | ||
| ], | ||
| }; |
This file contains hidden or 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,8 @@ | ||
| const { defineConfig } = require("cypress"); | ||
|
|
||
| module.exports = defineConfig({ | ||
| e2e: { | ||
| baseUrl: "http://localhost:3001", | ||
| supportFile: "cypress/support/e2e.js", | ||
| }, | ||
| }); |
This file contains hidden or 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,9 @@ | ||
| describe("Homepage Loads", () => { | ||
| it("should load the homepage", () => { | ||
| cy.visit("/"); | ||
|
|
||
| // Check that the NavBar is present | ||
| cy.get("nav").should("exist"); | ||
| }); | ||
| }); | ||
|
|
This file contains hidden or 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,5 @@ | ||
| { | ||
| "name": "Using fixtures to represent data", | ||
| "email": "hello@cypress.io", | ||
| "body": "Fixtures are a great way to mock data for responses to routes" | ||
| } |
This file contains hidden or 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,25 @@ | ||
| // *********************************************** | ||
| // This example commands.js shows you how to | ||
| // create various custom commands and overwrite | ||
| // existing commands. | ||
| // | ||
| // For more comprehensive examples of custom | ||
| // commands please read more here: | ||
| // https://on.cypress.io/custom-commands | ||
| // *********************************************** | ||
| // | ||
| // | ||
| // -- This is a parent command -- | ||
| // Cypress.Commands.add('login', (email, password) => { ... }) | ||
| // | ||
| // | ||
| // -- This is a child command -- | ||
| // Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... }) | ||
| // | ||
| // | ||
| // -- This is a dual command -- | ||
| // Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... }) | ||
| // | ||
| // | ||
| // -- This will overwrite an existing command -- | ||
| // Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) |
This file contains hidden or 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,17 @@ | ||
| // *********************************************************** | ||
| // This example support/e2e.js is processed and | ||
| // loaded automatically before your test files. | ||
| // | ||
| // This is a great place to put global configuration and | ||
| // behavior that modifies Cypress. | ||
| // | ||
| // You can change the location of this file or turn off | ||
| // automatically serving support files with the | ||
| // 'supportFile' configuration option. | ||
| // | ||
| // You can read more here: | ||
| // https://on.cypress.io/configuration | ||
| // *********************************************************** | ||
|
|
||
| // Import commands.js using ES2015 syntax: | ||
| import './commands' |
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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,15 @@ | ||
| // jest.config.js | ||
| module.exports = { | ||
| testEnvironment: "jsdom", | ||
| transform: { | ||
| "^.+\\.[tj]sx?$": ["babel-jest", { configFile: "./babel.config.js" }], | ||
| }, | ||
| moduleFileExtensions: ["js", "jsx"], | ||
| moduleNameMapper: { | ||
| "\\.(css|less|scss|sass)$": "identity-obj-proxy", | ||
| }, | ||
| setupFilesAfterEnv: ["@testing-library/jest-dom"], | ||
| testPathIgnorePatterns: [ | ||
| "/node_modules/", | ||
| ], | ||
| }; | ||
This file contains hidden or 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,4 +1,22 @@ | ||
| /** @type {import('next').NextConfig} */ | ||
| const nextConfig = {}; | ||
| const nextConfig = { | ||
| // Proxy API routes to the backend service when the frontend receives relative requests | ||
| async rewrites() { | ||
| return [ | ||
| { | ||
| source: '/patterns', | ||
| destination: 'http://backend:3000/patterns', | ||
| }, | ||
| { | ||
| source: '/patterns/:id', | ||
| destination: 'http://backend:3000/patterns/:id', | ||
| }, | ||
| { | ||
| source: '/update/:id', | ||
| destination: 'http://backend:3000/update/:id', | ||
| }, | ||
| ]; | ||
| }, | ||
| }; | ||
|
|
||
| export default nextConfig; |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest using Vitest for the front end instead of Jest as Jest is experimental when it comes to ESM/Modules and causes more issues while Vitest is very React friendly