Skip to content

Commit

Permalink
Merge pull request #11 from josieecook/DateSelectionComponent
Browse files Browse the repository at this point in the history
Date selection component
  • Loading branch information
IrisSC authored Jun 10, 2021
2 parents a573848 + 8582c13 commit 2c6603f
Show file tree
Hide file tree
Showing 15 changed files with 516 additions and 50 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ The above is not an exhaustive list of ways to participate in FarmData2. For som

## Technology Onboarding ##

Interacting with FarmData2 requires a basic familiarity with git and GitHub. FarmData2 development uses a fairly standard web technology stack including HTML, CSS, Bootstrap, JavaScript, and Vue.js. The front-end accesses FarmData2 data through the [FarmOS API](https://farmos.org/development/api/) using the [Axios](https://github.com/axios/axios) library. End-to-end testing is done using the [Cypress framework](https://www.cypress.io/).
Interacting with FarmData2 requires a basic familiarity with git and GitHub. FarmData2 development uses a fairly standard web technology stack including HTML, CSS, Bootstrap, JavaScript, and Vue.js. The front-end accesses FarmData2 data through the [FarmOS API](https://farmos.org/development/api/) using the [Axios](https://github.com/axios/axios) library. End-to-end and component testing is done using the [Cypress framework](https://www.cypress.io/).

If you are unfamiliar with one or more of these technologies the [ONBOARDING](ONBOARDING.md) document provides additional information about each, as well as resources and activities for learning about them.

Expand Down
2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The following are some recommendations for setting up a development platform usi
- If your machine has 8GB or more of RAM [Ubuntu Desktop](https://ubuntu.com/download/desktop) is recommended with an allocation of at least 4GB of RAM to the virtual machine.
- If your machine has less than 8GB of RAM Ubuntu based [Linux Lite](https://www.linuxliteos.com/) is recommended with an allocation of half of the machine's RAM to the virtual machine.
- When creating your virtual machine:
- Allocate a virtual disk of at least 20GB.
- Allocate a virtual disk of at least 30GB.
- Set the Video Memory to 128 MB.
- __MacOS:__ If you are running VirtualBox on MacOS using a machine with a retina display the performance can be quite sluggish. [Launching VirtualBox in Low Resolution Mode](https://forums.virtualbox.org/viewtopic.php?f=8&t=90446&start=75#p470879) will resolve this issue.

Expand Down
28 changes: 23 additions & 5 deletions ONBOARDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ The following resources can be useful for learning what you'll need to know abou

## Quickest Start ##

FarmData2 makes use of the following key technologies. HTML, CSS and Bootstrap, JavaScript with Vue.js and Axios, and Cypress for testing. If you are familiar all or most of those it may be sufficient to start by having a look at any of the modules in [farmdata2_modules/fd2_tabs](https://github.com/DickinsonCollege/FarmData2/tree/main/farmdata2_modules/fd2_tabs). The [README.md](https://github.com/DickinsonCollege/FarmData2/blob/main/farmdata2_modules/fd2_tabs/fd2_example/README.md) in the `fd2_example` module provides the essential information about how to add new modules to FarmData2.
FarmData2 makes use of the following key technologies. HTML, CSS and Bootstrap, JavaScript with Vue.js and Axios, and Cypress for testing. If you are familiar all or most of those it may be sufficient to start by having a look at any of the modules in [farmdata2_modules/fd2_tabs](https://github.com/DickinsonCollege/FarmData2/tree/main/farmdata2_modules/fd2_tabs). The [fd2_example/README.md](https://github.com/DickinsonCollege/FarmData2/blob/main/farmdata2_modules/fd2_tabs/fd2_example/README.md) provides the essential information about how to add and test new FarmData2 features.

## FarmData2 School ##

FarmData2 has been used in a number of undergraduate computer science courses and activities have been developed to guide students through an introduction to FarmData2 and the technologies that it uses. If you are new to open source and FarmData2 or to any of the technologies that FarmData2 uses, working through these activities will be an efficient way to get up to speed. If you are a more experienced developer you might just pick and choose from these activities, or skip over them completely to the more general resources in the sections below.

The activities will guide you from an introduction to FOSS and FarmData2, through installation of FarmData2 and then through the use of each of the key technologies used in FarmData2. Each activity includes practice using the technologies within the context of FarmData2. Thus, you'll learn not only the technologies, but will get comfortable working within FarmData2 as well.
The activities will guide you from an introduction to FOSS and FarmData2, through installation of FarmData2 and then through the use of each of the key technologies used in FarmData2. Each activity includes practice using the technologies within the context of FarmData2. Thus, you'll learn not only the technologies, but will get comfortable working within the FarmData2 developer environment as well.

If you use these activities, please keep in mind that they were created for use as assignments in courses. Thus, you shouldn't feel obligated to answer every question and you should skip over any class specific parts that don't make sense outside of a course. When you have completed all of the activities you'll be well on your way to being a FarmData2 developer.
If you use these activities, please keep in mind that they were created for use as assignments in courses. Thus, you shouldn't feel obligated to answer every question and you should skip over any class specific parts that don't make sense outside of a course. When you have completed all of the activities you'll be well on your way to being a FarmData2 developer. In addition, while these activites will be updated as FarmData2 evolves, they may not be fully in synch with the latest code in the repository. If you run in to any issues, use the

- 01 - Introduction to FOSS & The FarmData2 Community [ [docx](media/Activities/01-IntroToFarmData2.docx) | [pdf](media/Activities/01-IntroToFarmData2.pdf) ]
- 02 - FarmData2 Developer Install [ [docx](media/Activities/02-DeveloperInstall.docx) | [pdf](media/Activities/02-DeveloperInstall.pdf) ]
Expand Down Expand Up @@ -148,7 +148,11 @@ The FarmData2 front end exchanges data with the server using the [FarmOS API](ht

#### Cypress ####

The functionality of FarmData2 modules is tested using the [Cypress framework](https://www.cypress.io/). Cypress is an end-to-end test framework that works by controlling the web browser. A test typically consists of a series of steps that are automated by the cypress tests, called _spec_s. A typical spec consist of the steps:
The functionality of FarmData2 is tested using the [Cypress framework](https://www.cypress.io/). The tests in FarmData2 consist of end-to-end tests and component tests. The end-to-end tests run against the developer instance of FarmData2 and check the functionality of the pages. The component tests check the behavior of custom components that appear in FarmData2, in isolation from the runing instance. FarmData 2 provides support for running both types of Cypress tests in a Docker container that eliminates the need to install or configure Cypress. See the documentation in the [farmdata2_modules/fd2_tabs/README.md](https://github.com/DickinsonCollege/FarmData2/blob/main/farmdata2_modules/fd2_tabs/fd2_example/README.md) file for information about runing Cypress tests in FarmData2.

##### End-to-End Tests #####

The Cypress end-to-end test framework works by controlling the web browser. A test typically consists of a series of steps that are automated by the Cypress tests, called _spec_s. A typical spec consist of the steps:
1. Setup the test (e.g. login, prime the database)
1. Visit a specific page
1. Query the page for an _html element_ of interest (e.g. button, ext field)
Expand All @@ -164,6 +168,20 @@ The functionality of FarmData2 modules is tested using the [Cypress framework](h
- [should](https://docs.cypress.io/api/commands/should.html#Syntax): Documentation for the `should` statement that is used to make assertions in cypress tests.
- [Assertions](https://docs.cypress.io/guides/references/assertions): A reference for all of the assertions (e.g. assertions and chainers for should) that can be used in cypress tests.

##### Component Tests #####

Cypress component tests work by mounting a Vue Component into a browser and allowing tests to interact with it in isolation from the application. A typical comonent test will:
1. Configuring and mounting the component into the test framework.
1. Query the component for an _html element_ of interest (e.g. button, ext field)
1. Interact with that element (e.g. click the button, enter some text)
1. Make an assertion about the result (e.g. the component emits an event or changes state).

- Resources:
- All of the Cypress resources above are also relevant here.
- [Component Testing](https://docs.cypress.io/guides/component-testing/introduction): An introduction to the component testing in Cypress. Note: With FarmData2 support you will not need to install or setup the component testing framework.
- [Vue Test Utils Guides](https://vue-test-utils.vuejs.org/guides): Cypress component testing is built on top of the Vue Test Utils. So all of their functionality is also available within a Cypress component test. The _Getting Started_, _Common Tips_, _Testing Key, Mouse and other DOM Events_ and _Testing Asynchronous Behavior_ sections are most relevant to FarmData2 testing.
- [Vue Test Utils API](https://vue-test-utils.vuejs.org/api/): API documentation for all of the functionality of the Vue Test Utils.

### Project Automation ###

#### docker ####
Expand All @@ -181,7 +199,7 @@ All of the docker related configuration and source files are found in the [docke

FarmData2 uses docker-compose to build custom docker images for farmOS and the TheiaIDE containers and to start and network all of the containers.

See the docker-compose.yml file in the [docker](https://github.com/DickinsonCollege/FarmData2/tree/main/docker) directory.
See the `docker-compose.yml` file in the [docker](https://github.com/DickinsonCollege/FarmData2/tree/main/docker) directory.

#### bash scripting ####

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function fd2_barn_kit_menu() {
$items['farm/fd2-barn-kit/info'] = array(
'title' => 'Info',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -100,
'weight' => -10,
);

$items['farm/fd2-barn-kit/harvestReport'] = array(
Expand Down
Loading

0 comments on commit 2c6603f

Please sign in to comment.