//Testrail panel options private void Testrail_CheckedChanged(object sender, EventArgs e) { string[] d; string auth, b; if (Testrail.Checked) { //unchecks jira filter panel JiraFilter.Checked = false; //sets the background color TestrailPanel.BackColor = Color.MintCream; b = AllTheShinies.GetProjects(masterObject.testrailLogin, masterObject.pass); // gets the projects from testrail to populate the drop down list //work the response to display correctly d = b.Split('\n').Distinct().ToArray(); List <string> items = new List <string>(); for (int i = 0; i < d.Length - 1; i++) { items.Add(d[i]); // set data source } TProj.DataSource = items; GetRun.Enabled = true; GetPlansB.Enabled = true; } else { TProj.DataSource = null; GetPlansB.Enabled = false; GetRun.Enabled = false; List <string> sorting_options = new List <string>(); } }
public void SuccesfulLogin() { string user = "******"; string pass = "******"; string auth = Convert.ToBase64String(ASCIIEncoding.ASCII.GetBytes(user + ":" + pass)); var sut = new AllTheShinies(); Assert.That(sut.JRvalid(user).IsSuccessStatusCode); }
public void FailedRetrieveCustomId() { string user = "******"; string pass = "******"; string jiraInstance = "da"; string auth = Convert.ToBase64String(ASCIIEncoding.ASCII.GetBytes(user + ":" + pass)); var sut = new AllTheShinies(); Assert.That(sut.GetUbiPrioId(jiraInstance, auth), Contains.Substring("n/a").IgnoreCase); }
public MainContainer() { masterObject = new AllTheShinies(); masterObject.LoginPreparations(); string name = masterObject.givenName; InitializeComponent(); TestrailPanel.Hide(); JiraPanel.Hide(); LoginPanel.Show(); GenRep.Show(); GenRepPlan.Hide(); GenRepJira.Enabled = false; TestplanList.Hide(); ReadtheJira.Enabled = false; userBox.Text = "Welcome " + name; }
//Behavior after clicking t private void GetRun_Click(object sender, EventArgs e) { //clean the list for the runs id _runsId.Clear(); string[] d; //testrail name string testrailProj = TProj.SelectedItem.ToString().Substring(0, 3).TrimEnd(' '); //string of runs returned string testrailId = AllTheShinies.GetRuns(testrailProj, masterObject.testrailLogin, masterObject.pass); //making sure there is no space testrailId = testrailId.Trim(' '); //splitting the string to an array d = testrailId.Split('\n').Distinct().ToArray(); List <string> items = new List <string>(); // for (int i = 0; i < d.Length - 1; i++) { items.Add(d[i]); } RunsList.DataSource = items; }