Skip to content

Commit

Permalink
Merge develop (v9.1 - UCI) to FormJS
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelRodriguez8008 committed Oct 9, 2019
2 parents b5ade63 + 7252ee7 commit 9099219
Show file tree
Hide file tree
Showing 144 changed files with 17,718 additions and 1,432 deletions.
67 changes: 67 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
name: Bug report
about: Create an issue to report a problem
title: "[BUG] <Issue Description>"
labels: bug
assignees: ''

---

## Bug Report

### Issues should only be created for items related to [covered functionality](https://github.com/microsoft/EasyRepro#crm-functionality-covered).

### [Not covered](https://github.com/microsoft/EasyRepro#crm-functionality-not-covered) functionality, feature requests, and questions should use the Feature Request or Question templates.


**EasyRepro Version**
- [ ] Microsoft Dynamics 365 Online Version 8.2 (8.2.x) (DB 8.2.x) online
- [ ] Microsoft Dynamics 365 Online Version 9.0 (9.0.x) (DB 9.0.x) online
- [ ] Microsoft Dynamics 365 Online Version 9.0.2 (9.0.2) (DB 9.0.2) online
- [ ] Microsoft Dynamics 365 Online Version 9.1 (9.1.x) (DB 9.1.x) online

**UCI or Classic Web**
- [ ] UCI (XrmApp)
- [ ] Classic Web (XrmBrowser)

**Online or On Premise**
- [ ] Online
- [ ] On Premise

**Browser**
- [ ] Chrome
- [ ] Firefox
- [ ] IE
- [ ] Edge

**Describe the bug**
<!-- A clear and concise description of what the bug is. -->

**Special formatting / display**
<!-- Does the control have any formatting applied to it (e.g. editable grid or two option displayed as a checkbox), is it in the header/footer, etc.? -->

**Code to reproduce**
<!-- Minimum code to reproduce the behavior -->
<!-- Please enclose in a code block
```csharp
xrmApp.OnlineLogin.Login(_xrmUri, _username, _password);
xrmApp.Navigation.OpenApp(UCIAppName.Sales);
xrmApp.Navigation.QuickCreate("contact");
xrmApp.QuickCreate.SetValue(new LookupItem() { Name = "parentcustomerid", Value = "Test" });
xrmApp.QuickCreate.Save();
```
-->

**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->

**Screenshots**
<!-- You are encouraged to add screenshots to help diagnose your problem. -->

**Additional context**
<!-- Add any other context about the issue or things you've already tried here. -->
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Feature Request
about: Suggest new functionality for this project
title: "[FEATURE] <Feature description>"
labels: enhancement
assignees: ''

---

**Describe the feature**
<!-- A clear and concise description of the desired functionality. -->

**Explain why this feature is needed**
<!-- A clear and concise explanation of why the feature should be added to the project. -->

**Additional context**
<!-- Add any other context or screenshots about the feature request here. -->
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: Question
about: Ask A Question
title: "[HOW-TO] <Short Question Description>"
labels: question
assignees: ''

---

## Question

**What is your question?**
27 changes: 27 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
### Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Other (updates to documentation, formatting, etc.)

### Description
<!--- Describe your changes -->

### Issues addressed
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->

### All submissions:

- [ ] My code follows the code style of this project.
- [ ] Do existing samples that are effected by this change still run?
- [ ] I have added samples for new functionality.
- [ ] I raise detailed error messages when possible.
- [ ] My code does not rely on labels that have the option to be hidden.

### Which browsers was this tested on?
<!--- Should be tested on Chrome, Firefox, and IE. -->
- [ ] Chrome
- [ ] Firefox
- [ ] IE
- [ ] Edge
14 changes: 14 additions & 0 deletions Microsoft.Dynamics365.UIAutomation.Api.UCI/Controls/BooleanItem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.

namespace Microsoft.Dynamics365.UIAutomation.Api.UCI
{
/// <summary>
/// Represents a Boolean Item in Dynamics 365.
/// </summary>
public class BooleanItem
{
public string Name { get; set; }
public bool Value { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
using System.Collections.Generic;

namespace Microsoft.Dynamics365.UIAutomation.Api.UCI
{
public class CompositeControl
{
public string Id { get; set; }
public string Name { get; set; }
public List<Field> Fields { get; set; }
}
}
67 changes: 67 additions & 0 deletions Microsoft.Dynamics365.UIAutomation.Api.UCI/Controls/CrmControls.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.

using System.Collections.Generic;

namespace Microsoft.Dynamics365.UIAutomation.Api
{
public class CompositeControl
{
public string Id { get; set; }
public string Name { get; set; }
public List<Field> Fields { get; set; }
}

/// <summary>
/// Represents an individual field on a Dynamics 365 Customer Experience web form.
/// </summary>
public class Field
{
/// <summary>
/// Gets or sets the identifier of the field.
/// </summary>
/// <value>
/// The identifier.
/// </value>
public string Id { get; set; }

/// <summary>
/// Gets or sets the name of the field.
/// </summary>
/// <value>
/// The name.
/// </value>
public string Name { get; set; }

/// <summary>
/// Gets or sets the value of the field.
/// </summary>
/// <value>
/// The value.
/// </value>
public string Value { get; set; }
}

/// <summary>
/// Represents an Option Set in Dynamics 365.
/// </summary>
public class OptionSet
{
public string Name { get; set; }
public string Value { get; set; }
}

public class MultiValueOptionSet
{
public string Name { get; set; }
public string[] Values { get; set; }
}

public class Lookup
{
public string Name { get; set; }
public string Value { get; set; }
public int Index { get; set; }
}

}
89 changes: 89 additions & 0 deletions Microsoft.Dynamics365.UIAutomation.Api.UCI/Controls/Field.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.

using OpenQA.Selenium;
using Microsoft.Dynamics365.UIAutomation.Browser;

namespace Microsoft.Dynamics365.UIAutomation.Api.UCI
{
/// <summary>
/// Represents an individual field on a Dynamics 365 Customer Experience web form.
/// </summary>
public class Field
{
//Constructors
public Field(IWebElement containerElement)
{
this.containerElement = containerElement;
}

public Field()
{

}


internal IWebElement _inputElement { get; set; }

//Element that contains the container for the field on the form
internal IWebElement containerElement { get; set; }

public void Click()
{
_inputElement.Click(true);
}

/// <summary>
/// Gets or sets the identifier of the field.
/// </summary>
/// <value>
/// The identifier.
/// </value>
public string Id { get; set; }

/// <summary>
/// Gets or sets the name of the field.
/// </summary>
/// <value>
/// The name.
/// </value>
public string Name { get; set; }

/// <summary>
/// Returns if the field is read only.
/// </summary>
public bool IsReadOnly
{
get
{
if (containerElement.HasElement(By.XPath(AppElements.Xpath[AppReference.Field.ReadOnly])))
{
var readOnly = containerElement.FindElement(By.XPath(AppElements.Xpath[AppReference.Field.ReadOnly]));

if(readOnly.HasAttribute("readonly"))
return true;
}

return false;
}
}

/// <summary>
/// Returns if the field is visible.
/// </summary>
public bool IsVisible {
get
{
return containerElement.Displayed;
}
}

/// <summary>
/// Gets or sets the value of the field.
/// </summary>
/// <value>
/// The value.
/// </value>
public string Value { get; set; }
}
}
12 changes: 12 additions & 0 deletions Microsoft.Dynamics365.UIAutomation.Api.UCI/Controls/LookupItem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.

namespace Microsoft.Dynamics365.UIAutomation.Api.UCI
{
public class LookupItem
{
public string Name { get; set; }
public string Value { get; set; }
public int Index { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.

namespace Microsoft.Dynamics365.UIAutomation.Api.UCI
{
public class MultiValueOptionSet
{
public string Name { get; set; }
public string[] Values { get; set; }
}
}
14 changes: 14 additions & 0 deletions Microsoft.Dynamics365.UIAutomation.Api.UCI/Controls/OptionSet.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.

namespace Microsoft.Dynamics365.UIAutomation.Api.UCI
{
/// <summary>
/// Represents an Option Set in Dynamics 365.
/// </summary>
public class OptionSet
{
public string Name { get; set; }
public string Value { get; set; }
}
}
Loading

0 comments on commit 9099219

Please sign in to comment.