예제 #1
0
        public void WhenIEnterTheNotificationDetails(Table table)
        {
            var notificationparams            = table.CreateInstance <NotificationParamaters>();
            NotificationPage notificationpage = new NotificationPage();

            notificationpage.WaitForThePageToLoad();

            Utilities util      = new Utilities();
            string    timestamp = util.Gettimestamp();

            notificationpage.enterNameField(notificationparams.notificationname + timestamp);
            ScenarioContext.Current.Add("notificationname", notificationparams.notificationname + timestamp);
            notificationpage.SelectEventSelectBox(notificationparams.eventname);
            ScenarioContext.Current.Add("eventselected", notificationparams.eventname);
            notificationpage.SelectTemplateSelectBox(notificationparams.templateType);
            ScenarioContext.Current.Add("templateselected", notificationparams.templateType);
            notificationpage.enterConditionField(notificationparams.condition);
            ScenarioContext.Current.Add("conditionfield", notificationparams.condition);
            // used for validating input data
            if (notificationparams.enabled == "true")
            {
                notificationpage.ClickEnabledCheckbox();
            }
            notificationpage.ClickSaveButton();
        }
예제 #2
0
        public void WhenIClickAddANotification()
        {
            NotificationPage notificationpage = new NotificationPage();

            notificationpage.WaitForThePageToLoad();
            notificationpage.ClickTreeDotsButton();
            notificationpage.ClickAddButton();
        }
예제 #3
0
        public void InitPage()
        {
            loginPage    = new LoginPage(this);
            activityPage = new ActivityPage(this);
            framePage    = new FramePage(this);
            infoPage     = new InformationPage(this);
            notiPage     = new NotificationPage(this);
            listPage     = new MyListPage(this);

            _currentWindowSize = new Size(this.Width, this.Height);
            mainFrame.Navigate(loginPage);
        }
예제 #4
0
        public void Reload()
        {
            if (App.Tail.Blend.SelectedBlendedAccount != null)
            {
                Title = App.Tail.Blend.SelectedBlendedAccount.Name + " 병합계정";
            }
            else
            {
                Title = App.Tail.Account.SelectedAccountGroup.AccountForRead.User.NickName + " 계정";
            }

            TimelinePage.Reload();
            MentionPage.Reload();
            NotificationPage.Reload();
        }
예제 #5
0
        public void SelectAllNotifications()
        {
            // Sign into Mars Portal
            SignIn.OpenForm();

            //Fill in credentials
            SignIn.FillCredentials(7);

            NotificationPage.ClickNotifications();
            NotificationPage.SeeAllNotifications();

            //Click on select all notifications
            NotificationPage.SelectAllServiceRequests();

            //Assertion
            NotificationPage.AllServiceRequestsSelectedAssertion();
        }
예제 #6
0
        public void ThenTheNotificationHasBeenSuccessfullyCreated()
        {
            //validate the link is present and clickable
            NotificationPage notificationspage = new NotificationPage();

            notificationspage.WaitForThePageToLoad();
            Assert.IsTrue(notificationspage.SuccessMsgDisplayed());
            String notification_name = "//a[contains(text(),'" + ScenarioContext.Current["notificationname"] + "')][1]";

            Driver.CurrentDriver.FindElement(By.XPath(notification_name)).Click();
            System.Threading.Thread.Sleep(5000);

            // validating all entries are completed as expected on folowing page
            Assert.IsTrue(Driver.CurrentDriver.FindElement(By.XPath(notificationspage.Checkelement(ScenarioContext.Current["notificationname"].ToString()))).Displayed);
            Assert.IsTrue(Driver.CurrentDriver.FindElement(By.XPath(notificationspage.Checkelement(ScenarioContext.Current["eventselected"].ToString()))).Displayed);
            Assert.IsTrue(Driver.CurrentDriver.FindElement(By.XPath(notificationspage.Checkelement(ScenarioContext.Current["templateselected"].ToString()))).Displayed);
            Assert.IsTrue(Driver.CurrentDriver.FindElement(By.XPath(notificationspage.Checkelement(ScenarioContext.Current["conditionfield"].ToString()))).Displayed);
        }
예제 #7
0
        public void MarkMultipleNotificationAsRead()
        {
            // Sign into Mars Portal
            SignIn.OpenForm();

            //Fill in credentials
            SignIn.FillCredentials(7);

            NotificationPage.ClickNotifications();
            NotificationPage.SeeAllNotifications();

            //Select Multiple notifications
            NotificationPage.SelectMultipleServiceRequests();

            NotificationPage.MarkSelection();

            //Assertion
            NotificationPage.MarkAsReadAssertion();
        }
