Beispiel #1
0
        public void StartVoting()
        {
            //Scenario: Starting a voting session
            //Given a user creates a temporary account
            var cookie = authentification.Authentication($"{adress}/authentication/anonymous", userName);

            //When the user creates a room
            var room          = new RoomsPage(adress, cookie);
            var gameInfo      = room.CreateRoom("test");
            var gameId        = gameInfo.GameId.ToString();
            var storyCreation = new RoomPage(adress, cookie);
            var story         = storyCreation.CreateStory(gameId, "story");
            var storyDetails  = storyCreation.GetStoryDetails(gameId);
            var startVoting   = storyCreation.StartVoting(gameId);

            //Then the user cand start a voting session
            Assert.NotEqual(startVoting.ToString(), "0");
        }
Beispiel #2
0
        public void DeteleteStory()
        {
            //Scenario: Deleting a story
            //Given a user creates a temporary account
            var cookie = authentification.Authentication($"{adress}/authentication/anonymous", userName);

            //When the user creates a voting session
            var roomsPage     = new RoomsPage(adress, cookie);
            var gameInfo      = roomsPage.CreateRoom("test");
            var storyCreation = new RoomPage(adress, cookie);
            var gameId        = gameInfo.GameId.ToString();
            var story         = storyCreation.CreateStory(gameId, "story");
            var storyDetails  = storyCreation.GetStoryDetails(gameId).Id.ToString();
            var deleteAStory  = storyCreation.DeleteStory(gameId, storyDetails);

            //Then the user can detele a story
            Assert.NotNull(deleteAStory);
        }
Beispiel #3
0
        public void CreateStory()
        {
            //Scenario: Creating a story
            //Given a user creates a username in the application
            var cookie = authentification.Authentication($"{adress}/authentication/anonymous", userName);

            //When the user creates a room
            var roomsPage     = new RoomsPage(adress, cookie);
            var gameInfo      = roomsPage.CreateRoom("test");
            var gameId        = gameInfo.GameId.ToString();
            var storyCreation = new RoomPage(adress, cookie);

            storyCreation.CreateStory(gameInfo.GameId.ToString(), "story");
            var storyDetails = storyCreation.GetStoryDetails(gameId);

            //Then the user can create a story
            Assert.Equal("story", storyDetails.Title);
        }
Beispiel #4
0
        public void CardSelection()
        {
            //Scenario: Card selectio
            //Given a user creates a temporary account
            var cookie = authentification.Authentication($"{adress}/authentication/anonymous", userName);

            //When the user start a voting session
            var room          = new RoomsPage(adress, cookie);
            var gameInfo      = room.CreateRoom("test");
            var gameId        = gameInfo.GameId.ToString();
            var storyCreation = new RoomPage(adress, cookie);
            var story         = storyCreation.CreateStory(gameId, "story");
            var storyDetails  = storyCreation.GetStoryDetails(gameId);
            var startVoting   = storyCreation.StartVoting(gameId);
            var cardSelectio  = storyCreation.CardSelection(gameId, selectedCard);

            //Then the user can select a card
            Assert.NotNull(cardSelectio);
        }
Beispiel #5
0
        public void ChangeStoryName()
        {
            //Scenario: Changeing the story name
            // Given a user creates a temporary account
            var cookie = authentification.Authentication($"{adress}/authentication/anonymous", userName);

            // When the user creates a voting session
            var roomsPage       = new RoomsPage(adress, cookie);
            var gameInfo        = roomsPage.CreateRoom("test");
            var storyCreation   = new RoomPage(adress, cookie);
            var gameId          = gameInfo.GameId.ToString();
            var story           = storyCreation.CreateStory(gameId, "story");
            var storyId         = storyCreation.GetStoryDetails(gameId).Id.ToString();
            var newStoryName    = storyCreation.NewStoryName(storyId, "story3");
            var newStoryDetails = storyCreation.NewStoryDetails(gameId).Title.ToString();

            //Then the user cand change the name
            Assert.Equal("story3", newStoryDetails);
        }
        public void GuestAuthentification()
        {
            //Scenario: Moderator creates a voting session
            //Given a user creates a temporary account with moderator attributions
            var cookie = authentification.Authentication($"{adress}/authentication/anonymous", userName);

            //When the modetarotor starts a voting session
            var room          = new RoomsPage(adress, cookie);
            var gameInfo      = room.CreateRoom("test");
            var gameId        = gameInfo.GameId.ToString();
            var storyCreation = new RoomPage(adress, cookie);
            var story         = storyCreation.CreateStory(gameId, "story");
            var storyDetails  = storyCreation.GetStoryDetails(gameId);
            var startVoting   = storyCreation.StartVoting(gameId);
            var gameCode      = gameInfo.GameCode.ToString();
            var guestCookie   = authentification.Authentication($"{adress}/authentication/anonymous", "Gigel");

            //Then the moderator can start the voting session
            Assert.NotNull(guestCookie);
        }