-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
1,347 additions
and
266 deletions.
There are no files selected for viewing
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Lint and Prettier | ||
|
||
on: [push] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
path: frontend | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16 | ||
|
||
- name: Install dependencies | ||
run: cd frontend/frontend && yarn | ||
|
||
# - name: Lint with ESLint | ||
# run: yarn lint | ||
- name: Run Prettier | ||
run: cd frontend/frontend && yarn pretty |
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,5 @@ | ||
node_modules/ | ||
dist/ | ||
.prettierrc.js | ||
.eslintrc.js | ||
env.d.ts |
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,30 @@ | ||
module.exports = { | ||
extends: [ | ||
// By extending from a plugin config, we can get recommended rules without having to add them manually. | ||
"eslint:recommended", | ||
"plugin:react/recommended", | ||
"plugin:react-hooks/recommended", // This line was added | ||
"plugin:import/recommended", | ||
"plugin:jsx-a11y/recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
// This disables the formatting rules in ESLint that Prettier is going to be responsible for handling. | ||
// Make sure it's always the last config, so it gets the chance to override other configs. | ||
"eslint-config-prettier", | ||
], | ||
settings: { | ||
react: { | ||
// Tells eslint-plugin-react to automatically detect the version of React to use. | ||
version: "detect", | ||
}, | ||
// Tells eslint how to resolve imports | ||
"import/resolver": { | ||
node: { | ||
paths: ["src"], | ||
extensions: [".js", ".jsx", ".ts", ".tsx"], | ||
}, | ||
}, | ||
}, | ||
rules: { | ||
// Add your own rules here to override ones from the extended configs. | ||
}, | ||
}; |
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,3 @@ | ||
node_modules/ | ||
dist/ | ||
.prettierrc.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 |
---|---|---|
@@ -1,31 +1,31 @@ | ||
/// <reference types="cypress" /> | ||
|
||
const Login = () => { | ||
cy.visit('http://localhost:8000/login') | ||
cy.contains('Username or Email') | ||
cy.get("#username").type("lotus"); | ||
cy.get("#password").type("hardik"); | ||
cy.get('form').contains('Login').click() | ||
cy.wait(10000) | ||
} | ||
cy.visit("http://localhost:8000/login"); | ||
cy.contains("Username or Email"); | ||
cy.get("#username").type("lotus"); | ||
cy.get("#password").type("hardik"); | ||
cy.get("form").contains("Login").click(); | ||
cy.wait(10000); | ||
}; | ||
|
||
describe('Testing Successful Login', () => { | ||
it('Navigates to Dashboard After Login', () => { | ||
Login() | ||
cy.contains("Dashboard") | ||
cy.url().should('eq', "http://localhost:8000/dashboard") // => true | ||
}) | ||
}) | ||
describe("Testing Successful Login", () => { | ||
it("Navigates to Dashboard After Login", () => { | ||
Login(); | ||
cy.contains("Dashboard"); | ||
cy.url().should("eq", "http://localhost:8000/dashboard"); // => true | ||
}); | ||
}); | ||
|
||
describe('Testing Successful Plan Creation', () => { | ||
it('Test Plan creation flow', () => { | ||
Login(); | ||
cy.visit('http://localhost:8000/create-plan'); | ||
cy.wait(10000) | ||
cy.contains('Create Plan'); | ||
cy.get("#planNameInput").type("Random Plan"); | ||
cy.get("#planDescInput").type("Random Plan Description"); | ||
cy.get('[type="radio"]').check("monthly"); | ||
cy.get('form').submit() | ||
}) | ||
}) | ||
describe("Testing Successful Plan Creation", () => { | ||
it("Test Plan creation flow", () => { | ||
Login(); | ||
cy.visit("http://localhost:8000/create-plan"); | ||
cy.wait(10000); | ||
cy.contains("Create Plan"); | ||
cy.get("#planNameInput").type("Random Plan"); | ||
cy.get("#planDescInput").type("Random Plan Description"); | ||
cy.get('[type="radio"]').check("monthly"); | ||
cy.get("form").submit(); | ||
}); | ||
}); |
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 |
---|---|---|
|
@@ -3,4 +3,4 @@ module.exports = { | |
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
} | ||
}; |
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,8 @@ | ||
module.exports = { | ||
trailingComma: "all", | ||
tabWidth: 2, | ||
semi: true, | ||
singleQuote: true, | ||
printWidth: 120, | ||
bracketSpacing: true, | ||
}; |
28 changes: 14 additions & 14 deletions
28
frontend/src/components/CustomPagination/CustomPagination.css
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,21 +1,21 @@ | ||
.movementButton { | ||
cursor: pointer; | ||
font-size: 12px; | ||
cursor: pointer; | ||
font-size: 12px; | ||
} | ||
|
||
.movementButton[disabled]{ | ||
color: #666666; | ||
cursor: not-allowed; | ||
.movementButton[disabled] { | ||
color: #666666; | ||
cursor: not-allowed; | ||
} | ||
|
||
.currentPageNumber { | ||
height: 30px; | ||
width: 30px; | ||
align-items: center; | ||
justify-content: center; | ||
display: flex; | ||
font-weight: 400; | ||
text-align: center; | ||
border: 1px solid lightgray; | ||
border-radius: 10px; | ||
height: 30px; | ||
width: 30px; | ||
align-items: center; | ||
justify-content: center; | ||
display: flex; | ||
font-weight: 400; | ||
text-align: center; | ||
border: 1px solid lightgray; | ||
border-radius: 10px; | ||
} |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
.loadMoreSpinner { | ||
height: 500px; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
height: 500px; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
} |
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
Oops, something went wrong.