예제 #8
0
        private void DisplayGameNotification(bool isVictory, int wrongMines)
        {
            GameOverInfo info = new GameOverInfo
            {
                DidWin            = isVictory,
                Time              = Timer.Timer,
                MineLeft          = Minesweeper.MinesLeft,
                RightGuessedMines = Settings.GetSettings().CountMines - Minesweeper.MinesLeft - wrongMines,
                WrongGuessedMines = wrongMines,
                AllMines          = Settings.GetSettings().CountMines,
                FlagedMines       = Settings.GetSettings().CountMines - Minesweeper.MinesLeft,
                Restart           = () => { Restart(); Minesweeper.IsEnabled = true; },
                OpenRecords       = NavigateThroughRecords
            };

            NotificationPage notification = new NotificationPage(info);

            _mainGrid.Children.Add(notification);
        }
예제 #9
0
        private void LoadPageFromNotification(NotificationTappedEventArgs e)
        {
            if (string.IsNullOrWhiteSpace(e.Data))
            {
                return;
            }

            var list = ObjectSerializer <List <string> > .DeserializeObject(e.Data);

            //if (list.Count != 2)
            //{
            //    return;
            //}
            if (list[0] != typeof(NotificationPage).FullName)
            {
                return;
            }
            //var tapCount = list[1];

            MainPage = new NotificationPage();
        }
        // GET: NotificationPage

        public ActionResult NotificationPage(string op = "all", string frd = null)
        {
            if (Models.Session.Functions.NoSession())
            {
                return(RedirectToAction("Login", "Authentication"));
            }

            NotificationPage viewModel = new NotificationPage();

            switch (op)
            {
            case "all":
                viewModel.Notifications = DB_Functions.ReadNotifications(Functions.GetID());
                break;

            case "R":
                viewModel.Notifications = DB_Functions.ReadNotifications(Functions.GetID(), DB_Functions.NotificationsType.Received);
                break;

            case "C":
                viewModel.Notifications = DB_Functions.ReadNotifications(Functions.GetID(), DB_Functions.NotificationsType.Closed);
                break;

            case "P":
                viewModel.Notifications = DB_Functions.ReadNotifications(Functions.GetID(), DB_Functions.NotificationsType.Pending);
                break;

            case "A":
                viewModel.Notifications = DB_Functions.ReadNotifications(Functions.GetID(), DB_Functions.NotificationsType.Active);
                break;

            case "FRD":
                viewModel.Notifications = DB_Functions.ReadNotifications(Functions.GetID(), DB_Functions.NotificationsType.FRD, G_Functions.GetIdFromHash(frd));
                break;
            }


            return(View("NotificationPage", viewModel));
        }
예제 #11
0
        void OnBodyMessageReceived(object sender, string msg)
        {
            //body = msg;



            notificationDB.Title = title;
            notificationDB.Body  = msg;


            using (SQLiteConnection conn = new SQLiteConnection(App.FilePath))
            {
                conn.CreateTable <NotificationDB>();
                var notificaitons = conn.Table <NotificationDB>().ToList();
                int rowsAdded     = conn.Insert(notificationDB);
                //notificaitons = conn.Table<NotificationDB>().ToList();
                conn.Close();
                var newPage           = Navigation.NavigationStack.LastOrDefault();
                NotificationPage page = newPage as NotificationPage;
                if (newPage.GetType() == typeof(NotificationPage))
                {
                    NotificationModel tempModel = new NotificationModel();
                    tempModel.Name         = notificationDB.Body;
                    tempModel.IsRead       = false;
                    tempModel.ReceivedTime = DateTime.Now;
                    //tempModel.ReceivedTime = await RelativeDate(DateTime.Now, tempModel.ReceivedTime);
                    page.notificationViewModel.RecentList.Insert(0, tempModel);
                }
            }


            Device.BeginInvokeOnMainThread(() =>
            {
                Console.WriteLine("Notification Recieved");
                //Update Label
                DependencyService.Get <NotificationServices>().CreateNotification(title, msg);
            });
        }
예제 #12
0
        public App()
        {
            InitializeComponent();

            MainPage = new XamarinLatinoPushNotificationsPage();

            //Set OneSignal
            OneSignal.Current.StartInit("37064466-c9ad-4b6e-9e3c-6df406f13777").HandleNotificationOpened(OnHandleNotificationOpened).EndInit();

            MainPage.Appearing += (sender, e) =>
            {
                if (!string.IsNullOrEmpty(MessageFromNotification))
                {
                    var notificationPage = new NotificationPage
                    {
                        BindingContext = MessageFromNotification,
                        Title          = "Notificacion de OneSignal"
                    };
                    var modalPage = new NavigationPage(notificationPage);
                    MainPage.Navigation.PushModalAsync(modalPage);
                    MessageFromNotification = "";
                }
            };
        }
예제 #13
0
        public App()
        {
            InitializeComponent();

            MainPage = new NotificationPage();
        }
예제 #14
0
 NotificationSteps()
 {
     notification = new NotificationPage();
     page         = new Page();
 }