private void AlbumCard_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
 {
     if ((sender as FrameworkElement).DataContext is TeamAlbum teamAlbum)
     {
         var album = new AlbumPage(TeamId, teamAlbum.AlbumId, TeamName, teamAlbum.AlbumName, Http.Album.AlbumType.TEAM);
         AlbumDetailContainer.Content = album;
     }
 }
 private Album DomToAlbum(AlbumPage albumPage, Genre category)
 {
     return(new Album
     {
         PublicDate = albumPage.ReleaseDate,
         Genre = category,
         Name = albumPage.Title,
         Songs = DomsToSongs(albumPage.SongRows)
     });
 }
Beispiel #3
0
 public PageObjectManager()
 {
     LoginPage       = new LoginPage();
     HomePage        = new HomePage();
     AlbumPage       = new AlbumPage();
     ArtistPage      = new ArtistPage();
     PlaylistPage    = new PlaylistPage();
     QueuePage       = new QueuePage();
     SearchPage      = new SearchPage();
     YourLibraryPage = new YourLibraryPage();
 }
Beispiel #4
0
        private void InitApp()
        {
            mediator      = Mediator.Instance;
            _audioPlayer  = DependencyService.Get <IAudioPlayerService>();
            _media        = DependencyService.Get <IMediaService>();
            playingPage   = new Playing();
            songsPage     = new Songs();
            albumPage     = new AlbumPage();
            equalizerPage = new Equalizers();
            EqualizerViewModel evm = new EqualizerViewModel(mediator);

            mediator.Equalizer           = evm;
            mediator.PlayingPage         = playingPage;
            equalizerPage.BindingContext = evm;
            _seekerUpdatesPlayer         = true;
            AlbumArt  = ImageSource.FromFile(FileImages.NoAlbum);
            SliderMax = 100;
            _audioPlayer.OnFinishedPlaying = () => { Shuffle(1); };
            LoadCommands();
        }
Beispiel #5
0
        internal void HandleContinuation(IContinuationActivatedEventArgs continuationEventArgs)
        {
            if (mainNavigationFrame != null && mainNavigationFrame.Content is AlbumPage)
            {
                if (continuationEventArgs is FileOpenPickerContinuationEventArgs)
                {
                    AlbumPage currentAlbumPage = DebugHelper.CastAndAssert <AlbumPage>(mainNavigationFrame.Content);
                    FileOpenPickerContinuationEventArgs filePickerOpenArgs = DebugHelper.CastAndAssert <FileOpenPickerContinuationEventArgs>(continuationEventArgs);

                    currentAlbumPage.HandleFilePickerLaunch(filePickerOpenArgs);
                }
            }
            else if (mainNavigationFrame != null && mainNavigationFrame.Content is ManageLibrary)
            {
                if (continuationEventArgs is FileOpenPickerContinuationEventArgs)
                {
                    FileOpenPickerContinuationEventArgs filePickerOpenArgs = DebugHelper.CastAndAssert <FileOpenPickerContinuationEventArgs>(continuationEventArgs);

                    if (filePickerOpenArgs.Files.Count > 0)
                    {
                        DebugHelper.Assert(new CallerInfo(), filePickerOpenArgs.Files.Count == 1);

                        IStorageFile pickedFile = filePickerOpenArgs.Files[0];

                        MediaImportManager.Current.HandleFilePickerLaunch(pickedFile);
                    }
                }
                else if (continuationEventArgs is FolderPickerContinuationEventArgs)
                {
                    FolderPickerContinuationEventArgs folderOpenArgs = DebugHelper.CastAndAssert <FolderPickerContinuationEventArgs>(continuationEventArgs);

                    if (folderOpenArgs.Folder != null)
                    {
                        MediaImportManager.Current.HandleSyncFolderLaunch(folderOpenArgs.Folder);
                    }
                }
            }
        }
Beispiel #6
0
        public App()
        {
            InitializeComponent();

            MainPage = new AlbumPage();
        }
Beispiel #7
0
        public void CompletePurchaseTest()
        {
            var homePageInstance = HomePage.NavigateTo(this.Driver);

            Thread.Sleep(3000);


            Assert.IsFalse(homePageInstance.IsCartVisible(), "Is cart visible");

            var albumList = homePageInstance.GetAlbums2();

            Assert.IsTrue(albumList.Count > 0);

            albumList.First().Click();

            Thread.Sleep(3000);

            var albumPageInstance = AlbumPage.NavigateTo(this.Driver);

            albumPageInstance.AddToCartButton.Click();


            Thread.Sleep(3000);

            Assert.IsTrue(homePageInstance.IsCartVisible(), "Is cart visible");


            var carPageInstance = CartPage.NavigateTo(this.Driver);

            Thread.Sleep(3000);

            carPageInstance.CheckOutButton.Click();

            Thread.Sleep(3000);

            var orderPageInstance = OrderPage.NavigateTo(this.Driver);

            orderPageInstance.FirstName.SendKeys("sdfdsf");

            orderPageInstance.LastName.SendKeys("sdfdsf");

            orderPageInstance.City.SendKeys("sdfdsf");
            orderPageInstance.Country.SendKeys("sdfdsf");
            orderPageInstance.Phone.SendKeys("sdfdsf");
            orderPageInstance.Address.SendKeys("sdfdsf");
            orderPageInstance.State.SendKeys("sdfdsf");

            orderPageInstance.PostalCode.SendKeys("sdfdsf");

            orderPageInstance.Email.SendKeys("*****@*****.**");

            orderPageInstance.PromoCode.SendKeys("FREE");


            orderPageInstance.ButtonSubmit.Click();

            Thread.Sleep(3000);

            Assert.IsTrue(this.Driver.Url.Contains("http://qaf2017demo1-001-site1.dtempurl.com/Checkout/Complete/"));

            Thread.Sleep(3000);
        }
 private Album DomToAlbum(AlbumPage albumPage, Genre category)
 {
     return new Album
     {
         PublicDate = albumPage.ReleaseDate,
         Genre = category,
         Name = albumPage.Title,
         Songs=DomsToSongs(albumPage.SongRows)
     };
 }