Skip to content

Commit

Permalink
Merge branch 'develop' into issue/10157/fix-rm-org-route-method
Browse files Browse the repository at this point in the history
  • Loading branch information
rajku-dev authored Jan 25, 2025
2 parents 980b340 + 4c0991e commit 93f1ed7
Show file tree
Hide file tree
Showing 185 changed files with 4,334 additions and 3,374 deletions.
36 changes: 13 additions & 23 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,8 @@
],
"overrides": [
{
"files": [
"**/*.mdx"
],
"extends": [
"plugin:react/recommended",
"plugin:mdx/recommended"
],
"files": ["**/*.mdx"],
"extends": ["plugin:react/recommended", "plugin:mdx/recommended"],
"rules": {
"react/jsx-no-target-blank": "off",
"i18next/no-literal-string": "off"
Expand All @@ -40,10 +35,7 @@
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint",
"i18next"
],
"plugins": ["@typescript-eslint", "i18next", "no-relative-import-paths"],
"rules": {
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
Expand All @@ -61,22 +53,20 @@
{
"mode": "jsx-only",
"jsx-attributes": {
"include": [
"label",
"placeholder",
"error",
"title"
],
"exclude": [
".*"
]
"include": ["label", "placeholder", "error", "title"],
"exclude": [".*"]
},
"callees": {
"exclude": [
".*"
]
"exclude": [".*"]
}
}
],
"no-relative-import-paths/no-relative-import-paths": [
"error",
{
"allowSameFolder": true,
"prefix": "@"
}
]
},
"ignorePatterns": [
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/auto-testing-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
auto_label:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04-arm

steps:
- name: Check PR Conditions and Add Label
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/combine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ permissions:

jobs:
combine-prs:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04-arm

steps:
- name: Combine dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/comment-p1-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
add-comment:
if: github.event.label.name == 'P1' && github.repository == 'ohcnetwork/care_fe'
runs-on: ubuntu-latest
runs-on: ubuntu-24.04-arm
permissions:
issues: write
steps:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/cypress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
cypress-run:
permissions: write-all
if: github.repository == 'ohcnetwork/care_fe'
runs-on: ubuntu-latest
runs-on: ubuntu-24.04-arm
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -77,14 +77,14 @@ jobs:
SPLIT_INDEX: ${{ strategy.job-index }}

- name: Upload cypress screenshots on failure 📸
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots

- name: Upload cypress videos 📹
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: ${{ failure() && steps.pr_origin.outputs.is_forked == 'true' }}
with:
name: cypress-videos
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ env:
jobs:
test:
if: github.repository == 'ohcnetwork/care_fe'
runs-on: ubuntu-latest
runs-on: ubuntu-24.04-arm
name: Test
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
needs: test
if: github.ref == 'refs/heads/develop' || startsWith(github.event.ref, 'refs/tags/v')
name: Build & Push to container registries
runs-on: ubuntu-latest
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -133,9 +133,8 @@ jobs:
needs: build
if: startsWith(github.event.ref, 'refs/tags/v')
name: Notify release
runs-on: ubuntu-latest
runs-on: ubuntu-24.04-arm
steps:
- name: Notify release
run: |
echo "Release ${{ github.sha }} is ready to be deployed to production"
6 changes: 3 additions & 3 deletions .github/workflows/issue-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
issue_opened_and_reopened:
name: issue_opened_and_reopened
runs-on: ubuntu-latest
runs-on: ubuntu-24.04-arm
if: github.repository == 'ohcnetwork/care_fe' && github.event_name == 'issues' && github.event.action == 'opened' || github.event.action == 'reopened'
steps:
- name: 'Move issue to "Triage"'
Expand All @@ -22,7 +22,7 @@ jobs:
status_value: "Triage"
issue_closed:
name: issue_closed
runs-on: ubuntu-latest
runs-on: ubuntu-24.04-arm
if: github.repository == 'ohcnetwork/care_fe' && github.event_name == 'issues' && github.event.action == 'closed'
steps:
- name: 'Moved issue to "Done"'
Expand All @@ -35,7 +35,7 @@ jobs:
status_value: "Done"
issue_assigned:
name: issue_assigned
runs-on: ubuntu-latest
runs-on: ubuntu-24.04-arm
if: github.repository == 'ohcnetwork/care_fe' && github.event_name == 'issues' && github.event.action == 'assigned'
steps:
- name: 'Move issue to "In Progress"'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/label-deploy-failed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

jobs:
auto-label-deploy-failed:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04-arm
if: |
github.repository == 'ohcnetwork/care_fe' && github.event.issue.pull_request &&
contains(github.event.comment.body, 'Deploy Preview')
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/label-merge-conflict.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
jobs:
auto-label:
if: github.repository == 'ohcnetwork/care_fe'
runs-on: ubuntu-latest
runs-on: ubuntu-24.04-arm
steps:
- uses: prince-chrismc/label-merge-conflicts-action@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/label-wip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
check-linked-issues:
if: github.repository == 'ohcnetwork/care_fe'
name: Check linked issues
runs-on: ubuntu-latest
runs-on: ubuntu-24.04-arm
outputs:
linked_issues: ${{ steps.issue-output.outputs.linked_issues }}
steps:
Expand All @@ -26,7 +26,7 @@ jobs:

label-issues:
name: Label linked issues
runs-on: ubuntu-latest
runs-on: ubuntu-24.04-arm
needs: check-linked-issues
permissions: write-all
if: github.repository == 'ohcnetwork/care_fe' && join(needs.check-linked-issues.outputs.linked_issues) != ''
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
lint:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04-arm
permissions:
contents: read
packages: read
Expand All @@ -22,7 +22,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: "20"

- name: Install dependencies
run: npm ci
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/notify-non-core-qn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ permissions:

jobs:
notify_core_team:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04-arm
env:
ALLOWED_USERNAMES: ${{ vars.ALLOWED_USERNAMES || '' }}
QUESTION_KEYWORDS: ${{ vars.QUESTION_KEYWORDS || '' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Necessary to fetch all tags
fetch-depth: 0 # Necessary to fetch all tags

- name: Calculate next tag
id: calc_tag
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
stale:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04-arm
if: github.repository == 'ohcnetwork/care_fe'
steps:
- uses: actions/stale@v6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/thank-you.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
if_merged:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
runs-on: ubuntu-24.04-arm
permissions:
issues: write
pull-requests: write
Expand Down
20 changes: 17 additions & 3 deletions .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,25 @@
"useTabs": false,
"tabWidth": 2,
"semi": true,
"endOfLine": "lf",
"jsxSingleQuote": false,
"arrowParens": "always",
"tailwindFunctions": ["classNames"],
"importOrder": ["<THIRD_PARTY_MODULES>", "^@/lib/(.*)$", "^@/CAREUI/(.*)$", "^@/components/ui/(.*)$", "^@/components/(.*)$", "^@/hooks/(.*)$", "^@/common/(.*)$", "^@/(.*)$", "^[./]"],
"importOrder": [
"<THIRD_PARTY_MODULES>",
"^@/lib/(.*)$",
"^@/CAREUI/(.*)$",
"^@/components/ui/(.*)$",
"^@/components/(.*)$",
"^@/hooks/(.*)$",
"^@/common/(.*)$",
"^@/(.*)$",
"^[./]"
],
"importOrderSeparation": true,
"importOrderSortSpecifiers": true,
"plugins": ["prettier-plugin-tailwindcss", "@trivago/prettier-plugin-sort-imports"]
}
"plugins": [
"prettier-plugin-tailwindcss",
"@trivago/prettier-plugin-sort-imports"
]
}
39 changes: 17 additions & 22 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Run application",
"type": "node",
"request": "launch",
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run-script",
"dev"
],
"skipFiles": [
"<node_internals>/**"
]
}
]
}
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Run application",
"type": "node",
"request": "launch",
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
"runtimeExecutable": "npm",
"runtimeArgs": ["run-script", "dev"],
"skipFiles": ["<node_internals>/**"]
}
]
}
2 changes: 1 addition & 1 deletion crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ files:
- source: public/locale//{{lang}}.json
translation: /public/locale/%two_letters_code%.json
bundles:
- 2
- 2
5 changes: 5 additions & 0 deletions cypress/docs/cypress.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,30 @@
# Cypress Testing Documentation

