Skip to content

Commit

Permalink
Merge pull request #264 from WodenWang820118/develop
Browse files Browse the repository at this point in the history
Develop: Vite; TypeScript with Electron
  • Loading branch information
WodenWang820118 authored Oct 18, 2024
2 parents b67e18f + c871b5a commit 2c4f7f8
Show file tree
Hide file tree
Showing 66 changed files with 1,199 additions and 1,362 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ testem.log
Thumbs.db
.env
.angular
.webpack
.vite
# Ignore everything in tag_check_projects
/tag_check_projects/*

Expand All @@ -59,4 +61,4 @@ storybook-static

# Generated Docusaurus files
.docusaurus/
.cache-loader/
.cache-loader/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ The example project is located at the `tag_check_projects` folder at the root di

## Development

This project uses NodeJS v22.8.0 for development.
This project uses NodeJS v22.8.0 for development. If cannot compile, please run `nx reset` and `rm -rf .nx` to reset the project.

### Prerequisites

Expand Down
3 changes: 1 addition & 2 deletions apps/ng-frontend/src/app/app.component.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import {
} from '@storybook/angular';
import { AppComponent } from './app.component';

import { within } from '@storybook/testing-library';
import { expect } from '@storybook/jest';
import { expect, fn, userEvent, within } from '@storybook/test';
import { provideHttpClient } from '@angular/common/http';
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
import { RouterOutlet, provideRouter } from '@angular/router';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import {
} from '@storybook/angular';
import { InitProjectFormComponent } from './init-project-form.component';

import { waitFor, within } from '@storybook/testing-library';
import { expect } from '@storybook/jest';
import { expect, within } from '@storybook/test';
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
import { provideHttpClient } from '@angular/common/http';
import { NgIf } from '@angular/common';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import {
} from '@storybook/angular';
import { ProjectItemComponent } from './project-item.component';

import { within } from '@storybook/testing-library';
import { expect } from '@storybook/jest';
import { expect, fn, userEvent, within } from '@storybook/test';
import { provideHttpClient } from '@angular/common/http';
import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import {
} from '@storybook/angular';
import { ProjectListComponent } from './project-list.component';

import { within } from '@storybook/testing-library';
import { expect } from '@storybook/jest';
import { expect, fn, userEvent, within } from '@storybook/test';
import { provideHttpClient } from '@angular/common/http';
import { MatCardModule } from '@angular/material/card';
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import {
} from '@storybook/angular';
import { HomeViewComponent } from './home-view.component';

import { within } from '@storybook/testing-library';
import { expect } from '@storybook/jest';
import { expect, fn, userEvent, within } from '@storybook/test';
import { provideHttpClient } from '@angular/common/http';
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
import { provideRouter } from '@angular/router';
Expand Down Expand Up @@ -36,14 +35,6 @@ const meta: Meta<HomeViewComponent> = {
export default meta;
type Story = StoryObj<HomeViewComponent>;

export const Primary: Story = {
export const Default: Story = {
args: {},
};

export const Heading: Story = {
args: {},
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
expect(canvas.getByText(/home-view works!/gi)).toBeTruthy();
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import {
} from '@storybook/angular';
import { InitProjectViewComponent } from './init-project-view.component';

import { within } from '@storybook/testing-library';
import { expect } from '@storybook/jest';
import { expect, fn, userEvent, within } from '@storybook/test';
import { provideHttpClient } from '@angular/common/http';
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
import { provideRouter } from '@angular/router';
Expand Down Expand Up @@ -38,14 +37,6 @@ const meta: Meta<InitProjectViewComponent> = {
export default meta;
type Story = StoryObj<InitProjectViewComponent>;

export const Primary: Story = {
export const Default: Story = {
args: {},
};

export const Heading: Story = {
args: {},
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
expect(canvas.getByText(/init-project-view works!/gi)).toBeTruthy();
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import {
} from '@storybook/angular';
import { MainContentComponent } from './main-content.component';

import { within } from '@storybook/testing-library';
import { expect } from '@storybook/jest';
import { expect, fn, userEvent, within } from '@storybook/test';
import { AsyncPipe, ViewportScroller } from '@angular/common';
import { provideHttpClient } from '@angular/common/http';
import { MatButtonModule } from '@angular/material/button';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import {
} from '@storybook/angular';
import { SideBarComponent } from './sidebar.component';

import { within } from '@storybook/testing-library';
import { expect } from '@storybook/jest';
import { expect, fn, userEvent, within } from '@storybook/test';
import { provideHttpClient } from '@angular/common/http';
import { importProvidersFrom } from '@angular/core';
import { MatButtonModule } from '@angular/material/button';
Expand Down Expand Up @@ -41,14 +40,6 @@ const meta: Meta<SideBarComponent> = {
export default meta;
type Story = StoryObj<SideBarComponent>;

export const Primary: Story = {
export const Default: Story = {
args: {},
};

export const Heading: Story = {
args: {},
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
expect(canvas.getByText(/sidebar works!/gi)).toBeTruthy();
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import {
} from '@storybook/angular';
import { HelpCenterViewComponent } from './help-center-view.component';

import { within } from '@storybook/testing-library';
import { expect } from '@storybook/jest';
import { expect, fn, userEvent, within } from '@storybook/test';
import { provideHttpClient } from '@angular/common/http';
import { importProvidersFrom } from '@angular/core';
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
Expand Down Expand Up @@ -40,14 +39,6 @@ const meta: Meta<HelpCenterViewComponent> = {
export default meta;
type Story = StoryObj<HelpCenterViewComponent>;

export const Primary: Story = {
export const Default: Story = {
args: {},
};

export const Heading: Story = {
args: {},
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
expect(canvas.getByText(/help-center-view works!/gi)).toBeTruthy();
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import {
} from '@storybook/angular';
import { FileTableToolbarComponent } from './file-table-toolbar.component';

import { within } from '@storybook/testing-library';
import { expect } from '@storybook/jest';
import { expect, fn, userEvent, within } from '@storybook/test';
import { provideHttpClient } from '@angular/common/http';
import { MatIconModule } from '@angular/material/icon';
import { MatInputModule } from '@angular/material/input';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import {
} from '@storybook/angular';
import { FileTableComponent } from './file-table.component';

import { within } from '@storybook/testing-library';
import { expect } from '@storybook/jest';
import { expect, fn, userEvent, within } from '@storybook/test';
import { DatePipe, NgClass } from '@angular/common';
import { provideHttpClient } from '@angular/common/http';
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
Expand Down Expand Up @@ -51,14 +50,6 @@ const meta: Meta<FileTableComponent> = {
export default meta;
type Story = StoryObj<FileTableComponent>;

export const Primary: Story = {
export const Default: Story = {
args: {},
};

export const Heading: Story = {
args: {},
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
expect(canvas.getByText(/file-table works!/gi)).toBeTruthy();
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import {
} from '@storybook/angular';
import { OverlayComponent } from './overlay.component';

import { within } from '@storybook/testing-library';
import { expect } from '@storybook/jest';
import { expect, fn, userEvent, within } from '@storybook/test';
import { provideHttpClient } from '@angular/common/http';
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
import { provideRouter } from '@angular/router';
Expand Down Expand Up @@ -36,18 +35,8 @@ const meta: Meta<OverlayComponent> = {
export default meta;
type Story = StoryObj<OverlayComponent>;

export const Primary: Story = {
export const Default: Story = {
args: {
isOpen: false,
},
};

export const Heading: Story = {
args: {
isOpen: false,
},
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
expect(canvas.getByText(/overlay works!/gi)).toBeTruthy();
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import {
} from '@storybook/angular';
import { ProgressPieChartComponent } from './progress-pie-chart.component';

import { within } from '@storybook/testing-library';
import { expect } from '@storybook/jest';
import { expect, fn, userEvent, within } from '@storybook/test';
import { provideHttpClient } from '@angular/common/http';
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
import { provideRouter } from '@angular/router';
Expand Down Expand Up @@ -35,14 +34,6 @@ const meta: Meta<ProgressPieChartComponent> = {
export default meta;
type Story = StoryObj<ProgressPieChartComponent>;

export const Primary: Story = {
export const Default: Story = {
args: {},
};

export const Heading: Story = {
args: {},
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
expect(canvas.getByText(/progress-pie-chart works!/gi)).toBeTruthy();
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import {
} from '@storybook/angular';
import { ReportDetailPanelsComponent } from './report-detail-panels.component';

import { within } from '@storybook/testing-library';
import { expect } from '@storybook/jest';
import { expect, fn, userEvent, within } from '@storybook/test';
import { provideHttpClient } from '@angular/common/http';
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
import { provideRouter } from '@angular/router';
Expand Down Expand Up @@ -68,14 +67,6 @@ const meta: Meta<ReportDetailPanelsComponent> = {
export default meta;
type Story = StoryObj<ReportDetailPanelsComponent>;

export const Primary: Story = {
export const Default: Story = {
args: {},
};

export const Heading: Story = {
args: {},
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
expect(canvas.getByText(/report-detail-panels works!/gi)).toBeTruthy();
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import {
} from '@storybook/angular';
import { ReportTableToolbarComponent } from './report-table-toolbar.component';

import { within } from '@storybook/testing-library';
import { expect } from '@storybook/jest';
import { expect, fn, userEvent, within } from '@storybook/test';
import { NgIf } from '@angular/common';
import { provideHttpClient } from '@angular/common/http';
import { MatButtonModule } from '@angular/material/button';
Expand Down Expand Up @@ -57,7 +56,7 @@ const meta: Meta<ReportTableToolbarComponent> = {
export default meta;
type Story = StoryObj<ReportTableToolbarComponent>;

export const Primary: Story = {
export const Default: Story = {
args: {},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import {
} from '@storybook/angular';
import { ReportTableComponent } from './report-table.component';

import { within } from '@storybook/testing-library';
import { expect } from '@storybook/jest';
import { expect, fn, userEvent, within } from '@storybook/test';
import { AsyncPipe, DatePipe, NgClass } from '@angular/common';
import { provideHttpClient } from '@angular/common/http';
import { MatButtonModule } from '@angular/material/button';
Expand Down Expand Up @@ -63,14 +62,6 @@ const meta: Meta<ReportTableComponent> = {
export default meta;
type Story = StoryObj<ReportTableComponent>;

export const Primary: Story = {
export const Default: Story = {
args: {},
};

export const Heading: Story = {
args: {},
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
expect(canvas.getByText(/report-table works!/gi)).toBeTruthy();
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import {
} from '@storybook/angular';
import { SideNavListComponent } from './side-nav-list.component';

import { within } from '@storybook/testing-library';
import { expect } from '@storybook/jest';
import { expect, fn, userEvent, within } from '@storybook/test';
import { NgClass, NgIf } from '@angular/common';
import { provideHttpClient } from '@angular/common/http';
import { MatButtonModule } from '@angular/material/button';
Expand Down Expand Up @@ -52,14 +51,6 @@ const meta: Meta<SideNavListComponent> = {
export default meta;
type Story = StoryObj<SideNavListComponent>;

export const Primary: Story = {
export const Default: Story = {
args: {},
};

export const Heading: Story = {
args: {},
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
expect(canvas.getByText(/side-nav-list works!/gi)).toBeTruthy();
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import {
} from '@storybook/angular';
import { BucketsViewComponent } from './buckets-view.component';

import { within } from '@storybook/testing-library';
import { expect } from '@storybook/jest';
import { expect, fn, userEvent, within } from '@storybook/test';
import { provideHttpClient } from '@angular/common/http';
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
import { provideRouter } from '@angular/router';
Expand Down Expand Up @@ -36,14 +35,6 @@ const meta: Meta<BucketsViewComponent> = {
export default meta;
type Story = StoryObj<BucketsViewComponent>;

export const Primary: Story = {
export const Default: Story = {
args: {},
};

export const Heading: Story = {
args: {},
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
expect(canvas.getByText(/buckets-view works!/gi)).toBeTruthy();
},
};
Loading

0 comments on commit 2c4f7f8

Please sign in to comment.