Drapo is a spa framework. Spa Drapo
-
Pre-requisites
nodejs and npm https://nodejs.org/en/
Typescript npm install -g typescript
-
API references
Name | Description |
---|---|
d-parent | Defines the default parent for this partial page |
d-parentSector | Defines the default sector of the parent that this child must fit |
d-child | Defines the default child for a sector |
d-childSector | Defines a default child sector |
Name | Description |
---|---|
d-dataKey | Defines the data key |
d-dataUrl | Defines the url of the data |
Name | Description |
---|---|
d-for | for |
d-if | if |
-
Pages Folder: contains the respective pages from DrapoPages, with the expected evaluated HTML
-
ReleaseTest Class: initializes the WebDriver used to navigate through pages, defines all Test Cases and validation methods
-
Test.runsettings File: keeps all settings used at runtime, including the URL for a published WebDrapo
For each page added to DrapoPages, a Test Case must be created following these steps:
-
Run without debugging WebDrapo and check if the portal name and port match the URL in
Test.Debug.runsettings
file -
Select the above file as Test Settings on Visual Studio Test Menu
-
Add a new HTML file at
Pages
folder with this naming format: DrapoPageName.Test.html and configure it to be a Embedded Resource -
Create a method at
ReleaseTest.cs
named DrapoPageNameTest withTestCase
attribute and a call toValidatePage
passing DrapoPageName -
Run in debug the created test and after
Driver
navigation, copy the content ofPageSource
and paste it to the added HTML file without formatting -
Save the file, run the test again and confirm it passes