Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jennyf/ui web app #556

Merged
merged 8 commits into from
Sep 8, 2020
Merged

Jennyf/ui web app #556

merged 8 commits into from
Sep 8, 2020

Conversation

jennyf19
Copy link
Collaborator

@jennyf19 jennyf19 commented Sep 8, 2020

No description provided.

ChromeOptions options = new ChromeOptions();
// ~2x faster, no visual rendering
// comment-out below when debugging to see the UI automation
options.AddArguments(TestConstants.Headless);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment line 27 to see the UI.

// comment-out below when debugging to see the UI automation
options.AddArguments(TestConstants.Headless);
IWebDriver driver = new ChromeDriver(options);
driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is an implicit wait, so if the elements are taking longer to appear, we won't move to the next element and throw an error. we can adjust this, right now, it's pretty fast.


// Assert
Assert.Contains(labResponse.User.Upn, driver.PageSource);
Assert.Contains(TestConstants.PhotoLabel, driver.PageSource);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

other ideas for asserts are welcome, but if we signed in correctly & called graph, we get the upn appearing and the photo label for graph.

UserInformationFieldIds fields)
{
// Lab user needs to be a guest in the msidentity-samples-testing tenant
Trace.WriteLine(string.Format("Logging in ... Entering user name: {0}", user.Upn));
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the lab user has to be a guest in msidentity-samples-testing (hence the comment), so printing out the lab user that's default, in case it changes. right now it's idlab1 from msidlab4. the default user should not change.


using Microsoft.Identity.Web.Test.Common;

namespace Microsoft.Identity.Web.Test.LabInfrastructure
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

modified version from MSAL. they have to check ADFS & B2C. we can add B2C later, so should be easy to expand this class when needed.

Copy link
Collaborator

@jmprieur jmprieur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Shouln't you also have and additional file in this PR? tests\WebAppCallsMicrosoftGraph\Properties\ServiceDependencies\webAppTestMsIdWeb - Web Deploy\profile.arm.json ?

@jennyf19
Copy link
Collaborator Author

jennyf19 commented Sep 8, 2020

lol. yes. i forgot those. thank you.


In reply to: 483939173 [](ancestors = 483939173)

@jennyf19 jennyf19 merged commit b7bed41 into master Sep 8, 2020
@jmprieur jmprieur deleted the jennyf/uiWebApp branch September 8, 2020 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants