Grant-Archibald-MS / PowerApps-TestEngine

MIT License
0 stars 0 forks source link

[PowerApps-TestEngine - Feature]: Expand the PowerApps Test Engine to a provider model for testing different browser based applications #2

Open Grant-Archibald-MS opened 2 months ago

Grant-Archibald-MS commented 2 months ago

Is your feature request related to a problem? Please describe.

Today the Power Apps Test Engine only supports Power Apps canvas applications. Provide a means of creating an extensible provider model that allows other Power Platform resources to be tested. This should include Model Driven Applications (MDA) and Custom Pages.

Describe the solution you'd like

Create the following MEF Contracts

  1. Create new IBrowserTestProvider that provide the ability to
    • Set the Power FX state
    • Update provider state following changes to Power FX state
  2. Extract the current Power Apps Power FX integration into a MEF plugin
  3. Consider new MEF plugins for MDA and Custom Pages

Describe alternatives you've considered

No response

Additional context?

Ensure that the MEF plugins make use of JavaScript Object Model interaction where possible so that they continue to adapt even of different Document Object Model rendering is used

Grant-Archibald-MS commented 2 months ago

Key changes to consider:

  1. Today main code in IPowerAppFunctions

  2. Consider making this interface more generic. For example IWebTestProvider with the following

    Properties

    • Name (string)

    Methods:

    • GenerateTestUrl(domin, queryParams) -> string
    • CheckIsIdleAsync()
    • LoadObjectModelAsync()
    • IsReadyAsync()
    • GetItemCount(ItemPath)
    • GetPropertyValue(ItemPath)
    • SelectItem(ItemPath)
    • SetPropertyValue(IitemPath, value)
  3. Determine which code can be moved from existing Microsoft.PowerApps.TestEngine.PowerApps namespace to a new MEF plugin testengine.provider.canvas.dll

Grant-Archibald-MS commented 1 month ago

Updated the MEF extensions to include provider model

Documentation in Extensions