Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yaus app frontend added #64

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified .husky/pre-commit
100755 → 100644
Empty file.
10 changes: 10 additions & 0 deletions apps/yaus-app-e2e/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": ["plugin:cypress/recommended", "../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {}
}
]
}
12 changes: 12 additions & 0 deletions apps/yaus-app-e2e/cypress.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"fileServerFolder": ".",
"fixturesFolder": "./src/fixtures",
"integrationFolder": "./src/integration",
"modifyObstructiveCode": false,
"supportFile": "./src/support/index.ts",
"pluginsFile": false,
"video": true,
"videosFolder": "../../dist/cypress/apps/yaus-app-e2e/videos",
"screenshotsFolder": "../../dist/cypress/apps/yaus-app-e2e/screenshots",
"chromeWebSecurity": false
}
28 changes: 28 additions & 0 deletions apps/yaus-app-e2e/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"$schema": "..\\..\\node_modules\\nx\\schemas\\project-schema.json",
"sourceRoot": "apps/yaus-app-e2e/src",
"projectType": "application",
"targets": {
"e2e": {
"executor": "@nrwl/cypress:cypress",
"options": {
"cypressConfig": "apps/yaus-app-e2e/cypress.json",
"devServerTarget": "yaus-app:serve:development"
},
"configurations": {
"production": {
"devServerTarget": "yaus-app:serve:production"
}
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/yaus-app-e2e/**/*.{js,ts}"]
}
}
},
"tags": [],
"implicitDependencies": ["yaus-app"]
}
4 changes: 4 additions & 0 deletions apps/yaus-app-e2e/src/fixtures/example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "Using fixtures to represent data",
"email": "[email protected]"
}
13 changes: 13 additions & 0 deletions apps/yaus-app-e2e/src/integration/app.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { getGreeting } from "../support/app.po";

describe("yaus-app", () => {
beforeEach(() => cy.visit("/"));

it("should display welcome message", () => {
// Custom command example, see `../support/commands.ts` file
cy.login("[email protected]", "myPassword");

// Function helper example, see `../support/app.po.ts` file
getGreeting().contains("Welcome yaus-app");
});
});
1 change: 1 addition & 0 deletions apps/yaus-app-e2e/src/support/app.po.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const getGreeting = () => cy.get("h1");
33 changes: 33 additions & 0 deletions apps/yaus-app-e2e/src/support/commands.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// ***********************************************
// This example commands.js shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// https://on.cypress.io/custom-commands
// ***********************************************

// eslint-disable-next-line @typescript-eslint/no-namespace
declare namespace Cypress {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
interface Chainable<Subject> {
login(email: string, password: string): void;
}
}
//
// -- This is a parent command --
Cypress.Commands.add("login", (email, password) => {
console.log("Custom command example: Login", email, password);
});
//
// -- This is a child command --
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
//
//
// -- This is a dual command --
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
//
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
17 changes: 17 additions & 0 deletions apps/yaus-app-e2e/src/support/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// ***********************************************************
// This example support/index.js is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
// behavior that modifies Cypress.
//
// You can change the location of this file or turn off
// automatically serving support files with the
// 'supportFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/configuration
// ***********************************************************

// Import commands.js using ES2015 syntax:
import "./commands";
10 changes: 10 additions & 0 deletions apps/yaus-app-e2e/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"sourceMap": false,
"outDir": "../../dist/out-tsc",
"allowJs": true,
"types": ["cypress", "node"]
},
"include": ["src/**/*.ts", "src/**/*.js"]
}
11 changes: 11 additions & 0 deletions apps/yaus-app/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"presets": [
[
"@nrwl/react/babel",
{
"runtime": "automatic"
}
]
],
"plugins": []
}
16 changes: 16 additions & 0 deletions apps/yaus-app/.browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This file is used by:
# 1. autoprefixer to adjust CSS to support the below specified browsers
# 2. babel preset-env to adjust included polyfills
#
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
#
# If you need to support different browsers in production, you may tweak the list below.

