Skip to content

Enable components tests on helix #21280

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

Closed
wants to merge 25 commits into from
Closed

Enable components tests on helix #21280

wants to merge 25 commits into from

Conversation

HaoK
Copy link
Member

@HaoK HaoK commented Apr 28, 2020

Rebased version of #18636

@Pilchie Pilchie added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Apr 28, 2020
@@ -98,7 +100,7 @@ private static async Task InitializeInstance(ITestOutputHelper output)

var psi = new ProcessStartInfo
{
FileName = "npm",
FileName = (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix"))) ? "npm" : "yarn",
Copy link
Member

Choose a reason for hiding this comment

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

Is there a particular reason we use yarn only in Helix environments and not everywhere?

Copy link
Member Author

Choose a reason for hiding this comment

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

You can view this PR as more of a prototype trying to get things working, there were weird issues with using both yarn and npm (one blows away the other), on azdo builds, packages are restored as part of build, but on helix we run it as part of the test job, so this PR is sorta just trying to get things working. If you have any ideas or things you want to try, feel free to just push directly in to this PR as its really just meant to be a play ground to try and figure out how to get selenium working on helix.

Copy link
Member

Choose a reason for hiding this comment

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

Got it -- no worries. I'll see if I have time to poke into this.

@@ -40,6 +40,16 @@ public ServerFixture()

protected static string FindSampleOrTestSitePath(string projectName)
{
if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix")))
{
var dir = Path.Combine(AppContext.BaseDirectory, projectName);
Copy link
Member Author

Choose a reason for hiding this comment

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

@captainsafia this line used to be hardcoded to basictestapp which maybe was the issue with not resolving files properly...fingers crossed

Copy link
Member

Choose a reason for hiding this comment

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

The CI gods will let us know soon! fingers crossed

Copy link
Member Author

Choose a reason for hiding this comment

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

Track record would say prepare to be smitten then 😭

@HaoK
Copy link
Member Author

HaoK commented May 12, 2020

Ok I think we are down to just blazor configuration of the test apps now, @captainsafia any ideas on what might be causing the bootstrap/blazor stuff to not resolve? I don't see these assets in any of the test files so what normally pulls these in?

[xUnit.net 00:02:14.95]     Microsoft.AspNetCore.Components.E2ETest.Tests.BinaryHttpClientTest.CanSendAndReceiveBytes [FAIL]
[xUnit.net 00:02:14.95]       OpenQA.Selenium.BrowserAssertFailedException : Xunit.Sdk.NotEmptyException: Assert.NotEmpty() Failure
[xUnit.net 00:02:14.95]          at Xunit.Assert.NotEmpty(IEnumerable collection) in C:\Dev\xunit\xunit\src\xunit.assert\Asserts\CollectionAsserts.cs:line 331
[xUnit.net 00:02:14.95]          at Microsoft.AspNetCore.E2ETesting.WaitAssert.<>c__DisplayClass13_0.<Exists>b__0() in /_/src/Shared/E2ETesting/WaitAssert.cs:line 63
[xUnit.net 00:02:14.95]          at Microsoft.AspNetCore.E2ETesting.WaitAssert.<>c__DisplayClass16_0`1.<WaitAssertCore>b__0(IWebDriver _) in /_/src/Shared/E2ETesting/WaitAssert.cs:line 100
[xUnit.net 00:02:14.95]       Screen shot captured at 'C:\h\w\B55E09C3\w\B6550AA9\a8591eabc2224fe5854c3f769d85b577.png'
[xUnit.net 00:02:14.95]       Encountered browser errors
[xUnit.net 00:02:14.95]       [2020-05-12T06:15:10Z] [Severe] http://127.0.0.1:59907/_framework/blazor.webassembly.js - Failed to load resource: the server responded with a status of 404 (Not Found)
[xUnit.net 00:02:14.95]       [2020-05-12T06:15:10Z] [Severe] http://127.0.0.1:59907/css/bootstrap/bootstrap.min.css - Failed to load resource: the server responded with a status of 404 (Not Found)
[xUnit.net 00:02:14.95]       [2020-05-12T06:15:10Z] [Severe] http://127.0.0.1:59907/css/site.css - Failed to load resource: the server responded with a status of 404 (Not Found)Page content:

@HaoK HaoK force-pushed the haok/helix-c2 branch 2 times, most recently from edadaf3 to af56edc Compare June 10, 2020 09:00
@HaoK HaoK force-pushed the haok/helix-c2 branch 2 times, most recently from a6493e7 to 6f727eb Compare October 12, 2020 17:24
@HaoK HaoK linked an issue Oct 12, 2020 that may be closed by this pull request
HaoK added 7 commits October 19, 2020 14:03
Update Helix.targets

Include more test assets

Update Microsoft.AspNetCore.Components.E2ETests.csproj

Switch to npm from yarn

Cleanup

Update InstallNode.ps1

Update ServerFixture.cs

Fix test site path

Update ServerFixture.cs

Update ServerFixture.cs

Update ServerFixture.cs

Make directory match project name

Deal with commas

Update ServerFixture.cs

Fix ref

Rename back

Remove copy

Update package.json

Fix files

Update BasicTestApp.csproj
Base automatically changed from master to main January 22, 2021 01:32
@HaoK HaoK closed this Jan 22, 2021
@dougbu dougbu deleted the haok/helix-c2 branch August 21, 2021 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Helix] Enable Components.E2E tests
3 participants