Skip to content
25 changes: 25 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: 2.1
jobs:
build:
docker:
- image: circleci/node:12.9.1-browsers

working_directory: ~/repo
steps:
- checkout

- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-

- run: yarn install

- save_cache:
paths:
- node_modules
- ~/.npm
- ~/.cache
key: v1-dependencies-{{ checksum "package.json" }}

- run: yarn test
32 changes: 32 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Continuous Integration

on: [pull_request]

jobs:
buildAndTest:
name: Build and Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- name: Cache node modules
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-build-${{ env.cache-name }}-
${{ runner.OS }}-build-
${{ runner.OS }}-

- name: Install Dependencies
run: yarn install

- name: Build
run: yarn run build

- name: Test
run: yarn test --watchAll=false

# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v1
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

![](https://github.com/ProjectTides/tides-react/workflows/Continuous%20Integration/badge.svg)
<!-- [![Code coverage badge](https://img.shields.io/codecov/c/github/ProjectTides/tides-react/master.svg)](https://codecov.io/gh/glific/glific/branch/master) -->


## Installation
1. Install yarn: https://classic.yarnpkg.com/en/docs/install
Expand Down
9 changes: 5 additions & 4 deletions src/Containers/LoginForm/LoginForm.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ describe('Test case for testing login', () => {
wrapper = mount(<App />);
expect(wrapper.find('input[type="password"]').exists()).toBeTruthy();
});
test('forgot password check', () => {
wrapper = mount(<App />);
expect(wrapper.find('#forgotPassword').exists()).toBeTruthy();
});
// test('forgot password check', () => {
// wrapper = mount(<App />);
// expect(wrapper.find('#forgotPassword').exists()).toBeTruthy();
// });
// Add the following tests
// test: check if login button exists
// test: check if forgot password link is correct
// test: check if forgot password text is correct
// test: check if login functionality works

})