-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from frysztak/release/v0.7.1
v0.7.1 into master
- Loading branch information
Showing
39 changed files
with
2,251 additions
and
1,733 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
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
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
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
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
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
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
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 |
---|---|---|
@@ -1,24 +1,29 @@ | ||
import { getApiPath } from './utils'; | ||
|
||
describe('login page', () => { | ||
beforeEach(() => { | ||
cy.signupByApi('end2end', 'end2endpass', 'E2E'); | ||
}); | ||
const sizes = ['macbook-13', 'iphone-6']; | ||
|
||
sizes.forEach((size) => { | ||
describe(`login page, size '${size}'`, () => { | ||
beforeEach(() => { | ||
cy.viewport(size as any); | ||
cy.signupByApi('end2end', 'end2endpass', 'E2E'); | ||
}); | ||
|
||
const baseUrl = Cypress.config('baseUrl'); | ||
const baseUrl = Cypress.config('baseUrl'); | ||
|
||
it('can successfully log in', () => { | ||
cy.intercept({ | ||
method: 'POST', | ||
url: getApiPath('/auth/login'), | ||
}).as('apiAuthLogin'); | ||
it('can successfully log in', () => { | ||
cy.intercept({ | ||
method: 'POST', | ||
url: getApiPath('/auth/login'), | ||
}).as('apiAuthLogin'); | ||
|
||
cy.visit('/login'); | ||
cy.getBySel('username').type('end2end'); | ||
cy.getBySel('password').type('end2endpass'); | ||
cy.getBySel('submit').click(); | ||
cy.visit('/login'); | ||
cy.getBySel('username').type('end2end'); | ||
cy.getBySel('password').type('end2endpass'); | ||
cy.getBySel('submit').click(); | ||
|
||
cy.wait('@apiAuthLogin').its('response.statusCode').should('eq', 200); | ||
cy.url().should('equal', `${baseUrl}/`); | ||
cy.wait('@apiAuthLogin').its('response.statusCode').should('eq', 200); | ||
cy.url().should('equal', `${baseUrl}/`); | ||
}); | ||
}); | ||
}); |
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 |
---|---|---|
@@ -1,20 +1,41 @@ | ||
import { getApiPath } from './utils'; | ||
|
||
describe('signup page', () => { | ||
it('can successfully sign up', () => { | ||
cy.intercept({ | ||
method: 'POST', | ||
url: getApiPath('/auth/register'), | ||
}).as('apiAuthRegister'); | ||
const sizes = ['macbook-13', 'iphone-6']; | ||
|
||
cy.visit('/signup'); | ||
cy.getBySel('username').type('end2end'); | ||
cy.getBySel('displayName').type('E2E'); | ||
cy.getBySel('password').type('end2endpass'); | ||
cy.getBySel('passwordConfirm').type('end2endpass'); | ||
cy.getBySel('submit').click(); | ||
sizes.forEach((size) => { | ||
describe(`signup page, size '${size}'`, () => { | ||
beforeEach(() => { | ||
cy.viewport(size as any); | ||
}); | ||
|
||
cy.wait('@apiAuthRegister').its('response.statusCode').should('eq', 200); | ||
cy.url().should('include', '/login'); | ||
it('can successfully sign up', () => { | ||
cy.intercept({ | ||
method: 'POST', | ||
url: getApiPath('/auth/register'), | ||
}).as('apiAuthRegister'); | ||
|
||
cy.visit('/signup'); | ||
cy.getBySel('username').type('end2end'); | ||
cy.getBySel('displayName').type('E2E'); | ||
cy.getBySel('avatarBadgeUpload').should('be.visible'); | ||
cy.getBySel('avatarBadgeDelete').should('not.exist'); | ||
cy.getBySel('avatarInput').selectFile( | ||
{ | ||
contents: 'cypress/fixtures/media/avatar.jpg', | ||
fileName: 'av.jpg', | ||
mimeType: 'image/jpeg', | ||
}, | ||
{ force: true } | ||
); | ||
cy.getBySel('avatar').find('img').should('be.visible'); | ||
cy.getBySel('avatarBadgeUpload').should('not.exist'); | ||
cy.getBySel('avatarBadgeDelete').should('be.visible'); | ||
cy.getBySel('password').type('end2endpass'); | ||
cy.getBySel('passwordConfirm').type('end2endpass'); | ||
cy.getBySel('submit').click(); | ||
|
||
cy.wait('@apiAuthRegister').its('response.statusCode').should('eq', 200); | ||
cy.url().should('include', '/login'); | ||
}); | ||
}); | ||
}); |
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Oops, something went wrong.