- React JS
- Redux Thunk
- Redux Form
- Redux Logger
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| process.env.NODE_ENV = "test"; | |
| import * as mongoose from "mongoose"; | |
| import * as request from "supertest"; | |
| import server from "../../app"; | |
| import config from "../../config"; | |
| import { INVITE_EMAIL, mockUser } from "../../utils/test.utils"; | |
| describe("Users Route", () => { | |
| beforeAll(done => { | |
| mongoose.connect( | |
| config.connectionStr.dev, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| process.env.NODE_ENV = "test"; | |
| import * as mongoose from "mongoose"; | |
| import * as request from "supertest"; | |
| import server from "../../app"; | |
| import { INVITE_EMAIL, mockUser } from "../../utils/test.utils"; | |
| describe("Users Route", () => { | |
| let token, id, mailConfirm: string; | |
| describe("/POST users", () => { | |
| it("it should add a new user", done => { | |
| request(server) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Feature: Logging User | |
| Scenario: Successfuly User Logged | |
| Given Username is "mksglu" | |
| And password is 123456 | |
| When the user is logging in | |
| Then the user should be logged in | |
| | attribute | type | value | | |
| | Role | numeric | 1 | | |
| | Auth | boolean | true | | |
| | User | string | test12 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import * as React from 'react'; | |
| interface IProps { | |
| propName?: any; | |
| loadingTime?: boolean; | |
| } | |
| const loadingHOC = ({ propName, loadingTime = false }: IProps) => < | |
| P extends {} | |
| >( | |
| WrappedComponent: React.ComponentClass<P> | React.StatelessComponent<P> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react' | |
| import { connect } from 'react-redux' | |
| import { Redirect, Route } from 'react-router-dom' | |
| const PrivateRoute = ({ component: Component, ...rest }) => { | |
| const { authentication } = rest | |
| return ( | |
| <Route | |
| {...rest} | |
| render={props => |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| listen 80; | |
| root /var/www/httdocs; | |
| index index.php index.html index.htm index.nginx-debian.html; | |
| server_name <server_name>; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| aalib | |
| acl | |
| acpi | |
| acpid | |
| adwaita-icon-theme | |
| alsa-lib | |
| alsa-plugins | |
| alsa-utils | |
| apm | |
| appstream-glib |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo nano /etc/resolv.conf | |
| # Generated by resolvconf | |
| NetworkManager | |
| nameserver 8.8.8.8 | |
| nameserver: 8.8.4.4 | |
| sudo chattr +i /etc/resolv.conf | |
| sudo systemctl restart NetworkManager.service |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| upower -i $(upower -e | grep 'BAT') | grep -E "state|to\ full|percentage" | |