Skip to content

Instantly share code, notes, and snippets.

View jayasanka-sack's full-sized avatar
🎯
Focusing

Jayasanka Weerasinghe jayasanka-sack

🎯
Focusing
View GitHub Profile
@jayasanka-sack
jayasanka-sack / Calender.tsx
Created May 17, 2023 10:25
DatePicker Component with Multi-Calendar Support
import './App.css';
import {DatePicker} from "@react-spectrum/datepicker";
import {Provider} from "@react-spectrum/provider";
import {theme} from "@react-spectrum/theme-default";
import {useState} from "react";
function App() {
const [date, setDate] = useState(null);
const [locale, setLocale] = useState("en-US");
const [calendar, setCalendar] = useState("gregory");
Name Type Core language Technology Web UIs of modules Mobile Business model
OpenMRS Medical Recording System Java (Spring) Web services Micro frontends with Single SPA (previous - SpringMVC) Custom clients Non-Profit
Odoo ERP and CRM Python Direct point-to-point binding HTML, JS (on top of their framework) Custom clients Proprietary modules, Module store
Wordpress Content management system PHP Direct point-to-point binding PHP, HTML, JS Custom clients org - non-profit
Automattic - Hosting
Discourse Discussion platform Ruby Direct point-to-point binding JS React native. (seems like a web view) Hosting, Proprietary modules
Engra IoT Platform,EMM Java OSGi Web services (React apps bundled as .war files) Custom clients Proprietary modules, Support
Intelij IDE Java Service Loader N/A N/A Proprietary modules (i.e. Enterprise edition)
Feature: User Settings
Background:
Given the user is logged in
And the user arrives on a patient’s chart
@patient-involved
@locale
Scenario: The user should be able to change the locale
When the user navigate back to home by clicking Home breadcrumb
Feature: Search & Registration
Background:
Given the user login to the Registration Desk
Scenario Outline: Search for a patient
When the user search for "<patientName>"
Then the result should be "<result>"
Feature: User Login
Scenario Outline: User login to the dashboard
Given user arrives at the login page
When the user logs in with "<username>" and "<password>" to the "<location>"
Then the user should be "<ability>" to login
Examples:
| username | password | location | ability |
| admin | Admin123 | Registration Desk | able |
Scenario Outline: Register a patient
Given user arrives at the registration page
When the user enters "<validity>" details for John Smith
And user click on create patient button
Then patient registration should be "<status>"
Examples:
| validity | status |
| right | successful |
| wrong | unsuccessful |
| incomplete | inactive |
Scenario Outline: Search for a patient
Given user arrives at the home page
When the user search for "<patientName>"
Then the result should be "<result>"
Examples:
| patientName | result |
| Kevin Jones | Found 1 patient |
| Fred Wells | No results found |
Cypress.Commands.add('loginToTheLocation', ( location ) => {
cy.task('getProperty', 'webapp.url').then(baseUrl => {
cy.visit(`${baseUrl}/login`);
cy.get('#username').type('admin');
cy.contains('Continue').click();
cy.get('#password').type('Admin123');
cy.contains('Log in').click();
cy.contains(location).click();
cy.get('button[type="submit"]').click({force: true})
});
import {Given} from 'cypress-cucumber-preprocessor/steps';
Given('user arrives at the login page', () => {
cy.task('getProperty', 'webapp.url').then(baseUrl => {
cy.visit(`${baseUrl}/login`);
});
})
When('the user logs in with {string} and {string}', (username, password) => {
cy.get('#username').type(username);
Feature: User Login
Scenario Outline: User login to the dashboard
Given user arrives at the login page
When the user logs in with "<username>" and "<password>"
And the user selects location "<location>"
Then the user should arrive at the home page
Examples:
| username | password | location |