Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Creating Cross-Platform C# Applications with Uno Platform

You're reading from   Creating Cross-Platform C# Applications with Uno Platform Build apps with C# and XAML that run on Windows, macOS, iOS, Android, and WebAssembly

Arrow left icon
Product type Paperback
Published in Aug 2021
Publisher Packt
ISBN-13 9781801078498
Length 258 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Marcel Alexander Wagner Marcel Alexander Wagner
Author Profile Icon Marcel Alexander Wagner
Marcel Alexander Wagner
Matt Lacey Matt Lacey
Author Profile Icon Matt Lacey
Matt Lacey
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Section 1: Getting to Know Uno Platform
2. Chapter 1: Introducing Uno Platform FREE CHAPTER 3. Chapter 2: Writing Your First Uno Platform App 4. Section 2: Writing and Developing Uno Platform Apps
5. Chapter 3: Working with Forms and Data 6. Chapter 4: Mobilizing Your App 7. Chapter 5: Making Your App Ready for the Real World 8. Chapter 6: Displaying Data in Charts and with Custom 2D Graphics 9. Section 3: Test, Deploy, and Contribute
10. Chapter 7: Testing Your Apps 11. Chapter 8: Deploying Your Apps and Going Further 12. Other Books You May Enjoy

Writing more complex tests

So far, we have only tested the very basic example of our sign-in interface rendering. However, we also want to make sure that our sign-in interface actually works and allows users to sign in. For this, we will write a new test that ensures that when a username and password are being provided, the sign-in button is clickable:

  1. Create a new function, VerifyButtonIsEnabledWithUsernameAndPassword, inside the SignInTests.cs file and add the Test attribute to it.
  2. Since we will use those queries more often, add the following Query objects to the SignInTests class:
    Query usernameInput = q => q.Marked("UsernameInput");
    Query passwordInput = q => q.Marked("PasswordInput");
    Query signInButton = q => q.Marked("SignInButton");
  3. Now, let's simulate entering text in the username and password fields by inserting the following code into the VerifyButtonIsEnabledWithUsernameAndPassword test:
    App.ClearText(usernameInput...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime