Skip to content

Commit dfeb6f4

Browse files
committed
Combined functionality tests into 1 test
1 parent fd47bf7 commit dfeb6f4

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

cypress/e2e/Conduit App/Articles/functionalityTests.cy.js

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ describe('Verify user can Create, View and Delete a Newly Created Article', () =
1515
const articleText = 'This is the Article text'
1616
const tagName = 'Tag ' + date
1717

18-
it('Add a New Article', () =>{
18+
it('Add, View and Delete a New Article', () =>{
1919
// Create a New Article and enter value for all fields
2020
cy.get('.nav-link').contains('New Article').click()
2121
cy.get('input[placeholder="Article Title"]').type(articleName)
@@ -26,29 +26,17 @@ describe('Verify user can Create, View and Delete a Newly Created Article', () =
2626
// Publish the Article
2727
cy.get('.btn').contains('Publish Article').click()
2828
cy.wait('@articles').its('response.statusCode').should('eq', 200)
29-
})
3029

31-
it('Verify Article appears on Profile page', () =>{
3230
// Verify Article appears on Profile
3331
cy.get('.user-pic').click()
3432
cy.get('.preview-link').contains(articleDescription)
3533
cy.get('.preview-link').contains(articleName).click()
36-
})
3734

38-
it('Verify Article Details appear on the Article page', () =>{
3935
// Verify Article Details appear on Details page
40-
cy.get('.user-pic').click()
41-
cy.wait('@allArticles').its('response.statusCode').should('eq', 200)
42-
cy.get('.preview-link').contains(articleName).click()
4336
cy.get('.banner').contains(articleName)
4437
cy.get('.row.article-content').contains(articleText)
45-
})
4638

47-
it('Delete the Newly Created Article', () =>{
4839
// Delete the newly created article from the previous tests
49-
cy.get('.user-pic').click()
50-
cy.wait('@allArticles').its('response.statusCode').should('eq', 200)
51-
cy.get('.preview-link').contains(articleName).click()
5240
cy.get('.ion-trash-a').eq(0).click({force: true})
5341
cy.location('pathname').should('eq', '/')
5442

0 commit comments

Comments
 (0)