-
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.
* Generalize/rename list stuff to entity, for a more generic naming convention * Abstract out entity view from home into entity-page into dynamic components per entity * Add entity tree to sidebar * Add task and tasklist models, add entities store * Abstact out entity services into a generic API, put interfaces into more suiting files * Split user.service into auth and account service, rename state files from .model to .state * Extract out main pane from sidebar into own component * Combine page entity icon and status icon into one component, add entity page label * Hide sidebar scroll bar when unused * Add breadcrumbs component * Add entity-page placeholder => dashboard * Add reactive rename feature * Integrate description feature * Display children on entity page * Update app title strategy * Add error logging to actionLogger meta reducer * Use OnPush strategy for task.component as well * Write unit tests for store utils * Write component tests for breadcrumbs * Write component tests for TasklistViewComponent * Comment out component tests, comment out var process dummy * Write home e2e tests
- Loading branch information
Showing
106 changed files
with
3,154 additions
and
368 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
import { signup } from 'cypress/support/auth-helpers' | ||
import { testName } from 'cypress/support/helpers' | ||
|
||
beforeEach(() => { | ||
cy.clearDb() | ||
signup() | ||
|
||
cy.intercept('POST', '/list').as('createEntity') | ||
}) | ||
|
||
describe('Workspace', () => { | ||
it('opens dashboard', () => { | ||
cy.get(testName('dashboard-page')).should('exist') | ||
cy.get(testName('entity-page')).should('not.exist') | ||
}) | ||
|
||
describe('Sidebar entity tree', () => { | ||
it.skip('should display the tree') | ||
|
||
it('can add entities', () => { | ||
cy.get(testName('entity-tree-node')).should('have.length', 0) | ||
cy.get(testName('sidebar-create-new-list')).click() | ||
cy.wait('@createEntity').its('response.statusCode').should('equal', 201) | ||
|
||
cy.get(testName('dashboard-page')).should('not.exist') | ||
cy.get(testName('entity-page')).should('exist') | ||
cy.get(testName('entity-tree-node')).should('have.length', 1) | ||
cy.get(testName('entity-tree-node')).should('have.attr', 'data-level', 0) | ||
}) | ||
|
||
describe('Tree nodes', () => { | ||
it('can add children', () => { | ||
cy.get(testName('sidebar-create-new-list')).click() | ||
|
||
cy.get(testName('entity-tree-node')) | ||
.first() | ||
.focus() | ||
.within(() => { | ||
cy.get(testName('create-child')).click() | ||
}) | ||
cy.get(testName('entity-tree-node')).should('have.length', 2) | ||
cy.get(testName('entity-tree-node')).last().should('have.attr', 'data-level', 1) | ||
}) | ||
|
||
it('can open the options menu', () => { | ||
cy.get(testName('sidebar-create-new-list')).click() | ||
|
||
cy.get(testName('entity-tree-node')) | ||
.first() | ||
.focus() | ||
.within(() => { | ||
cy.get(testName('open-menu')).click() | ||
}) | ||
|
||
cy.get(testName('drop-down-menu')).should('exist') | ||
}) | ||
}) | ||
}) | ||
|
||
describe('Entity page', () => { | ||
describe('Tasklist view', () => { | ||
it('can edit the entity name', () => { | ||
cy.get(testName('sidebar-create-new-list')).click() | ||
|
||
const entityName = 'The testing entity' | ||
cy.get(testName('editable-entity-name')).focus().type(entityName) | ||
cy.get(testName('entity-tree-node')).should('contain.text', entityName) | ||
}) | ||
|
||
it('can edit the description', () => { | ||
cy.get(testName('sidebar-create-new-list')).click() | ||
|
||
cy.intercept('PATCH', '/list/*').as('updateEntity') | ||
const description = 'The testing entity description' | ||
|
||
cy.get(testName('add-description')).click() | ||
cy.get(testName('description-editor')).type(description).blur() | ||
cy.wait('@updateEntity').its('response.statusCode').should('equal', 200) // we currently don't have any other way to verify if updating the description has succeeded | ||
}) | ||
|
||
it('can add children', () => { | ||
cy.get(testName('sidebar-create-new-list')).click() | ||
|
||
cy.get(testName('create-children')).click() | ||
cy.get(testName('entity-tree-node')).should('have.length', 2) | ||
cy.get(testName('entity-tree-node')).last().should('have.attr', 'data-level', 1) | ||
}) | ||
}) | ||
}) | ||
}) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
24 changes: 24 additions & 0 deletions
24
client-v2/src/app/components/atoms/entity-page-label/entity-page-label.component.ts
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,24 @@ | ||
import { ChangeDetectionStrategy, Component, Input } from '@angular/core' | ||
import { PageEntityIconKey } from '../icons/page-entity-icon/page-entity-icon.component' | ||
|
||
@Component({ | ||
selector: 'app-entity-page-label', | ||
template: ` | ||
<span class="inline-flex justify-center"> | ||
<page-entity-icon class="icon | mr-1 inline-block w-4 text-md" [icon]="pageIcon"></page-entity-icon> | ||
</span> | ||
<span class="title | truncate">{{ title }}</span> | ||
`, | ||
styles: [ | ||
` | ||
:host { | ||
@apply truncate; | ||
} | ||
`, | ||
], | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
}) | ||
export class EntityPageLabelComponent { | ||
@Input() title!: string | ||
@Input() pageIcon!: PageEntityIconKey | ||
} |
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
4 changes: 1 addition & 3 deletions
4
client-v2/src/app/components/atoms/icons/page-entity-icon/page-entity-icon.component.html
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,3 +1 @@ | ||
<status-icon *ngIf="icon != 'tasklist'" [status]="icon"> </status-icon> | ||
|
||
<app-icon *ngIf="icon == 'tasklist'" iconClass="far fa-tasks text-tinted-300"></app-icon> | ||
<app-icon [iconClass]="entityIconClassMap[icon]"></app-icon> |
Oops, something went wrong.