Ejemplo n.º 1
0
        public void Can_create_and_view_player()
        {
            // create a player
            var playerData = TestDataGenerator.CreateValidPlayerDataForAdminWebsite(DefaultLicensee, DefaultBrand, currency: "RMB", country: "US");

            var newPlayerForm = _playerManagerPage.OpenNewPlayerForm();
            var submittedForm = newPlayerForm.Register(playerData);

            Assert.AreEqual("The player has been successfully created", submittedForm.ConfirmationMessage);
            submittedForm.CloseTab("View Player");
            //check a player
            var playerInfoPage = _playerManagerPage.OpenPlayerInfoPage(playerData.LoginName);

            playerInfoPage.OpenAccountInformationSection();
            var playerAccountInfo = playerInfoPage.GetAccountDetails();


            Assert.AreEqual(playerData.LoginName, playerAccountInfo.Username);
            Assert.AreEqual(playerData.FirstName, playerAccountInfo.FirstName);
            Assert.AreEqual(playerData.LastName, playerAccountInfo.LastName);
            Assert.AreEqual(playerData.Title, playerAccountInfo.Title);
            Assert.AreEqual(playerData.Gender, playerAccountInfo.Gender);
            Assert.AreEqual(playerData.Email, playerAccountInfo.EmailAddress);
            Assert.AreEqual(playerData.MobileNumber, playerAccountInfo.MobileNumber);
            Assert.AreEqual(playerData.Address, playerAccountInfo.AddressLine1);
            Assert.AreEqual(playerData.City, playerAccountInfo.City);
            Assert.AreEqual(playerData.ZipCode, playerAccountInfo.PostalCode);
            Assert.AreEqual("United States", playerAccountInfo.Country);
            Assert.AreEqual("RMBLevel", playerAccountInfo.PaymentLevel);
            Assert.AreEqual(playerData.ContactPreference, playerAccountInfo.PrimaryContact);
            Assert.AreEqual("Email, Sms", playerAccountInfo.AccountAlerts);
            Assert.AreEqual("Email, Sms, Phone", playerAccountInfo.MarketingAlerts);
        }