-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert changes in old test assets and create new ones for scroll scen…
…arios.
- Loading branch information
1 parent
634fa8e
commit c973c00
Showing
7 changed files
with
109 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 0 additions & 40 deletions
40
...ents.TestServer/RazorComponents/Pages/EnhancedNav/PageForScrollingToHashNoStreaming.razor
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 9 additions & 12 deletions
21
...geForScrollPositionTestsNoStreaming.razor → ...av/ScrollTestLandingPageNoStreaming.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,32 @@ | ||
@page "/nav/testing-scroll-no-streaming" | ||
@page "/nav/scroll-test-no-streaming" | ||
@inject NavigationManager NavigationManager | ||
@rendermode RenderMode.InteractiveServer | ||
@* This is a copy of PageForScrollPositionTests, without StreamRendering *@ | ||
@* This is a copy of ScrollTestLandingPage, without StreamRendering *@ | ||
|
||
<PageTitle>Page for testing scroll position</PageTitle> | ||
|
||
<h1 id="test-info-scroll">Scroll tests landing page</h1> | ||
|
||
<p>If you scroll down a long way, you'll find more content.</p> | ||
<h1 id="test-info-1">Scroll tests landing page</h1> | ||
|
||
<div style="height: 2000px; border: 2px dashed red;">spacer top</div> | ||
|
||
<NavLink id="do-navigation-with-fragment" href="@(hashPageFragmentPath)"> | ||
Navigation to another page with fragment (scroll-to-hash#some-content) | ||
Navigation to another page with fragment | ||
</NavLink> | ||
<NavLink id="do-navigation" href="@(hashPagePath)"> | ||
Navigation to another page (scroll-to-hash) | ||
Navigation to another page | ||
</NavLink> | ||
<button id="do-programmatic-navigation-with-fragment" @onclick="@(() => NavigationManager.NavigateTo(hashPageFragmentPath))"> | ||
Programmatic navigation to another page with fragment (scroll-to-hash#some-content) | ||
Programmatic navigation to another page with fragment | ||
</button> | ||
<button id="do-programmatic-navigation" @onclick="@(() => NavigationManager.NavigateTo(hashPagePath))"> | ||
Programmatic navigation to another page (scroll-to-hash) | ||
Programmatic navigation to another page | ||
</button> | ||
|
||
<div style="height: 2000px; border: 2px dashed red;">spacer bottom</div> | ||
|
||
<h2 id="some-content">Some content</h2> | ||
<p>This is the content.</p> | ||
|
||
@code { | ||
string hashPagePath = "nav/scroll-to-hash-no-streaming"; | ||
string hashPageFragmentPath = "nav/scroll-to-hash-no-streaming#some-content"; | ||
string hashPagePath = "nav/scroll-test-next-no-streaming"; | ||
string hashPageFragmentPath = "nav/scroll-test-next-no-streaming#some-content"; | ||
} |
38 changes: 38 additions & 0 deletions
38
...stassets/Components.TestServer/RazorComponents/Pages/EnhancedNav/ScrollTestNextPage.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
@page "/nav/scroll-test-next" | ||
@inject NavigationManager NavigationManager | ||
@attribute [StreamRendering] | ||
@rendermode RenderMode.InteractiveServer | ||
|
||
<PageTitle>Next page for testing scroll position</PageTitle> | ||
|
||
<h1 id="test-info-2">Scroll tests next page</h1> | ||
|
||
<p>If you scroll down a long way, you'll find more content. We add it asynchronously via streaming rendering.</p> | ||
|
||
<div style="height: 2000px; border: 2px dashed red;">top spacer</div> | ||
|
||
@if (showContent) | ||
{ | ||
<h2 id="some-content">Some content</h2> | ||
<NavLink id="do-navigation" href="@(scrollPagePath)"> | ||
Navigation to another page | ||
</NavLink> | ||
<button id="do-programmatic-navigation" @onclick="@(() => NavigationManager.NavigateTo(scrollPagePath))"> | ||
Programmatic navigation to another page | ||
</button> | ||
|
||
<p>This is the content.</p> | ||
} | ||
|
||
<div style="height: 2000px; border: 2px dashed red;">bottom spacer</div> | ||
|
||
@code { | ||
bool showContent; | ||
string scrollPagePath = "nav/scroll-test"; | ||
|
||
protected override async Task OnInitializedAsync() | ||
{ | ||
await Task.Delay(1000); | ||
showContent = true; | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
...mponents.TestServer/RazorComponents/Pages/EnhancedNav/ScrollTestNextPageNoStreaming.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
@page "/nav/scroll-test-next-no-streaming" | ||
@inject NavigationManager NavigationManager | ||
@rendermode RenderMode.InteractiveServer | ||
@* This is a copy of ScrollTestNextPage, without StreamRendering *@ | ||
|
||
<PageTitle>Next page for testing scroll position</PageTitle> | ||
|
||
<h1 id="test-info-2">Scroll tests next page</h1> | ||
|
||
<div style="height: 1000px; border: 2px dashed red;">top spacer</div> | ||
|
||
<h2 id="some-content">Some content</h2> | ||
<NavLink id="do-navigation" href="@(scrollPagePath)"> | ||
Navigation to another page | ||
</NavLink> | ||
<button id="do-programmatic-navigation" @onclick="@(() => NavigationManager.NavigateTo(scrollPagePath))"> | ||
Programmatic navigation to another page | ||
</button> | ||
|
||
<div style="height: 2000px; border: 2px dashed red;">bottom spacer</div> | ||
|
||
@code { | ||
string scrollPagePath = "nav/scroll-test-no-streaming"; | ||
} |