mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-22 06:23:31 -07:00
fix automation tests for new ui
This commit is contained in:
parent
bdd0cfe622
commit
6e47efad7f
5 changed files with 45 additions and 22 deletions
|
@ -67,7 +67,7 @@ stages:
|
|||
- publish: $(outputFolder)
|
||||
artifact: '$(osName)Backend'
|
||||
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
||||
- publish: $(Pipeline.Workspace)
|
||||
- publish: $(Build.SourcesDirectory)
|
||||
artifact: 'CoverageBuild'
|
||||
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
||||
- publish: $(testsFolder)
|
||||
|
@ -354,6 +354,20 @@ stages:
|
|||
buildType: 'current'
|
||||
artifactName: Tests
|
||||
targetPath: $(testsFolder)
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: Download Build Artifact
|
||||
inputs:
|
||||
buildType: 'current'
|
||||
artifactName: Packages
|
||||
itemPattern: '**\Lidarr.**.windows.zip'
|
||||
targetPath: $(Build.ArtifactStagingDirectory)
|
||||
- task: ExtractFiles@1
|
||||
inputs:
|
||||
archiveFilePatterns: '$(Build.ArtifactStagingDirectory)/**/Lidarr.**.windows.zip'
|
||||
destinationFolder: '$(Build.ArtifactStagingDirectory)/bin'
|
||||
- bash: |
|
||||
mkdir -p ./bin/
|
||||
cp -r -v ${BUILD_ARTIFACTSTAGINGDIRECTORY}/bin/Lidarr/. ./bin/
|
||||
- task: Bash@3
|
||||
displayName: Windows Automation Tests
|
||||
inputs:
|
||||
|
@ -406,7 +420,7 @@ stages:
|
|||
inputs:
|
||||
buildType: 'current'
|
||||
artifactName: CoverageBuild
|
||||
targetPath: $(Pipeline.Workspace)
|
||||
targetPath: $(Build.SourcesDirectory)
|
||||
- bash: |
|
||||
ls -R ./
|
||||
#- publish: $(testsFolder)
|
||||
|
|
|
@ -45,7 +45,7 @@ namespace NzbDrone.Automation.Test
|
|||
var page = new PageBase(driver);
|
||||
page.WaitForNoSpinner();
|
||||
|
||||
driver.ExecuteScript("window.NzbDrone.NameViews = true;");
|
||||
driver.ExecuteScript("window.Lidarr.NameViews = true;");
|
||||
|
||||
GetPageErrors().Should().BeEmpty();
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using FluentAssertions;
|
||||
using FluentAssertions;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Automation.Test.PageModel;
|
||||
using OpenQA.Selenium;
|
||||
|
@ -21,7 +21,7 @@ namespace NzbDrone.Automation.Test
|
|||
{
|
||||
page.ArtistNavIcon.Click();
|
||||
page.WaitForNoSpinner();
|
||||
page.FindByClass("iv-artist-index-artistindexlayout").Should().NotBeNull();
|
||||
page.Find(By.CssSelector("div[class*='ArtistIndex']")).Should().NotBeNull();
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -30,7 +30,7 @@ namespace NzbDrone.Automation.Test
|
|||
page.CalendarNavIcon.Click();
|
||||
page.WaitForNoSpinner();
|
||||
|
||||
page.FindByClass("iv-calendar-calendarlayout").Should().NotBeNull();
|
||||
page.Find(By.CssSelector("div[class*='CalendarPage']")).Should().NotBeNull();
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -39,7 +39,9 @@ namespace NzbDrone.Automation.Test
|
|||
page.ActivityNavIcon.Click();
|
||||
page.WaitForNoSpinner();
|
||||
|
||||
page.FindByClass("iv-activity-activitylayout").Should().NotBeNull();
|
||||
page.Find(By.LinkText("Queue")).Should().NotBeNull();
|
||||
page.Find(By.LinkText("History")).Should().NotBeNull();
|
||||
page.Find(By.LinkText("Blacklist")).Should().NotBeNull();
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -48,7 +50,8 @@ namespace NzbDrone.Automation.Test
|
|||
page.WantedNavIcon.Click();
|
||||
page.WaitForNoSpinner();
|
||||
|
||||
page.FindByClass("iv-wanted-missing-missinglayout").Should().NotBeNull();
|
||||
page.Find(By.LinkText("Missing")).Should().NotBeNull();
|
||||
page.Find(By.LinkText("Cutoff Unmet")).Should().NotBeNull();
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -57,20 +60,20 @@ namespace NzbDrone.Automation.Test
|
|||
page.SystemNavIcon.Click();
|
||||
page.WaitForNoSpinner();
|
||||
|
||||
page.FindByClass("iv-system-systemlayout").Should().NotBeNull();
|
||||
page.Find(By.CssSelector("div[class*='Health']")).Should().NotBeNull();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void add_series_page()
|
||||
public void add_artist_page()
|
||||
{
|
||||
page.ArtistNavIcon.Click();
|
||||
page.WaitForNoSpinner();
|
||||
|
||||
page.Find(By.LinkText("Add Artist")).Click();
|
||||
page.Find(By.LinkText("Add New")).Click();
|
||||
|
||||
page.WaitForNoSpinner();
|
||||
|
||||
page.FindByClass("iv-addartist-addartistlayout").Should().NotBeNull();
|
||||
page.Find(By.CssSelector("input[class*='AddNewArtist-searchInput']")).Should().NotBeNull();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -85,8 +85,14 @@
|
|||
<PackageReference Include="NUnit">
|
||||
<Version>3.11.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Selenium.Firefox.WebDriver">
|
||||
<Version>0.24.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Selenium.Support">
|
||||
<Version>3.2.0</Version>
|
||||
<Version>3.141.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Selenium.WebDriver">
|
||||
<Version>3.141.0</Version>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Threading;
|
||||
using OpenQA.Selenium;
|
||||
using OpenQA.Selenium.Remote;
|
||||
|
@ -47,16 +47,16 @@ namespace NzbDrone.Automation.Test.PageModel
|
|||
});
|
||||
}
|
||||
|
||||
public IWebElement ArtistNavIcon => FindByClass("x-artist-nav");
|
||||
public IWebElement ArtistNavIcon => Find(By.LinkText("Artist"));
|
||||
|
||||
public IWebElement CalendarNavIcon => FindByClass("x-calendar-nav");
|
||||
public IWebElement CalendarNavIcon => Find(By.LinkText("Calendar"));
|
||||
|
||||
public IWebElement ActivityNavIcon => FindByClass("x-activity-nav");
|
||||
public IWebElement ActivityNavIcon => Find(By.LinkText("Activity"));
|
||||
|
||||
public IWebElement WantedNavIcon => FindByClass("x-wanted-nav");
|
||||
public IWebElement WantedNavIcon => Find(By.LinkText("Wanted"));
|
||||
|
||||
public IWebElement SettingNavIcon => FindByClass("x-settings-nav");
|
||||
public IWebElement SettingNavIcon => Find(By.LinkText("Settings"));
|
||||
|
||||
public IWebElement SystemNavIcon => FindByClass("x-system-nav");
|
||||
public IWebElement SystemNavIcon => Find(By.PartialLinkText("System"));
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue