Feedback changes - final and refactored code

This commit is contained in:
Colin But
2016-07-03 21:12:09 +01:00
parent 4eac37c6b5
commit b1e40d9c92
7 changed files with 73 additions and 63 deletions
@@ -25,6 +25,7 @@ package com.iluwatar.pageobject;
import com.gargoylesoftware.htmlunit.WebClient;
import com.iluwatar.pageobject.pages.AlbumListPage;
import com.iluwatar.pageobject.pages.AlbumPage;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.assertTrue;
@@ -33,10 +34,16 @@ public class AlbumPageTest {
private AlbumPage albumPage = new AlbumPage(new WebClient());
@Before
public void setUp() {
albumPage.navigateToPage();
}
@Test
public void testSaveAlbum() {
AlbumPage albumPageAfterChanges = albumPage.changeAlbumTitle("25")
AlbumPage albumPageAfterChanges = albumPage
.changeAlbumTitle("25")
.changeArtist("Adele Laurie Blue Adkins")
.changeAlbumYear(2015)
.changeAlbumRating("B")
@@ -50,6 +57,7 @@ public class AlbumPageTest {
@Test
public void testCancelChanges() {
AlbumListPage albumListPage = albumPage.cancelChanges();
albumListPage.navigateToPage();
assertTrue(albumListPage.isAt());
}