-
-
Notifications
You must be signed in to change notification settings - Fork 734
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fdcc874
commit 0ac6c45
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
describe('Register new user', () => { | ||
beforeEach(() => { | ||
cy.autologin(); | ||
cy.visit('/'); | ||
}); | ||
it('Register a new user', function () { | ||
const api_url = 'http://127.0.0.1:55001/plone'; | ||
|
||
cy.visit('/register'); | ||
cy.get('#field-fullname').type('plone-dev'); | ||
cy.get('#field-email').type('[email protected]'); | ||
cy.get('button[title="Register"]').click(); | ||
cy.request({ | ||
method: 'POST', | ||
url: `${api_url}/@users`, | ||
headers: { Accept: 'application/json' }, | ||
body: { | ||
username: 'plone-dev', | ||
fullname: 'plone-dev', | ||
email: '[email protected]', | ||
password: 'password', | ||
}, | ||
}).then((response) => { | ||
expect(response.status).to.eq(201); | ||
}); | ||
}); | ||
}); |