-
-
Notifications
You must be signed in to change notification settings - Fork 440
/
PageReloadTests.cs
32 lines (30 loc) · 972 Bytes
/
PageReloadTests.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using Microsoft.AspNetCore.Http;
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
using PuppeteerSharp.Helpers;
using PuppeteerSharp.Tests.Attributes;
using PuppeteerSharp.Xunit;
namespace PuppeteerSharp.Tests.NavigationTests
{
[Collection(TestConstants.TestFixtureCollectionName)]
public class PageReloadTests : PuppeteerPageBaseTest
{
public PageReloadTests(ITestOutputHelper output) : base(output)
{
}
[PuppeteerTest("navigation.spec.ts", "Page.reload", "should work")]
[PuppeteerFact]
public async Task ShouldWork()
{
await Page.GoToAsync(TestConstants.EmptyPage);
await Page.EvaluateFunctionAsync("() => (globalThis._foo = 10)");
await Page.ReloadAsync();
Assert.Null(await Page.EvaluateFunctionAsync("() => globalThis._foo"));
}
}
}