Skip to content

Commit

Permalink
graphql-apiml.cy.js test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kishkinova committed Aug 26, 2024
1 parent 1463bbb commit 2635f9d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const PATH_TO_SERVICE_DESCRIPTION =
const PATH_TO_PLAYGROUND_INPUT_TEXTAREA =
'#graphiql-session > div:nth-child(1) > div > div:nth-child(1) > section > div.graphiql-editor > div > div:nth-child(1) > textarea';
const PATH_TO_QUERY_OUTPUT =
'#graphiql-session > div:nth-child(1) > div > div:nth-child(1) > section > div.graphiql-editor > div > div.CodeMirror-scroll > div.CodeMirror-sizer > div > div > div > div.CodeMirror-code';
'#graphiql-session > div:nth-child(3) > div > section > div > div.CodeMirror-scroll > div.CodeMirror-sizer > div > div > div > div.CodeMirror-code';
const PATH_TO_DEFAULT_QUERY =
'#graphiql-session > div:nth-child(1) > div > div:nth-child(1) > section > div.graphiql-editor > div > div.CodeMirror-scroll > div.CodeMirror-sizer > div > div > div > div.CodeMirror-code > div > pre > span > span';
const PATH_TO_RUN_QUERY_BUTTON =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@ public void testUpdateBookSuccess() {
assertEquals(200, updatedBook.pageCount());
}

@Test
public void testUpdateBookWithSimilarFieldsSuccess() {
var updatedBook = Book.updateBook("book-1", "Effective Java", 0, "author-12");
assertEquals("Effective Java", updatedBook.name());
assertEquals(0, updatedBook.pageCount());
assertEquals("author-12", updatedBook.authorId());
}

@Test
public void testUpdateBookNotFound() {
assertThrows(BookNotFoundException.class, () -> {
Expand Down

0 comments on commit 2635f9d

Please sign in to comment.