-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
d57df66
commit 9c20d26
Showing
9 changed files
with
1,330 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,35 @@ | ||
# Admin | ||
# MiniCart-Admin | ||
|
||
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 17.0.10. | ||
MiniCart-Admin ist ein Webshop der Allerlei verkauft. Es gibt einen Admin und einen Benutzerbereich. | ||
Die App wurde in Angular 17.0.9 geschrieben. | ||
|
||
## Development server | ||
|
||
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files. | ||
## Demo-Shop | ||
|
||
Du kannst den Demo-Shop hier besuchen: [https://minicart.ch](https://minicart.ch) | ||
|
||
## Code scaffolding | ||
## Initial Setup | ||
|
||
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. | ||
Im App-Verzeichnis zuerst Abhängigkeiten installieren:`nmp i` oder `nmp install`. | ||
|
||
## Build | ||
## Development server | ||
|
||
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. | ||
Um den Entwicklungsserver zu starten, folgenden Befehl ausführen:`ng serve` oder `ng s`. | ||
Öffne im Browser die Url http://localhost:4200/. Die App wird automatisch gestartet. | ||
|
||
## Running unit tests | ||
## App Build | ||
Um die App zu builden folgenden Befehl ausführen:`ng build`. | ||
|
||
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). | ||
## Api-Server | ||
|
||
## Running end-to-end tests | ||
Bitte denke daran, dass diese App nur mit einer lokale Laravel-Installation funktionert. | ||
Die Api-Url für den Demo-Shop: https://api.minicart.ch/api/ kann nicht im Develeopment server angesprochen werden. | ||
Du kannst den Server von hier ziehen: https://github.com/almirhodzic/minicart-server und lokal installieren. | ||
(Minimale Laravel-Kenntnisse vorausgesetzt) | ||
|
||
Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities. | ||
## Unit Test | ||
|
||
## Further help | ||
Für den Unit Test mit [Karma](https://karma-runner.github.io/latest/index.html), führe folgenden Befehl aus:`ng test` | ||
|
||
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page. | ||
## e2e Test | ||
npm run cypress:open |
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,9 @@ | ||
import { defineConfig } from "cypress"; | ||
|
||
export default defineConfig({ | ||
e2e: { | ||
setupNodeEvents(on, config) { | ||
// implement node event listeners here | ||
}, | ||
}, | ||
}); |
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 @@ | ||
describe('template spec', () => { | ||
it('passes', () => { | ||
cy.visit('https://minicart.ch/dashboard') | ||
}) | ||
}) | ||
|
||
it('Login-Test auf minicart.ch', function () { | ||
const loginPage = 'https://minicart.ch/login' | ||
const loginUser = '[email protected]' | ||
const loginPass = '1234' | ||
|
||
cy.visit(loginPage) | ||
cy.get('input[type="email"]').type(loginUser) | ||
cy.get('input[type="password"]').type(`${loginPass}{enter}`) | ||
cy.url().should('include', '/dashboard') | ||
cy.get('h5').should('contain', 'Hallo Admin!') | ||
}) |
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,5 @@ | ||
{ | ||
"name": "Using fixtures to represent data", | ||
"email": "[email protected]", | ||
"body": "Fixtures are a great way to mock data for responses to routes" | ||
} |
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,37 @@ | ||
/// <reference types="cypress" /> | ||
// *********************************************** | ||
// This example commands.ts 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 | ||
// *********************************************** | ||
// | ||
// | ||
// -- This is a parent command -- | ||
// Cypress.Commands.add('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) => { ... }) | ||
// | ||
// declare global { | ||
// namespace Cypress { | ||
// interface Chainable { | ||
// login(email: string, password: string): Chainable<void> | ||
// drag(subject: string, options?: Partial<TypeOptions>): Chainable<Element> | ||
// dismiss(subject: string, options?: Partial<TypeOptions>): Chainable<Element> | ||
// visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element> | ||
// } | ||
// } | ||
// } |
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,20 @@ | ||
// *********************************************************** | ||
// This example support/e2e.ts 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' | ||
|
||
// Alternatively you can use CommonJS syntax: | ||
// require('./commands') |
Oops, something went wrong.