last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major version
last 2 iOS major versions
Firefox ESR
not IE 9-11 # For IE 9-11 support, remove 'not'.
18 changes: 18 additions & 0 deletions apps/yaus-app/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"extends": ["plugin:@nrwl/nx/react", "../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {}
},
{
"files": ["*.ts", "*.tsx"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"rules": {}
}
]
}
11 changes: 11 additions & 0 deletions apps/yaus-app/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* eslint-disable */
export default {
displayName: "yaus-app",
preset: "../../jest.preset.js",
transform: {
"^(?!.*\\.(js|jsx|ts|tsx|css|json)$)": "@nrwl/react/plugins/jest",
"^.+\\.[tj]sx?$": "babel-jest",
},
moduleFileExtensions: ["ts", "tsx", "js", "jsx"],
coverageDirectory: "../../coverage/apps/yaus-app",
};
80 changes: 80 additions & 0 deletions apps/yaus-app/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"$schema": "..\\..\\node_modules\\nx\\schemas\\project-schema.json",
"sourceRoot": "apps/yaus-app/src",
"projectType": "application",
"targets": {
"build": {
"executor": "@nrwl/web:webpack",
"outputs": ["{options.outputPath}"],
"defaultConfiguration": "production",
"options": {
"compiler": "babel",
"outputPath": "dist/apps/yaus-app",
"index": "apps/yaus-app/src/index.html",
"baseHref": "/",
"main": "apps/yaus-app/src/main.tsx",
"polyfills": "apps/yaus-app/src/polyfills.ts",
"tsConfig": "apps/yaus-app/tsconfig.app.json",
"assets": ["apps/yaus-app/src/favicon.ico", "apps/yaus-app/src/assets"],
"styles": ["apps/yaus-app/src/styles.css"],
"scripts": [],
"webpackConfig": "@nrwl/react/plugins/webpack"
},
"configurations": {
"development": {
"extractLicenses": false,
"optimization": false,
"sourceMap": true,
"vendorChunk": true
},
"production": {
"fileReplacements": [
{
"replace": "apps/yaus-app/src/environments/environment.ts",
"with": "apps/yaus-app/src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false
}
}
},
"serve": {
"executor": "@nrwl/web:dev-server",
"defaultConfiguration": "development",
"options": {
"buildTarget": "yaus-app:build",
"hmr": true
},
"configurations": {
"development": {
"buildTarget": "yaus-app:build:development"
},
"production": {
"buildTarget": "yaus-app:build:production",
"hmr": false
}
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/yaus-app/**/*.{ts,tsx,js,jsx}"]
}
},
"test": {
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/apps/yaus-app"],
"options": {
"jestConfig": "apps/yaus-app/jest.config.ts",
"passWithNoTests": true
}
}
},
"tags": []
}
35 changes: 35 additions & 0 deletions apps/yaus-app/sdk-generation/.api/api.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"version": "1.0",
"apis": [
{
"identifier": "yaus",
"source": "link.yaml",
"integrity": "sha512-AmyAhwwlvx3MMgPDFLJrsyBlFdu6R0ha4Qr4dBI5FKARlW2arHJgFMuRhKM6z0eHYa6yiJ89D2HftRUg7e1nww==",
"installerVersion": "5.0.0-beta.1"
},
{
"identifier": "generate",
"source": "link.yaml",
"integrity": "sha512-AmyAhwwlvx3MMgPDFLJrsyBlFdu6R0ha4Qr4dBI5FKARlW2arHJgFMuRhKM6z0eHYa6yiJ89D2HftRUg7e1nww==",
"installerVersion": "5.0.0-beta.1"
},
{
"identifier": "yaus_link",
"source": "link.json",
"integrity": "sha512-AmyAhwwlvx3MMgPDFLJrsyBlFdu6R0ha4Qr4dBI5FKARlW2arHJgFMuRhKM6z0eHYa6yiJ89D2HftRUg7e1nww==",
"installerVersion": "5.0.0-beta.1"
},
{
"identifier": "yaus_link_generate",
"source": "link.json",
"integrity": "sha512-AmyAhwwlvx3MMgPDFLJrsyBlFdu6R0ha4Qr4dBI5FKARlW2arHJgFMuRhKM6z0eHYa6yiJ89D2HftRUg7e1nww==",
"installerVersion": "5.0.0-beta.1"
},
{
"identifier": "yaus_link_generation",
"source": "link.json",
"integrity": "sha512-KtnoQ2U8BEyH3I3WOER5KOCm5n9oz9p05dX+KXRz5+T/jkykJDkkiTFZoHQ/F39bGfxDroVYrKIIEFEQfQ6JQw==",
"installerVersion": "5.0.0-beta.1"
}
]
}
Loading