mirror of
https://github.com/Unirep/Unirep-Social.git
synced 2026-01-10 06:27:58 -05:00
chore: e2e post test
This commit is contained in:
@@ -50,7 +50,7 @@ describe('visit and interact with home page', () => {
|
||||
cy.get('.user-info-widget > .rep-info').contains('0')
|
||||
cy.go('back')
|
||||
})
|
||||
it.skip('ensures that user can submit a post', () => {
|
||||
it('ensures that user can submit a post', () => {
|
||||
// todo: find way to target title (might have to add id in UI)
|
||||
const loremPost =
|
||||
'*Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.*'
|
||||
@@ -63,7 +63,7 @@ describe('visit and interact with home page', () => {
|
||||
cy.intercept('GET', 'http://testurl.invalidtld/api/comment?*', {
|
||||
body: [],
|
||||
}).as('getApiComment')
|
||||
cy.get('#new > img').click()
|
||||
cy.get('.create-post').click()
|
||||
cy.location('pathname').should('eq', '/new')
|
||||
cy.get('.rep-handout').contains('30')
|
||||
cy.get('#inputTextArea').type(loremPost)
|
||||
@@ -71,6 +71,6 @@ describe('visit and interact with home page', () => {
|
||||
cy.get('.block-content').should('exist')
|
||||
// submit post and check for reputation
|
||||
cy.get('.my-button').contains('Post - 5 points').click()
|
||||
cy.location('pathname').should('eq', '/')
|
||||
cy.location('pathname').should('eq', '/general')
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user