Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
fa126e02de
|
|||
|
a65baa06fd
|
|||
|
da8c21eb0d
|
|||
|
2e42f65d88
|
|||
|
33eef9d305
|
|||
|
6a145b224c
|
|||
|
913ccd0bf1
|
|||
|
271ba89704
|
|||
| b7f2f35acb | |||
|
86fdb8366e
|
42
.gitea/workflows/test.yaml
Normal file
42
.gitea/workflows/test.yaml
Normal file
@@ -0,0 +1,42 @@
|
||||
name: IPWA Tests
|
||||
run-name: ${{ gitea.actor }} is testing out IPWA
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
Run Angular tests:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [22]
|
||||
steps:
|
||||
- name: Checkout source code
|
||||
uses: actions/checkout@v4
|
||||
- name: Cache node modules
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{matrix.node-version}}
|
||||
cache: 'npm'
|
||||
cache-dependency-path: package-lock.json
|
||||
- name: Setup Chrome
|
||||
uses: browser-actions/setup-chrome@v1.7.3
|
||||
id: setup-chrome
|
||||
with:
|
||||
install-dependencies: true
|
||||
- name: Install node dependencies
|
||||
run: npm ci
|
||||
- name: Echo chrome path
|
||||
run: |
|
||||
echo "$CHROME_BIN"
|
||||
env:
|
||||
CHROME_BIN: ${{steps.setup-chrome.outputs.chrome-path}}
|
||||
- name: Run tests
|
||||
run: npm run ci
|
||||
env:
|
||||
CHROME_BIN: ${{steps.setup-chrome.outputs.chrome-path}}
|
||||
@@ -128,6 +128,7 @@
|
||||
"zone.js/testing"
|
||||
],
|
||||
"tsConfig": "tsconfig.spec.json",
|
||||
"karmaConfig": "karma.conf.js",
|
||||
"inlineStyleLanguage": "scss",
|
||||
"assets": [
|
||||
"src/favicon.ico",
|
||||
|
||||
45
karma.conf.js
Normal file
45
karma.conf.js
Normal file
@@ -0,0 +1,45 @@
|
||||
// Karma configuration file, see link for more information
|
||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
||||
|
||||
module.exports = function (config) {
|
||||
config.set({
|
||||
basePath: '',
|
||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
||||
plugins: [
|
||||
require('karma-jasmine'),
|
||||
require('karma-chrome-launcher'),
|
||||
require('karma-jasmine-html-reporter'),
|
||||
require('karma-coverage'),
|
||||
require('@angular-devkit/build-angular/plugins/karma')
|
||||
],
|
||||
client: {
|
||||
jasmine: {
|
||||
// you can add configuration options for Jasmine here
|
||||
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
|
||||
// for example, you can disable the random execution with `random: false`
|
||||
// or set a specific seed with `seed: 4321`
|
||||
},
|
||||
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
||||
},
|
||||
jasmineHtmlReporter: {
|
||||
suppressAll: true // removes the duplicated traces
|
||||
},
|
||||
coverageReporter: {
|
||||
dir: require('path').join(__dirname, './coverage/ipwa'),
|
||||
subdir: '.',
|
||||
reporters: [
|
||||
{ type: 'html' },
|
||||
{ type: 'text-summary' }
|
||||
]
|
||||
},
|
||||
reporters: ['progress', 'kjhtml'],
|
||||
browsers: ['Chrome'],
|
||||
restartOnFileChange: true,
|
||||
customLaunchers: {
|
||||
ChromeHeadlessCustom: {
|
||||
base: "ChromeHeadless",
|
||||
flags: ["--no-sandbox", "--disable-gpu"],
|
||||
},
|
||||
},
|
||||
});
|
||||
};
|
||||
@@ -8,7 +8,7 @@
|
||||
"build": "ng build -c production",
|
||||
"watch": "ng build --watch --configuration development",
|
||||
"test": "ng test",
|
||||
"ci": "ng test --no-watch --no-progress --browsers=ChromiumHeadless"
|
||||
"ci": "ng test --no-watch --no-progress --browsers=ChromeHeadlessCustom"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
</mat-dialog-content>
|
||||
<mat-dialog-actions>
|
||||
@if (data.type == "edit") {
|
||||
<button mat-stroked-button color="warn" style="margin-right: auto;">Usuń konto</button>
|
||||
<button mat-stroked-button color="warn" style="margin-right: auto;" (click)="delete()">Usuń konto</button>
|
||||
}
|
||||
<button mat-stroked-button mat-dialog-close>Zamknij</button>
|
||||
<button mat-flat-button color="accent" (click)="submit()">Zapisz</button>
|
||||
|
||||
Reference in New Issue
Block a user