diff --git a/cypress/integration/SocialMedia.feature b/cypress/integration/SocialMedia.feature index 91ee9919c..6386b94ee 100644 --- a/cypress/integration/SocialMedia.feature +++ b/cypress/integration/SocialMedia.feature @@ -6,11 +6,15 @@ Feature: List Social Media Accounts Background: Given I have a user account And I am logged in - And I am on the "settings" page Scenario: Adding Social Media - Given I click on the "My social media" link + Given I am on the "settings" page + And I click on the "My social media" link Then I should be on the "/settings/my-social-media" page When I add a social media link Then it gets saved successfully - And the new social media link shows up on the page \ No newline at end of file + And the new social media link shows up on the page + + Scenario: Other user's viewing my Social Media + Given people visit my profile page + Then they should be able to see my social media links \ No newline at end of file diff --git a/cypress/integration/common/settings.js b/cypress/integration/common/settings.js index d31baefce..395208b1a 100644 --- a/cypress/integration/common/settings.js +++ b/cypress/integration/common/settings.js @@ -91,6 +91,11 @@ Then('it gets saved successfully', () => { }) Then('the new social media link shows up on the page', () => { - cy.get('a') - .contains("src='https://freeradical.zone/@mattwr18'") + cy.get('a[href="https://freeradical.zone/@mattwr18"]') + .should('have.length', 1) }) + +Then('they should be able to see my social media links', () => { + cy.get('.ds-card-content') + +}) \ No newline at end of file diff --git a/webapp/pages/settings/my-social-media.spec.js b/webapp/pages/settings/my-social-media.spec.js index b3e198a6f..8af15f2a8 100644 --- a/webapp/pages/settings/my-social-media.spec.js +++ b/webapp/pages/settings/my-social-media.spec.js @@ -45,7 +45,9 @@ describe('my-social-media.vue', () => { getters = { 'auth/user': () => { return { - socialMedia: [''] + socialMedia: [ + { id: 's1', url: 'https://freeradical.zone/@mattwr18' } + ] } } }