Esempio n. 1
0
        public void EditDescriptionnValidate()
        {
            //Read data from Excel file
            ExcelLib.PopulateInCollection(ExcelPath, "Profile->Description");
            string description = ExcelLib.ReadData(2, "Description");

            //Edit Description
            var descriptionObj = new ProfileDescription();

            descriptionObj.EditDescription(description);

            //Validate message

            //Validate the message
            string expectedMsg = "Description has been saved successfully";
            string actualMsg   = Driver.FindElement(By.XPath("/html/body/div/div[@class='ns-box-inner']")).Text;

            Assert.AreEqual(expectedMsg, actualMsg, "Getting expected message failed");

            //Validate if the Description display correctly
            try
            {
                IWebElement des = Driver.FindElement(By.XPath("//span[text()='" + description + "']"));
                Assert.IsTrue(des.Displayed, "Description display failed");
            }
            catch (Exception e)
            {
                System.Console.WriteLine(e.Message);
                test.Log(LogStatus.Fail, "Test ended with fail" + e.Message);
            }
        }
Esempio n. 2
0
        public override void GetTagData(byte[] iccData, int index, ICCHeader header)
        {
            DescriptionCount = (int)HighEndianReader.GetUint32(iccData, index);
            //Profile description structures
            Descriptions = new ProfileDescription[DescriptionCount];
            int end = index + 4;

            for (int i = 0; i < DescriptionCount; i++)
            {
                Descriptions[i] = new ProfileDescription(iccData, end, header); end = Descriptions[i].end;
            }
        }
Esempio n. 3
0
        public ProfileViewModel(ProfileDescription profile)
        {
            ProfileDescription = profile;
            Profile            = (Profile)profile.getProfile().get();
            Installed          = profile.isInstalled() && Profile.isEnabled();
            IsEnabled          = !(Profile.isBundled() || Utils.ConvertFromJavaList <Host>(BookmarkCollection.defaultCollection()).Any(x => x.getProtocol().Equals(Profile)));

            OpenHelp = ReactiveCommand.Create(() =>
            {
                BrowserLauncherFactory.get().open(ProviderHelpServiceFactory.get().help(Profile));
            });
        }
Esempio n. 4
0
        private void SetUpViewPager(ViewPager viewPager)
        {
            TabAdapter adapter = new TabAdapter(SupportFragmentManager);

            mProfileDescription = new ProfileDescription();
            mProfileAccounts    = new ProfileAccounts();
            mProfileFriends     = new ProfileFriends();
            adapter.AddFragment(mProfileDescription, GetString(Resource.String.tab_description));
            adapter.AddFragment(mProfileAccounts, GetString(Resource.String.tab_accounts));
            adapter.AddFragment(mProfileFriends, GetString(Resource.String.tab_friends));

            viewPager.Adapter = adapter;
        }
Esempio n. 5
0
        public void GivenIEditDescriptionOnProfilePageAndClickSave()
        {
            //Read data from Excel file
            ExcelLib.PopulateInCollection(ExcelPath, "Profile->Description");
            var description = ExcelLib.ReadData(2, "Description");

            _scenarioContext["description"] = description;

            //Edit Description
            var descriptionObj = new ProfileDescription();

            descriptionObj.EditDescription(description);
        }
        private void CreateUserPanel(ProfileDescription p)
        {
            var obj   = (Instantiate(userButtonPrefab) as GameObject).GetComponent <UserListButton>();
            var scale = obj.transform.localScale;

            obj.SetForProfile(p);
            obj.transform.SetParent(listObject.transform);
            obj.transform.localScale = Vector3.one;
            currentButtons.Add(p, obj);
            var sButton = obj.GetComponent <SelectableButton>();

            contentSelector.AddContent(sButton);
            sButton.ElementName = p.userName;
        }
        public ProfileDescriptionControl(ProfileDescription data)
            : this()
        {
            DeviceManufacturerLabel.Text    = data.DeviceManufacturer.ToString();
            DeviceModelLabel.Text           = data.DeviceModel.ToString();
            TechnologyInformationLabel.Text = data.TechnologyInformation.ToString();
            OpacityLabel.Text      = data.DeviceAttributes.Opacity.ToString();
            ReflectivityLabel.Text = data.DeviceAttributes.Reflectivity.ToString();
            PolarityLabel.Text     = data.DeviceAttributes.Polarity.ToString();
            ChromaLabel.Text       = data.DeviceAttributes.Chroma.ToString();
            VendorDataLabel.Text   = Conversion.FromBytesShort(data.DeviceAttributes.VendorData, true);

            DeviceManufacturerInfoPanel = new LocalizedStringControl(data.DeviceManufacturerInfo);
            DeviceModelInfoPanel        = new LocalizedStringControl(data.DeviceModelInfo);
        }
        public void EditDescriptionnValidate()
        {
            //Read data from Excel file
            ExcelLib.PopulateInCollection(ExcelPath, "Profile->Description");
            string description = ExcelLib.ReadData(2, "Description");

            //Edit Description
            var descriptionObj = new ProfileDescription();

            descriptionObj.EditDescription(description);

            //Validate the message
            string expectedMsg = "Description has been saved successfully";
            string actualMsg   = Driver.FindElement(By.XPath("/html/body/div/div[@class='ns-box-inner']")).Text;

            Assert.AreEqual(expectedMsg, actualMsg, "Getting expected message failed");

            //Validate if the Description display correctly
            string actualDes = Driver.FindElement(By.XPath("//span[contains(@style,'padding-top: 1em;')]")).Text;

            Assert.AreEqual(description, actualDes, "Description display failed");
        }
Esempio n. 9
0
 public DescribedProfile(ProfileDescription description)
 {
     Description = description;
     Profile     = (Profile)description.getProfile().get();
 }
 public void SetForProfile(ProfileDescription profile)
 {
     this.Profile = profile;
     userName.SetText(profile.userName);
     gameObject.SetActive(true);
 }