Skip to content
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

Refactor : src/components/AgendaItems/AgendaItemsCreateModal from Jest to Vitest #2489 #2644

Closed
wants to merge 36 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
65a766e
Updated branching strategy
DangaRanga May 23, 2021
0a6d4d6
Removed duplicate entry
DangaRanga May 23, 2021
e16a3ad
Updated contributing.md
DangaRanga May 23, 2021
653345e
Added extra markdown styling to contribute.md
DangaRanga May 23, 2021
13180c2
Merge pull request #54 from DangaRanga/master
DangaRanga May 23, 2021
07f4465
Bump dns-packet from 1.3.1 to 1.3.4
dependabot[bot] May 30, 2021
f9d7eae
Merge pull request #60 from PalisadoesFoundation/dependabot/npm_and_y…
palisadoes May 30, 2021
1a57176
Update pull_request_template.md
palisadoes May 30, 2021
c4580fa
disabled CodeQL cron jobs and push actions (#72)
akshatgarg12 Jun 6, 2021
f71bc11
Merge Develop into Main (#1099)
noman2002 Nov 30, 2023
1fd4105
[#1123] Changes position and text of "All Organizations" button (#1124)
adi790uu Dec 10, 2023
9ff2924
Revert "[#1123] Changes position and text of "All Organizations" butt…
noman2002 Dec 12, 2023
a320d35
Added Base branch check to main (#1515)
palisadoes Jan 29, 2024
42633e2
Pre-GSoC 2024 - Stable (#1934)
palisadoes Apr 27, 2024
f6c6f03
Update README.md
palisadoes Apr 27, 2024
423b990
Merge develop - 20240504 (#1956)
palisadoes May 4, 2024
7befb35
Merge develop - 20240504 (#1957)
palisadoes May 4, 2024
a4d2a07
Bump follow-redirects from 1.15.5 to 1.15.6 (#1960)
dependabot[bot] May 5, 2024
9b5d158
Bump tar from 6.1.15 to 6.2.1 (#1959)
dependabot[bot] May 5, 2024
389ac01
Bump tj-actions/changed-files from 40 to 41 in /.github/workflows (#1…
dependabot[bot] May 5, 2024
d3d681f
Bump express from 4.18.2 to 4.19.2 (#1962)
dependabot[bot] May 5, 2024
7091c76
Bump ejs from 3.1.9 to 3.1.10 (#1963)
dependabot[bot] May 5, 2024
bf9852d
coderabbit yaml file (#1991)
pranshugupta54 May 19, 2024
f661cc9
Updating the main branch to the latest develop code (#2020)
palisadoes Jun 2, 2024
5010350
Latest Develop 20240724 (#2127)
palisadoes Jul 27, 2024
b991d54
Update README.md
palisadoes Aug 11, 2024
f358420
Update CONTRIBUTING.md
palisadoes Aug 11, 2024
15c8753
Update CONTRIBUTING.md
palisadoes Aug 11, 2024
30c1d18
Merge with Develop 20240924 (#2306)
palisadoes Sep 29, 2024
6fbba6e
Bump tj-actions/changed-files from 40 to 41 in /.github/workflows (#2…
dependabot[bot] Sep 29, 2024
e828b78
Bump rollup from 4.21.3 to 4.22.5 (#2308)
dependabot[bot] Sep 29, 2024
d01b5d2
Merge with Develop 2024-1-14 (#2432)
palisadoes Nov 14, 2024
1fe19c1
Update dependabot.yaml
palisadoes Nov 16, 2024
d2a4d73
Update pull-request-target.yml
palisadoes Nov 25, 2024
3d1f1f0
Update pull-request-target.yml
palisadoes Nov 25, 2024
dda3b82
migrated jest to vitest
Ramneet04 Dec 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
18 changes: 18 additions & 0 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
language: "en-US"
early_access: false
reviews:
profile: "chill"
request_changes_workflow: true
high_level_summary: true
poem: true
review_status: true
collapse_walkthrough: false
auto_review:
enabled: true
drafts: false
base_branches:
- develop
- main
chat:
auto_reply: true
31 changes: 31 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# 👋 Welcome, we're glad you're setting up an installation of Talawa-admin. Copy this
# file to .env or set the variables in your local environment manually.


# Custom port number for the talawa-admin development server to run on. Default is 4321.

PORT=4321

# Run Talawa-api locally in your system, and put its url into the same.

REACT_APP_TALAWA_URL=

# Do you want to setup and use "I'm not a robot" Checkbox (Google Recaptcha)?
# If no, leave blank, else write yes
# Example: REACT_APP_USE_RECAPTCHA=yes

REACT_APP_USE_RECAPTCHA=

# If you are using Google Recaptcha, i.e., REACT_APP_USE_RECAPTCHA=yes, read the following steps
# Get the google recaptcha site key from google recaptcha admin or https://www.google.com/recaptcha/admin/create
# from here for reCAPTCHA v2 and "I'm not a robot" Checkbox, and paste the key here.
# Note: In domains, fill localhost

REACT_APP_RECAPTCHA_SITE_KEY=

# has to be inserted in the env file to use plugins and other websocket based features.
REACT_APP_BACKEND_WEBSOCKET_URL=ws://localhost:4000/graphql/

# If you want to logs Compiletime and Runtime error , warning and info write YES or if u want to
# keep the console clean leave it blank
ALLOW_LOGS=
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Contains the PDF file of the Tag as JSON string, thus does not need to be linted
src/components/CheckIn/tagTemplate.ts
115 changes: 98 additions & 17 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"env": {
"browser": true,
"node": true,
"es6": true
},

Expand All @@ -10,7 +11,9 @@
"eslint:recommended",
"plugin:jest/recommended",
"plugin:prettier/recommended",
"plugin:@typescript-eslint/recommended"
"plugin:@typescript-eslint/recommended",
"eslint-config-prettier",
"prettier"
],
"globals": {
"Atomics": "readonly",
Expand All @@ -26,12 +29,97 @@
},

// Specify the ESLint plugins tobe used
"plugins": ["react", "@typescript-eslint", "react-hooks", "jest"],
"plugins": [
"react",
"@typescript-eslint",
"jest",
"import",
"eslint-plugin-tsdoc",
"prettier"
],
"rules": {
"react/destructuring-assignment": ["warn", "always"],
"react/no-multi-comp": ["error", { "ignoreStateless": false }],
"react/jsx-filename-extension": ["error", { "extensions": [".tsx"] }],
"react/destructuring-assignment": "error",
"@typescript-eslint/explicit-module-boundary-types": "error",
"react/no-multi-comp": [
"error",
{
"ignoreStateless": false
}
],
"react/jsx-filename-extension": [
"error",
{
"extensions": [".tsx"]
}
],
"import/no-duplicates": "error",
"tsdoc/syntax": "error",
"@typescript-eslint/ban-ts-comment": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/no-unsafe-function-type": "error",
"@typescript-eslint/no-wrapper-object-types": "error",
"@typescript-eslint/no-empty-object-type": "error",
"@typescript-eslint/no-duplicate-enum-values": "error",
"@typescript-eslint/array-type": "error",
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/explicit-function-return-type": [
2,
{
"allowExpressions": true,
"allowTypedFunctionExpressions": true
}
],
"camelcase": "off",
"@typescript-eslint/naming-convention": [
"error",
// Interfaces must begin with Interface or TestInterface followed by a PascalCase name
{
"selector": "interface",
"format": ["PascalCase"],
"prefix": ["Interface", "TestInterface"]
},
// Type Aliases must be in PascalCase
{
"selector": ["typeAlias", "typeLike", "enum"],
"format": ["PascalCase"]
},
{
"selector": "typeParameter",
"format": ["PascalCase"],
"prefix": ["T"]
},
{
"selector": "variable",
"format": ["camelCase", "UPPER_CASE", "PascalCase"],
"leadingUnderscore": "allow"
},
{
"selector": "parameter",
"format": ["camelCase"],
"leadingUnderscore": "allow"
},
{
"selector": "function",
"format": ["camelCase", "PascalCase"]
},
{
"selector": "memberLike",
"modifiers": ["private"],
"format": ["camelCase"],
"leadingUnderscore": "require"
},

{
"selector": "variable",
"modifiers": ["exported"],
"format": null
}
],
// Ensures that components are always written in PascalCase
"react/jsx-pascal-case": [
"error",
Expand All @@ -42,23 +130,16 @@
"react/jsx-equals-spacing": ["warn", "never"],
"react/no-this-in-sfc": "error",

// Ensures that components are always indented by 2 spaces
"react/jsx-indent": ["warn", 2],
"react/jsx-tag-spacing": [
"warn",
{
"afterOpening": "never",
"beforeClosing": "never",
"beforeSelfClosing": "always"
}
],
// All tests must need not have an assertion
"jest/expect-expect": 0,

// Enforce Strictly functional components
"react/no-unstable-nested-components": ["error", { "allowAsProps": true }],
"react/function-component-definition": [
"error",
0,
{ "namedComponents": "function-declaration" }
]
],
"prettier/prettier": "error"
},

// Let ESLint use the react version in the package.json
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
name: Bug report
name: Bug Report
about: Create a report to help us improve.
title: Bug report
labels: Bug
assignees: ""
title: Bug Report
labels: bug
assignees: ''

---

**Describe the bug**
Expand All @@ -27,3 +28,9 @@ A clear and concise description of how the code performed w.r.t expectations.
If applicable, add screenshots to help explain your problem.

**Additional details**
Add any other context or screenshots about the feature request here.

**Potential internship candidates**

Please read this if you are planning to apply for a Palisadoes Foundation internship
- https://github.com/PalisadoesFoundation/talawa/issues/359
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
name: Feature request
name: Feature Request
about: Suggest an idea for this project
title: Feature request
labels: Feature
assignees: ""
title: Feature Request
labels: feature request
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
Expand All @@ -20,3 +21,8 @@ A clear and concise description of approach to be followed.

**Additional context**
Add any other context or screenshots about the feature request here.

**Potential internship candidates**

Please read this if you are planning to apply for a Palisadoes Foundation internship
- https://github.com/PalisadoesFoundation/talawa/issues/359
18 changes: 18 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Configuration for automated dependency updates using Dependabot
version: 2
updates:
# Define the target package ecosystem
- package-ecosystem: "npm"
# Specify the root directory
directory: "/"
# Schedule automated updates to run weekly
schedule:
interval: "monthly"
# Labels to apply to Dependabot PRs
labels:
- "dependencies"
# Specify the target branch for PRs
target-branch: "develop-postgres"
# Customize commit message prefix
commit-message:
prefix: "chore(deps):"
35 changes: 34 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,40 @@
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. -->
<!--
This section can be deleted after reading.
We employ the following branching strategy to simplify the development process and to ensure that only stable code is pushed to the `master` branch:
- `develop`: For unstable code: New features and bug fixes.
- `master`: Where the stable production ready code lies. Only security related bugs.
NOTE!!!
ONLY SUBMIT PRS AGAINST OUR `DEVELOP` BRANCH. THE DEFAULT IS `MAIN`, SO YOU WILL HAVE TO MODIFY THIS BEFORE SUBMITTING YOUR PR FOR REVIEW. PRS MADE AGAINST `MAIN` WILL BE CLOSED.
-->

<!--
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request.
-->

**What kind of change does this PR introduce?**

<!-- E.g. a bugfix, feature, refactoring, etc… -->

**Issue Number:**

Fixes #<!--Add related issue number here.-->

**Did you add tests for your changes?**

<!--Yes or No. Note: Add unit tests or automation tests for your code.-->

**Snapshots/Videos:**

<!--Add snapshots or videos wherever possible.-->

**If relevant, did you update the documentation?**

<!--Add link to Talawa-Docs.-->

**Summary**

<!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? -->
Expand All @@ -18,3 +45,9 @@
<!-- If this PR introduces a breaking change, please describe the impact and a migration path for existing applications. -->

**Other information**

<!--Add extra information about this PR here-->

**Have you read the [contributing guide](https://github.com/PalisadoesFoundation/talawa-admin/blob/master/CONTRIBUTING.md)?**

<!--Yes or No-->
47 changes: 47 additions & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Talawa GitHub Workflows Guidelines

Follow these guidelines when contributing to this directory.

## General

Any changes to files in this directory are flagged when pull requests are run. Make changes only on the advice of a contributor.

## YAML Workflow Files

The YAML files in this directory have very specific roles depending on the type of workflow.

Whenever possible you must ensure that:
1. The file roles below are maintained
1. The sequence of the jobs in the workflows are maintained using [GitHub Action dependencies](https://docs.github.com/en/actions/learn-github-actions/managing-complex-workflows).

### File Roles
Follow these guidelines when creating new YAML defined GitHub actions. This is done to make troubleshooting easier.

1. `Issue` Workflows:
1. Place all actions related to issues in the `issues.yml` file.
1. `Pull Request` workflows to be run by:
1. Workflows to run **First Time** repo contributors:
1. Place all actions related to to this in the `pull-request-target.yml` file.
1. Workflows to be run by **ALL** repo contributors:
1. Place all actions related to pull requests in the `pull-request.yml` file.
1. `Push` workflows:
1. Place all actions related to pushes in the `push.yml` file.

#### File Role Exceptions

There are some exceptions to these rules in which jobs can be placed in dedicated separate files:
1. Jobs that require unique `cron:` schedules
1. Jobs that require unique `paths:` statements that operate only when files in a specific path are updated.
1. Jobs only work correctly if they have a dedicated file (eg. `CodeQL`)

## Scripts

Follow these guidelines when creating or modifying scripts in this directory.

1. All scripts in this directory must be written in python3 for consistency.
1. The python3 scripts must follow the following coding standards. Run these commands against your scripts before submitting PRs that modify or create python3 scripts in this directory.
1. Pycodestyle
1. Pydocstyle
1. Pylint
1. Flake8
1. All scripts must run a main() function.
8 changes: 8 additions & 0 deletions .github/workflows/auto-label.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"labelsSynonyms": {
"dependencies": ["dependabot", "dependency", "dependencies"],
"security": ["security"],
"ui/ux": ["layout", "screen", "design", "figma"]
},
"defaultLabels": ["unapproved"],
}
Loading
Loading