-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
106 changed files
with
3,303 additions
and
849 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"javascript.format.insertSpaceAfterCommaDelimiter": true, | ||
"javascript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": true, | ||
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": true, | ||
"files.trimFinalNewlines": true, | ||
"files.trimTrailingWhitespace": true, | ||
"files.insertFinalNewline": true, | ||
"editor.renderWhitespace": "boundary", | ||
"editor.fontSize": 14, | ||
"editor.rulers": [ | ||
100, | ||
120 | ||
], | ||
"editor.tabSize": 2, | ||
"javascript.updateImportsOnFileMove.enabled": "never", | ||
"workbench.iconTheme": "material-icon-theme", | ||
"workbench.colorTheme": "Oceanic Plus" | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -99,3 +99,48 @@ add `EMAIL_DELIVERY_METHOD='letter_opener_web'` to `.env`) | |
| Owner | [email protected] | password | | ||
| Admin | [email protected] | password | | ||
| Employee | [email protected] | password | | ||
|
||
## Installation of Cypress Dependencies | ||
|
||
Install the cypress dependencies using the following command: | ||
|
||
```sh | ||
cd cypress | ||
yarn install | ||
``` | ||
|
||
## Running Cypress tests | ||
|
||
Cypress tests can be run on local, staging and production environment. | ||
|
||
To run the cypress tests on the local environment and in headless mode use the | ||
following command: | ||
|
||
```sh | ||
cd cypress | ||
yarn run cy:run:dev | ||
``` | ||
|
||
To run the tests on local environment and in chrome browser use the following | ||
command: | ||
|
||
```sh | ||
cd cypress | ||
yarn run cy:open:dev | ||
``` | ||
|
||
To run the tests on staging environment and in headless mode use the following | ||
command: | ||
|
||
```sh | ||
cd cypress | ||
yarn run cy:run:staging | ||
``` | ||
|
||
To run the tests on staging environment and in chrome browser use the following | ||
command | ||
|
||
```sh | ||
cd cypress | ||
yarn run cy:open:staging | ||
``` |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# frozen_string_literal: true | ||
|
||
class InternalApi::V1::ReportsController < InternalApi::V1::ApplicationController | ||
include Timesheet | ||
|
||
def index | ||
authorize :report | ||
render json: { entries: entries }, status: :ok | ||
end | ||
|
||
private | ||
def entries | ||
current_company.timesheet_entries.map do |timesheet_entry| | ||
timesheet_entry.formatted_entry.transform_keys { |key| key.to_s.camelize(:lower) } | ||
end | ||
end | ||
end |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# frozen_string_literal: true | ||
|
||
class InternalApi::V1::WorkspacesController < ApplicationController | ||
skip_after_action :verify_authorized | ||
|
||
def update | ||
workspace = current_user.companies.find(params[:id]) | ||
if current_user.update(current_workspace_id: workspace.id) | ||
render json: { | ||
success: true, | ||
workspace: workspace, | ||
notice: I18n.t("workspaces.update.success") | ||
}, status: :ok | ||
else | ||
render json: { | ||
errors: current_user.errors, | ||
notice: I18n.t("workspaces.update.failure") | ||
}, status: :unprocessable_entity | ||
end | ||
end | ||
end |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# frozen_string_literal: true | ||
|
||
class ReportsController < ApplicationController | ||
def index | ||
authorize :report | ||
end | ||
end |
This file contains 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
Oops, something went wrong.