From 8f23394b8620b2e82c501a7a2fdeb3f40136e93d Mon Sep 17 00:00:00 2001 From: Vladimir Semenovich Date: Tue, 9 Aug 2022 13:46:23 +0300 Subject: [PATCH] feat: changes to blazor app to add more elements for checking feat: update chromedriver version refactor: remove redundant usings --- ...Behavioral.Automation.DemoScenarios.csproj | 2 +- src/BlazorApp/Pages/Counter.razor | 13 +++++-- src/BlazorApp/Pages/FetchData.razor | 27 ++++++++------- src/BlazorApp/Pages/Greetings.razor | 34 +++++++++++++++++++ src/BlazorApp/Pages/Index.razor | 23 +++++++++---- src/BlazorApp/Program.cs | 5 --- src/BlazorApp/Shared/NavMenu.razor | 13 ++++--- 7 files changed, 84 insertions(+), 33 deletions(-) create mode 100644 src/BlazorApp/Pages/Greetings.razor diff --git a/Behavioral.Automation.Selenium/Behavioral.Automation.DemoScenarios/Behavioral.Automation.DemoScenarios.csproj b/Behavioral.Automation.Selenium/Behavioral.Automation.DemoScenarios/Behavioral.Automation.DemoScenarios.csproj index 17efee93..d9135be0 100644 --- a/Behavioral.Automation.Selenium/Behavioral.Automation.DemoScenarios/Behavioral.Automation.DemoScenarios.csproj +++ b/Behavioral.Automation.Selenium/Behavioral.Automation.DemoScenarios/Behavioral.Automation.DemoScenarios.csproj @@ -10,7 +10,7 @@ - + diff --git a/src/BlazorApp/Pages/Counter.razor b/src/BlazorApp/Pages/Counter.razor index 4315314a..a2252a4a 100644 --- a/src/BlazorApp/Pages/Counter.razor +++ b/src/BlazorApp/Pages/Counter.razor @@ -2,11 +2,18 @@ Counter -

Counter

+

Counter

-

Current count: @currentCount

+

Current count: @currentCount +

- + @code { private int currentCount = 0; diff --git a/src/BlazorApp/Pages/FetchData.razor b/src/BlazorApp/Pages/FetchData.razor index f5adaf16..081c549e 100644 --- a/src/BlazorApp/Pages/FetchData.razor +++ b/src/BlazorApp/Pages/FetchData.razor @@ -5,9 +5,9 @@ @using BlazorApp.Data @inject WeatherForecastService ForecastService -

Weather forecast

+

Weather forecast

-

This component demonstrates fetching data from a service.

+

This component demonstrates fetching data from a service.

@if (forecasts == null) { @@ -15,23 +15,24 @@ } else { - +
- - - - + + + + - @foreach (var forecast in forecasts) + @for (int i=0; i - - - - + var forecast = forecasts[i]; + + + + + } diff --git a/src/BlazorApp/Pages/Greetings.razor b/src/BlazorApp/Pages/Greetings.razor new file mode 100644 index 00000000..42bf90bc --- /dev/null +++ b/src/BlazorApp/Pages/Greetings.razor @@ -0,0 +1,34 @@ +@page "/greetings" + +Greetings + +

Here you can test input elements

+ +

Enter your name:

+ +
+ + +
+ +

+ Hello, @_userName! +

+ +@code { + private string _userName = string.Empty; + + public string visibility = "none"; + public string username = string.Empty; + + private void ChangeUsername() + { + _userName = username; + visibility = "initial"; + } +} \ No newline at end of file diff --git a/src/BlazorApp/Pages/Index.razor b/src/BlazorApp/Pages/Index.razor index 03a70e8e..afc93a44 100644 --- a/src/BlazorApp/Pages/Index.razor +++ b/src/BlazorApp/Pages/Index.razor @@ -2,12 +2,21 @@ Behavioral automation demo -

Hello, world!

+

Behavioral automation demo

+
+

Welcome to Behavioral.Automation demo app!

+

Here you can get familiar with different web elements, and try to

+

automate interaction with them using DemoBindings and DemoScenarios projects

+
+
+

There are few types of web elements present in this app:

+
    +
  • Button
  • +
  • Input
  • +
  • Table
  • +
  • Text
  • +
  • List
  • +
+
- -Welcome to your new app. - - - - diff --git a/src/BlazorApp/Program.cs b/src/BlazorApp/Program.cs index eb6d718c..70ded3f6 100644 --- a/src/BlazorApp/Program.cs +++ b/src/BlazorApp/Program.cs @@ -1,9 +1,4 @@ -using Microsoft.AspNetCore.Components; -using Microsoft.AspNetCore.Components.Web; using BlazorApp.Data; -using Microsoft.AspNetCore.Builder; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; var builder = WebApplication.CreateBuilder(args); diff --git a/src/BlazorApp/Shared/NavMenu.razor b/src/BlazorApp/Shared/NavMenu.razor index aceacd36..3033e324 100644 --- a/src/BlazorApp/Shared/NavMenu.razor +++ b/src/BlazorApp/Shared/NavMenu.razor @@ -1,6 +1,6 @@ 
DateTemp. (C)Temp. (F)SummaryDateTemp. (C)Temp. (F)Summary
@forecast.Date.ToShortDateString()@forecast.TemperatureC@forecast.TemperatureF@forecast.Summary
@forecast.Date.ToShortDateString()@forecast.TemperatureC@forecast.TemperatureF@forecast.Summary