1010
1111namespace Applitools . Example . Tests ;
1212
13+ /// <summary>
14+ /// Tests for the ACME Bank demo app.
15+ /// </summary>
1316public class AcmeBankTest
1417{
1518 // Test control inputs to read once and share for all tests
@@ -25,13 +28,14 @@ public class AcmeBankTest
2528 private WebDriver Driver ;
2629 private Eyes Eyes ;
2730
31+ /// <summary>
32+ /// Sets up the configuration for running visual tests in the Ultrafast Grid.
33+ /// The configuration is shared by all tests in a test suite, so it belongs in a `OneTimeSetUp` method.
34+ /// If you have more than one test class, then you should abstract this configuration to avoid duplication.
35+ /// <summary>
2836 [ OneTimeSetUp ]
2937 public static void SetUpConfigAndRunner ( )
3038 {
31- // This method sets up the configuration for running visual tests in the Ultrafast Grid.
32- // The configuration is shared by all tests in a test suite, so it belongs in a `OneTimeSetUp` method.
33- // If you have more than one test class, then you should abstract this configuration to avoid duplication.
34-
3539 // Read the Applitools API key from an environment variable.
3640 ApplitoolsApiKey = Environment . GetEnvironmentVariable ( "APPLITOOLS_API_KEY" ) ;
3741
@@ -73,11 +77,12 @@ public static void SetUpConfigAndRunner()
7377 Config . AddDeviceEmulation ( DeviceName . Nexus_10 , ScreenOrientation . Landscape ) ;
7478 }
7579
80+ /// <summary>
81+ /// Sets up each test with its own ChromeDriver and Applitools Eyes objects.
82+ /// <summary>
7683 [ SetUp ]
7784 public void OpenBrowserAndEyes ( )
7885 {
79- // This method sets up each test with its own ChromeDriver and Applitools Eyes objects.
80-
8186 // Open the browser with the ChromeDriver instance.
8287 // Even though this test will run visual checkpoints on different browsers in the Ultrafast Grid,
8388 // it still needs to run the test one time locally to capture snapshots.
@@ -106,15 +111,16 @@ public void OpenBrowserAndEyes()
106111 new Size ( 1024 , 768 ) ) ; // The viewport size for the local browser
107112 }
108113
114+ /// <summary>
115+ /// This test covers login for the Applitools demo site, which is a dummy banking app.
116+ /// The interactions use typical Selenium WebDriver calls,
117+ /// but the verifications use one-line snapshot calls with Applitools Eyes.
118+ /// If the page ever changes, then Applitools will detect the changes and highlight them in the dashboard.
119+ /// Traditional assertions that scrape the page for text values are not needed here.
120+ /// <summary>
109121 [ Test ]
110122 public void LogIntoBankAccount ( )
111123 {
112- // This test covers login for the Applitools demo site, which is a dummy banking app.
113- // The interactions use typical Selenium WebDriver calls,
114- // but the verifications use one-line snapshot calls with Applitools Eyes.
115- // If the page ever changes, then Applitools will detect the changes and highlight them in the dashboard.
116- // Traditional assertions that scrape the page for text values are not needed here.
117-
118124 // Load the login page.
119125 Driver . Navigate ( ) . GoToUrl ( "https://demo.applitools.com" ) ;
120126
@@ -131,6 +137,9 @@ public void LogIntoBankAccount()
131137 Eyes . Check ( Target . Window ( ) . Fully ( ) . WithName ( "Main page" ) . Layout ( ) ) ;
132138 }
133139
140+ /// <summary>
141+ /// Concludes the test by quitting the browser and closing Eyes.
142+ /// <summary>
134143 [ TearDown ]
135144 public void CleanUpTest ( ) {
136145
@@ -148,6 +157,9 @@ public void CleanUpTest() {
148157 // If any checkpoints are unresolved or failed, then `eyes.close()` will make the NUnit test fail.
149158 }
150159
160+ /// <summary>
161+ /// Prints the final summary report for the test suite.
162+ /// <summary>
151163 [ OneTimeTearDown ]
152164 public static void PrintResults ( ) {
153165
0 commit comments