Ejemplo n.º 1
0
        public void TestInitialize()
        {
            BrowserStateManager.RefreshState();
            HomePageHelper.OpenSandboxPage();
            //HomePageHelper.DeleteAllElementsLocally();
            TourHelper.DeleteToursIfExist("webdriverTour");

            #region create timeline

            _newTimeline = new Timeline
            {
                FromYear = -6061670000,
                ToYear   = -5808809999,
                Title    = "WebDriverApiTitle"
            };
            Guid newTimelineId = ApiHelper.CreateTimelineByApi(_newTimeline);
            _newTimeline.Id = newTimelineId;

            #endregion

            #region create exhibit

            var contentItems = new Collection <ContentItem>();
            var contentItem  = new ContentItem()
            {
                Title = "WebDriverApi", MediaType = "image", Uri = @"http://yandex.st/www/1.609/yaru/i/logo.png", Caption = "", Order = 0, Attribution = "", MediaSource = ""
            };
            contentItems.Add(contentItem);

            _newExhibit = new Exhibit()
            {
                Timeline_ID  = newTimelineId,
                Title        = "WebDriverApiExhibit",
                Year         = -8596430000,
                ContentItems = contentItems
            };
            _newExhibit.Id = new Guid(ApiHelper.CreateExhibitByApi(_newExhibit).ExhibitId);

            #endregion

            #region init new tour

            _newTour             = new Tour();
            _newTour.Name        = "webdriverTour";
            _newTour.Description = "webdriver description";
            Bookmark exhibitBookmark = new Bookmark {
                Name = "WebDriverApiExhibitBookmark", Id = _newExhibit.Id, Type = "exhibit"
            };
            Bookmark timelineBookmark = new Bookmark {
                Name = "WebDriverApiTimelineBookmark", Id = _newTimeline.Id, Type = "timeline"
            };
            Collection <Chronozoom.Entities.Bookmark> bookmarks = new Collection <Chronozoom.Entities.Bookmark> {
                exhibitBookmark, timelineBookmark
            };
            _newTour.Bookmarks = bookmarks;

            #endregion

            HomePageHelper.OpenSandboxPage();
        }
Ejemplo n.º 2
0
 public static void ClassInitialize(TestContext testContext)
 {
     BrowserStateManager.RefreshState();
     HomePageHelper.OpenSandboxPage();
     HomePageHelper.DeleteAllElementsLocally();
     ExhibitHelper.AddExhibitWithContentItem(Exhibit);
     _newExhibit = ExhibitHelper.GetNewExhibit();
 }
Ejemplo n.º 3
0
        public static void ClassInitialize(TestContext testContext)
        {
            BrowserStateManager.RefreshState();
            HomePageHelper.OpenSandboxPage();

            _timeline = new Timeline {
                Title = RandomString.GetRandomString(1, 200, isUsingSpecChars: true)
            };
            HomePageHelper.DeleteAllElementsLocally();
            TimelineHelper.AddTimeline(_timeline);
            _newTimeline = TimelineHelper.GetLastTimeline();
        }
Ejemplo n.º 4
0
        public static void ClassInitialize(TestContext testContext)
        {
            BrowserStateManager.RefreshState();
            HomePageHelper.OpenSandboxPage();

            _timeline = new Timeline {
                Title = "WebdriverTitle"
            };
            HomePageHelper.DeleteAllElementsLocally();
            TimelineHelper.AddTimeline(_timeline);
            _newTimeline = TimelineHelper.GetLastTimeline();
        }
Ejemplo n.º 5
0
        public void exhibit_should_display_correct_date_december_in_bce()
        {
            var contentItemPdf = new ContentItem
            {
                Title       = RandomString.GetRandomString(1, 200),
                Caption     = RandomString.GetRandomString(1, 200),
                MediaSource = RandomUrl.GetRandomWebUrl(),
                MediaType   = "image",
                Attribution = RandomString.GetRandomString(1, 200),
                Uri         = RandomUrl.GetRandomImageUrl(),
                Order       = 0
            };
            const decimal year = -2015;

            _newExhibit = new Exhibit
            {
                Title        = RandomString.GetRandomString(1, 200),
                ContentItems = new Collection <ContentItem> {
                    contentItemPdf
                },

                Month       = "December",
                Day         = "31",
                Year        = ExhibitHelper.GetCoordinateFromYmd(year, 12, 31),
                Timeline_ID = new Guid("bdc1ceff-76f8-4df4-ba72-96b353991314")
            };
            ApiHelper.CreateExhibitByApi(_newExhibit);
            HomePageHelper.OpenSandboxPage();
            ExhibitHelper.NavigateToExhibit(_newExhibit);
            string displayDate = ExhibitHelper.GetExhibitDisplayDate(_newExhibit);

            StringAssert.Contains(displayDate, "BCE");
            StringAssert.Contains(displayDate, year.ToString(CultureInfo.InvariantCulture));
            StringAssert.Contains(displayDate, _newExhibit.Day);
            if (GitHubIssueWatcher.IssueStatus.IsIssueResolved("1024"))
            {
                StringAssert.Contains(displayDate, DateTime.ParseExact(_newExhibit.Month, "MMMM", CultureInfo.InvariantCulture).Month.ToString(CultureInfo.InvariantCulture));
            }
        }
Ejemplo n.º 6
0
        public void TestInitialize()
        {
            BrowserStateManager.RefreshState();
            #region create exhibit

            var contentItems = new Collection <ContentItem>();
            var contentItem  = new ContentItem {
                Title = "WebDriverApi", MediaType = "image", Uri = @"http://yandex.st/www/1.609/yaru/i/logo.png", Caption = "", Order = 0, Attribution = "AttributionApI", MediaSource = "https://trello.com/board/development/510a91105420848638003cda"
            };
            contentItems.Add(contentItem);

            _newExhibit = new Exhibit
            {
                Timeline_ID  = new Guid("bdc1ceff-76f8-4df4-ba72-96b353991314"),
                Title        = "WebDriverApiExhibitAlexey",
                Year         = -8596430000,
                ContentItems = contentItems
            };
            _newExhibit.Id = new Guid(ApiHelper.CreateExhibitByApi(_newExhibit).ExhibitId);

            #endregion
            HomePageHelper.OpenSandboxPage();
        }
Ejemplo n.º 7
0
 public void TestInitialize()
 {
     BrowserStateManager.RefreshState();
     HomePageHelper.OpenSandboxPage();
     HomePageHelper.DeleteAllElementsLocally();
 }