From 45d76973d9d738e037eb2c0b4fc91cab8048ee98 Mon Sep 17 00:00:00 2001
From: helenanull <helena.github@gmail.com>
Date: Sat, 3 Apr 2021 17:01:32 +0300
Subject: [PATCH] added new test

---
 cypress/integration/profile.spec.js | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/cypress/integration/profile.spec.js b/cypress/integration/profile.spec.js
index c6e40ab..def373b 100644
--- a/cypress/integration/profile.spec.js
+++ b/cypress/integration/profile.spec.js
@@ -18,6 +18,14 @@ describe('Profile page', () => {
         cy.get(profile.favouritedArticlesTab).should('be.visible')
     })
 
+    it('can see created articles', function () {
+        cy.createArticle()
+        cy.visit(`/@${this.username}`)
+        cy.get(profile.articles).should('be.visible')
+            .and('have.length', 1)
+            .and('contain', 'Article created by Cypress test')
+    })
+
     it('can see favorited articles', function () {
         const apiUrl = Cypress.env('apiUrl')
         // we already test adding favorite from UI in home spec