mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-03-07 18:01:40 -05:00
* feat: add stripe donate page test for non donors * fix: revert changes to see if ev is passed correctly * feat: download artifacts * fix: add quotations for spec args with global patterns * fix: remove firefox from cypress donation tests * fix: trigger action on main push * Apply suggestions from code review Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com> * feat: remove matrix and simplify Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
22 lines
897 B
JavaScript
22 lines
897 B
JavaScript
describe('Report User', () => {
|
|
beforeEach(() => {
|
|
cy.exec('npm run seed');
|
|
cy.login();
|
|
});
|
|
it('should be possible to report a user from their profile page', () => {
|
|
// Since going to a user page initially generates a 404, we have to ignore
|
|
// status codes on that request
|
|
cy.visit('/twaha', { failOnStatusCode: false });
|
|
// The following line is only required if you want to test it in development
|
|
// cy.contains('Preview custom 404 page').click();
|
|
cy.contains("Flag This User's Account for Abuse").click();
|
|
cy.contains("Do you want to report twaha's portfolio for abuse?");
|
|
cy.get('[id=report-user-textarea]').type('Some details');
|
|
cy.contains('Submit the report').click();
|
|
cy.location().should(loc => {
|
|
expect(loc.pathname).to.eq('/learn');
|
|
});
|
|
cy.contains('A report was sent to the team with foo@bar.com in copy');
|
|
});
|
|
});
|