mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Update tests, start test driving new scenario
- tests had become outdated thanks to new implementation details, namely that a socialMedia node is being created and associated with a user instead of it being an attribute of the User - scenario to ensure other user's can view my social media
This commit is contained in:
parent
edd37db8fe
commit
9bdd0742c9
@ -6,11 +6,15 @@ Feature: List Social Media Accounts
|
|||||||
Background:
|
Background:
|
||||||
Given I have a user account
|
Given I have a user account
|
||||||
And I am logged in
|
And I am logged in
|
||||||
And I am on the "settings" page
|
|
||||||
|
|
||||||
Scenario: Adding Social Media
|
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
|
Then I should be on the "/settings/my-social-media" page
|
||||||
When I add a social media link
|
When I add a social media link
|
||||||
Then it gets saved successfully
|
Then it gets saved successfully
|
||||||
And the new social media link shows up on the page
|
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
|
||||||
@ -91,6 +91,11 @@ Then('it gets saved successfully', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
Then('the new social media link shows up on the page', () => {
|
Then('the new social media link shows up on the page', () => {
|
||||||
cy.get('a')
|
cy.get('a[href="https://freeradical.zone/@mattwr18"]')
|
||||||
.contains("src='https://freeradical.zone/@mattwr18'")
|
.should('have.length', 1)
|
||||||
|
})
|
||||||
|
|
||||||
|
Then('they should be able to see my social media links', () => {
|
||||||
|
cy.get('.ds-card-content')
|
||||||
|
|
||||||
})
|
})
|
||||||
@ -45,7 +45,9 @@ describe('my-social-media.vue', () => {
|
|||||||
getters = {
|
getters = {
|
||||||
'auth/user': () => {
|
'auth/user': () => {
|
||||||
return {
|
return {
|
||||||
socialMedia: ['']
|
socialMedia: [
|
||||||
|
{ id: 's1', url: 'https://freeradical.zone/@mattwr18' }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user