Skip to content

Commit

Permalink
Merge pull request #46 from Donnerstagnacht/dependencies
Browse files Browse the repository at this point in the history
Dependencies
  • Loading branch information
Donnerstagnacht authored Dec 31, 2023
2 parents b26132e + 73ee1fd commit fa6c903
Show file tree
Hide file tree
Showing 37 changed files with 16,211 additions and 15,424 deletions.
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"deno.enable": true,
"deno.lint": true,
"deno.unstable": true
}
24 changes: 14 additions & 10 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,24 @@
"tsConfig": "tsconfig.app.json",
"inlineStyleLanguage": "less",
"assets": [
"src/favicon.ico",
"src/assets",
{
"glob": "**/*",
"input": "node_modules/@taiga-ui/icons/src",
"output": "assets/taiga-ui/icons"
}
"src/favicon.ico",
"src/assets",
{
"glob": "**/*",
"input": "node_modules/@taiga-ui/icons/src",
"output": "assets/taiga-ui/icons"
},
"src/manifest.webmanifest"
],
"styles": [
"node_modules/@taiga-ui/core/styles/taiga-ui-theme.less",
"node_modules/@taiga-ui/core/styles/taiga-ui-fonts.less",
"node_modules/@taiga-ui/styles/taiga-ui-global.less",
"src/styles.less"
],
"scripts": []
"scripts": [],
"serviceWorker": true,
"ngswConfigPath": "ngsw-config.json"
},
"configurations": {
"production": {
Expand Down Expand Up @@ -101,8 +104,9 @@
"tsConfig": "tsconfig.spec.json",
"inlineStyleLanguage": "less",
"assets": [
"src/favicon.ico",
"src/assets"
"src/favicon.ico",
"src/assets",
"src/manifest.webmanifest"
],
"styles": [
"src/styles.less"
Expand Down
1 change: 1 addition & 0 deletions copy_sql_files_to_migration_folder.bat
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ if errorlevel 1 (
@REM Generate types from remote (requires to click apply editor config to work locally, else wise type errors
@REM occure)
supabase gen types typescript --project-id "abcwkgkiztruxwvfwabf" --schema public > supabase/types/supabase.ts
supabase gen types typescript --project-id "abcwkgkiztruxwvfwabf" --schema authenticated_access > supabase/types/supabase_authenticated_access.ts

@REM Start angular client and run tests
@REM pause
Expand Down
56 changes: 56 additions & 0 deletions cypress/e2e/06.3 notifications push receive test.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import {ProfileTest} from "../fixtures/profile";
import {userCreatedByCypress} from "../fixtures/user";
import {supabaseClient} from "../../src/app/auth/supabase-client";
import {POSTGRES_ERRORS} from "../fixtures/postgres_errors";

const profile1: ProfileTest = userCreatedByCypress;

describe(`Push tests show that `, async (): Promise<void> => {
let user_id: string | undefined;
let token: string | undefined;
const TEST_ID = '42e58ca1-2eb8-4651-93c2-cefba2e32f42';

beforeEach(async (): Promise<void> => {
const response = await supabaseClient.auth.signInWithPassword(
{
email: 'follow@seed.com',
password: '12345678',
}
)
user_id = response.data.user?.id
token = response.data.session?.access_token
expect(user_id).to.be.not.null
expect(token).to.be.not.null
})

it('notifications function can not be accessed by client users', async (): Promise<void> => {
// TODO test implementation
const response = await supabaseClient.functions.invoke('hello-world');
expect(response.data).to.be.null
expect(response.error?.code).to.be.equal(POSTGRES_ERRORS.function_not_existing)
})

it('notifications function can not be called by postgres service role', async (): Promise<void> => {
// TODO test implementation
const response = await supabaseClient.functions.invoke('hello-world');
expect(response.data).to.be.null
expect(response.error?.code).to.be.equal(POSTGRES_ERRORS.function_not_existing)
// add secret env service role key variable
})

it('native browser notifications can be received in edge', async (): Promise<void> => {
// TODO test implementation
})

it('native browser notifications can be received in chrome', async (): Promise<void> => {
// TODO test implementation
})

it('native browser notifications can be received in firefox', async (): Promise<void> => {
// TODO test implementation
})

it('native browser notifications can be received in safari', async (): Promise<void> => {
// TODO test implementation
})
})
30 changes: 30 additions & 0 deletions ngsw-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"$schema": "./node_modules/@angular/service-worker/config/schema.json",
"index": "/index.html",
"assetGroups": [
{
"name": "app",
"installMode": "prefetch",
"resources": {
"files": [
"/favicon.ico",
"/index.html",
"/manifest.webmanifest",
"/*.css",
"/*.js"
]
}
},
{
"name": "assets",
"installMode": "lazy",
"updateMode": "prefetch",
"resources": {
"files": [
"/assets/**",
"/*.(svg|cur|jpg|jpeg|png|apng|webp|avif|gif|otf|ttf|woff|woff2)"
]
}
}
]
}
Loading

0 comments on commit fa6c903

Please sign in to comment.