Skip to content

Commit 5582b1c

Browse files
committed
Merge branch 'master' of https://github.com/flowjs/ngx-flow into angular-20
2 parents f81ffbd + 4ffceb3 commit 5582b1c

File tree

4 files changed

+38
-7
lines changed

4 files changed

+38
-7
lines changed

.github/workflows/ci-on-push.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Angular Build & Test (PR)
2+
3+
on:
4+
push:
5+
branches:
6+
- "**"
7+
8+
jobs:
9+
build-test:
10+
runs-on: ubuntu-latest
11+
if: ${{ github.actor != 'dependabot[bot]' }}
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
- name: Set up Node
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: 22
19+
cache: 'npm'
20+
- name: Install dependencies
21+
run: npm ci
22+
- name: Build Angular library
23+
run: npx ng build ngx-flow
24+
- name: Run unit tests
25+
run: npx ng test ngx-flow --watch=false --browsers=ChromeHeadless --code-coverage
26+
- name: Send coverage to QLTY
27+
uses: qltysh/qlty-action/coverage@v2
28+
with:
29+
token: ${{secrets.QLTY_COVERAGE_TOKEN}}
30+
files: coverage/ngx-flow/lcov.info

karma.base.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ module.exports = function (config, project) {
2929
subdir: '.',
3030
reporters: [
3131
{type: 'html'},
32-
{type: 'text-summary'}
32+
{type: 'text-summary'},
33+
{type: 'lcov'}
3334
]
3435
},
3536
specReporter: {

projects/ngx-flow/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@flowjs/ngx-flow",
3-
"version": "20.0.0",
3+
"version": "20.0.1",
44
"author": {
55
"name": "Martin Nuc",
66
"email": "[email protected]"

projects/ngx-flow/src/lib/flow.directive.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ import { Component, PLATFORM_ID, ViewChild } from '@angular/core';
22
import { ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing';
33
import { first, skip } from 'rxjs/operators';
44
import { FlowInjectionToken } from './flow-injection-token';
5-
import { FlowChangeEvent, Flow, NgxFlowEvent } from './flow.directive';
5+
import { FlowChangeEvent, FlowConfig, NgxFlowEvent } from './flow.directive';
66
import { flowFileMockFactory } from './helpers/tests/flow-file-mock-factory';
77
import { FlowMock } from './helpers/tests/flow-mock';
88
import { trasnferMockFactory } from './helpers/tests/transfer-mock-factory';
99

1010
@Component({
1111
template: `<ng-container #flow="flow" [flowConfig]="config"></ng-container>`,
12-
imports: [Flow]
12+
imports: [FlowConfig]
1313
})
1414
class TestComponent {
1515
@ViewChild('flow', { static: true })
16-
flow!: Flow;
16+
flow!: FlowConfig;
1717

1818
config = { target: 'http://localhost:3000/upload' };
1919
}
@@ -38,7 +38,7 @@ describe('Flow', () => {
3838

3939
it('should initialize flowjs and export flow directive as template reference variable', () => {
4040
fixture.detectChanges();
41-
expect(component.flow instanceof Flow).toBeTruthy();
41+
expect(component.flow instanceof FlowConfig).toBeTruthy();
4242
expect(component.flow.flowJs).toBeDefined();
4343
expect(component.flow.flowJs.opts.target).toBe('http://localhost:3000/upload');
4444
});
@@ -197,7 +197,7 @@ describe('Flow (SSR)', () => {
197197

198198
beforeEach(() => {
199199
TestBed.configureTestingModule({
200-
imports: [TestComponent, Flow],
200+
imports: [TestComponent, FlowConfig],
201201
providers: [
202202
{
203203
provide: FlowInjectionToken,

0 commit comments

Comments
 (0)