## Overview

This documentation covers the testing standards and patterns for our Cypress test suite.

## Quick Links

- [File Structure and Organization](./file-structure.md)
- [Testing Patterns](./patterns.md)
- [Best Practices](./best-practices.md)

## Core Principles

- Create and use reusable commands and functions
- Use data-cy attributes for element identification
- Follow Page Object Model pattern
- Write independent and isolated tests
- Use TypeScript for better type safety

## Getting Started

1. Familiarize yourself with the file structure
2. Review the testing patterns
3. Follow the best practices
4. Use the provided examples as templates

## Support

For questions or clarifications, refer to the specific documentation sections or reach out to the team.
8 changes: 5 additions & 3 deletions cypress/e2e/facility_spec/facility_creation.cy.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FacilityCreation } from "../../pageObject/facility/FacilityCreation";
import { generatePhoneNumber } from "../../utils/commonUtils";
import { generateFacilityData } from "../../utils/facilityData";
import { FacilityCreation } from "pageObject/facility/FacilityCreation";
import { generatePhoneNumber } from "utils/commonUtils";
import { generateFacilityData } from "utils/facilityData";

const LOCATION_HIERARCHY = {
localBody: "Aluva",
Expand All @@ -12,6 +12,8 @@ describe("Facility Management", () => {
const facilityType = "Primary Health Centre";

beforeEach(() => {
// Set larger viewport to ensure all elements are visible
cy.viewport(1920, 1080);
cy.visit("/login");
cy.loginByApi("nurse");
});
Expand Down
Loading

0 comments on commit 93f1ed7

Please sign in to comment.