The DaSCH Service Platform (DSP) is our main product within release {{dsp.release}}
@@ -28,7 +28,7 @@
Explore our software products
-
+
Get more support or help to improve
diff --git a/src/app/main/help/help.component.spec.ts b/src/app/main/help/help.component.spec.ts
index b4588383fa..0623fc1202 100644
--- a/src/app/main/help/help.component.spec.ts
+++ b/src/app/main/help/help.component.spec.ts
@@ -1,8 +1,9 @@
-import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
+import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { MatButtonModule } from '@angular/material/button';
import { MatDialogModule } from '@angular/material/dialog';
import { MatIconModule } from '@angular/material/icon';
import { MatSnackBarModule } from '@angular/material/snack-bar';
+import { By } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { RouterTestingModule } from '@angular/router/testing';
import { KnoraApiConnection } from '@dasch-swiss/dsp-js';
@@ -21,7 +22,8 @@ describe('HelpComponent', () => {
const appInitSpy = {
dspConfig: {
- release: '2022.01.01'
+ environment: 'unit test server',
+ release: '2022.02.02'
}
};
@@ -71,5 +73,19 @@ describe('HelpComponent', () => {
expect(component).toBeTruthy();
});
- // all the buttons have been tested in e2e tests => see e2e/src/help.e2e-spec.ts
+ it('should have a mailto href incl. subject', () => {
+ // get the support section and find the contact-us button
+ const hostCompDe = fixture.debugElement;
+ const section = hostCompDe.query(By.css('.support'));
+
+ const grid = section.query(By.directive(GridComponent));
+ const button = grid.query(By.css('.mailto'));
+ const href = button.nativeElement.href;
+
+ expect(href).toEqual('mailto:support@dasch.swiss?subject=DSP-APP%20request%20|%20unit%20test%20server:%202022.02.02');
+
+ });
+
+ // all other buttons have been tested in e2e tests => see e2e/src/help.e2e-spec.ts
+
});
diff --git a/src/app/main/help/help.component.ts b/src/app/main/help/help.component.ts
index b663f37a4b..6f8fbd3fca 100644
--- a/src/app/main/help/help.component.ts
+++ b/src/app/main/help/help.component.ts
@@ -73,9 +73,9 @@ export class HelpComponent implements OnInit {
support: GridItem[] = [
{
title: 'Need more help?',
- text: 'Have you had some issues by using our software? Let us know and get in contact with developers and users:',
- url: 'https://discuss.dasch.swiss',
- urlText: 'DaSCH Forum'
+ text: 'Have you had some issues by using our software? Let us know and get in contact with the developers:',
+ url: 'mailto:support@dasch.swiss?subject=DSP-APP request | ',
+ urlText: 'Contact us'
},
{
title: 'DaSCH Infrastructure',
@@ -101,6 +101,8 @@ export class HelpComponent implements OnInit {
this.dsp = this._appInitService.dspConfig;
+ this.support[0].url += this.dsp.environment + ': ' + this.dsp.release;
+
// quick solution; todo: has to be done in a better way
// to go directly to the page e.g. https://dasch.atlassian.net/wiki/spaces/changelog/pages/25067546/Releasenews+2022.01.02
// or https://dasch.atlassian.net/wiki/spaces/changelog/pages/21266446/Releasenews+2022.01.01