Fix agenda create event component

This commit is contained in:
Peter Maquiran
2021-07-14 14:29:03 +01:00
parent 5614fc38fd
commit 8c859834aa
4 changed files with 47 additions and 50 deletions
+1
View File
@@ -11,6 +11,7 @@
"e2e": "ng e2e", "e2e": "ng e2e",
"nice": "node server.js", "nice": "node server.js",
"test": "jest --detectOpenHandles --runInBand", "test": "jest --detectOpenHandles --runInBand",
"test:prof": "ionic build --prod && npm run test",
"dev": "lite-server --baseDir=www" "dev": "lite-server --baseDir=www"
}, },
"private": true, "private": true,
@@ -99,7 +99,6 @@ export class NewEventPage implements OnInit {
Form: FormGroup; Form: FormGroup;
validateFrom = false validateFrom = false
public options = [ public options = [
{ value: true, label: 'True' }, { value: true, label: 'True' },
{ value: false, label: 'False' } { value: false, label: 'False' }
@@ -110,14 +109,10 @@ export class NewEventPage implements OnInit {
public stepMinutes = [1, 5, 10, 15, 20, 25]; public stepMinutes = [1, 5, 10, 15, 20, 25];
public stepSeconds = [1, 5, 10, 15, 20, 25]; public stepSeconds = [1, 5, 10, 15, 20, 25];
public dateControlStart = new FormControl(moment("DD MM YYYY hh"));
public dateControlEnd = new FormControl(moment("DD MM YYYY hh"));
public dateControlOccurrence = new FormControl(moment("DD MM YYYY hh")); public dateControlOccurrence = new FormControl(moment("DD MM YYYY hh"));
showLoader = false showLoader = false
get dateOccurrence () { get dateOccurrence () {
return this.dateControlOccurrence.value return this.dateControlOccurrence.value
} }
@@ -133,6 +128,7 @@ export class NewEventPage implements OnInit {
) { ) {
this.dateAdapter.setLocale('pt'); this.dateAdapter.setLocale('pt');
this.loggeduser = userService.ValidatedUser; this.loggeduser = userService.ValidatedUser;
this.postEvent = new Event();
this.postEvent.StartDate = new Date(); this.postEvent.StartDate = new Date();
this.postEvent.EndDate = new Date(new Date().getTime() + 15 * 60000); this.postEvent.EndDate = new Date(new Date().getTime() + 15 * 60000);
@@ -144,7 +140,7 @@ export class NewEventPage implements OnInit {
if(!this.restoreTemporaryData()){ if(!this.restoreTemporaryData()){
// clear // clear
this.postEvent = new Event();
this.eventBody = { BodyType : "1", Text : ""}; this.eventBody = { BodyType : "1", Text : ""};
this.postEvent.Body = this.eventBody; this.postEvent.Body = this.eventBody;
+1 -1
View File
@@ -8,7 +8,7 @@ describe('Puppeteer tests', () => {
// await page.goto(process.env.PUPPETEER_HOST) // await page.goto(process.env.PUPPETEER_HOST)
}) })
test('[table] create event', async () => { test('[table] Open create event component', async () => {
await page.setViewport({width: 1200, height: 720}); await page.setViewport({width: 1200, height: 720});
await page.goto(process.env.PUPPETEER_HOST); // wait until page load await page.goto(process.env.PUPPETEER_HOST); // wait until page load