parent
564e8d71da
commit
c548add236
@ -0,0 +1,54 @@ |
||||
## Users: |
||||
``` |
||||
- signin |
||||
- signup |
||||
- create |
||||
- listing |
||||
- edit |
||||
// TO-FIX: Uncomment workaround (blocked by: nested routing bug) |
||||
``` |
||||
|
||||
## Job Offers: |
||||
``` |
||||
- create |
||||
- edit |
||||
- listing |
||||
// TO-FIX: Search by title and description (blocked by: no search fields available) |
||||
- post |
||||
// TO-DO: Entire flow (blocked by: no published / unpublished flag) |
||||
``` |
||||
|
||||
## Channels: |
||||
``` |
||||
- create |
||||
- edit |
||||
- leave |
||||
- retire |
||||
- delete |
||||
- join |
||||
// TO-DO: Join other user created project (blocked by: can't create new user to create a channel) |
||||
- invite |
||||
// TO-DO |
||||
``` |
||||
|
||||
## Projects: |
||||
``` |
||||
- create |
||||
- edit |
||||
- leave |
||||
- retire |
||||
- delete |
||||
// TO-DO: Delete a project (blocked by: no option to delete a project) |
||||
- join |
||||
// TO-DO: Join other user created project (blocked by: can't create new user to create a project) |
||||
- invite |
||||
// TO-DO |
||||
``` |
||||
|
||||
## Breakdown: |
||||
``` |
||||
DONE: 15 |
||||
TO-FIX: 2 |
||||
BLOCKED: 4 |
||||
NOT DONE: 2 |
||||
``` |
@ -0,0 +1,55 @@ |
||||
/// <reference types="Cypress" />
|
||||
/* globals cy, expect */ |
||||
|
||||
context('Delete Channel Browser Testing', () => { |
||||
let menuQuery = [ |
||||
'solid-display.circle-tab', |
||||
'solid-display:last-child', |
||||
'solid-display[order-by="name"]' |
||||
], |
||||
menuCountQuery = [ |
||||
'solid-display.circle-tab', |
||||
'solid-display', |
||||
'solid-display[order-by="name"]' |
||||
]; |
||||
before(() => { |
||||
cy.clearLocalStorageSnapshot(); |
||||
cy.clearLocalStorage({ domain: null }); |
||||
cy.clearCookies({ domain: null }); |
||||
}); |
||||
beforeEach(() => cy.restoreLocalStorage()); |
||||
afterEach(() => cy.saveLocalStorage()); |
||||
it('should visit user login screend', () => cy.userLogin()); |
||||
it('should login', () => cy.login()); |
||||
describe('Channel Retirement process', () => { |
||||
let channelsLength; |
||||
it('should visit the channels list screen', () => cy.naviagte('/admin')); |
||||
it('should visit the last channel edit screen', () => { |
||||
cy.get(menuQuery.join(' ')) |
||||
.invoke('attr', 'data-src') |
||||
.then(url => cy.encodeUrl(url).then(id => { |
||||
cy.naviagte('/circle/@' + id + '/circle-information'); |
||||
})); |
||||
}); |
||||
it('should count the number of joined channels', () => { |
||||
cy.get(menuCountQuery.join(' ')).its('length').then(length => channelsLength = length); |
||||
}); |
||||
it('should click button to retire the channel', () => { |
||||
cy.get('#circle-profile solid-delete[data-label="Supprimer le canal"] button').click(); |
||||
}); |
||||
it('should stay on channel edit screen', () => { |
||||
cy.get(menuQuery.join(' ')) |
||||
.invoke('attr', 'data-src') |
||||
.then(url => cy.encodeUrl(url).then(id => { |
||||
cy.location().should((loc) => { |
||||
expect(loc.pathname).to.eq('/circle/@' + id + '/circle-information'); |
||||
}); |
||||
})); |
||||
}); |
||||
it('should check if chennel was retired', () => { |
||||
cy.get(menuCountQuery.join(' ')).its('length').should(length => { |
||||
expect(length).to.eq(channelsLength - 1); |
||||
}); |
||||
}); |
||||
}); |
||||
}); |
@ -0,0 +1,68 @@ |
||||
/// <reference types="Cypress" />
|
||||
/* globals cy, expect */ |
||||
|
||||
context('Edit User Browser Testing', () => { |
||||
let userFirstName = 'Edited User First Name ', |
||||
userLastName = 'Edited User Last Name ', |
||||
jobDescription = 'Edited Job Description ', |
||||
city = 'Edited City ', |
||||
phone = '+1234', |
||||
website = 'https://test.site/'; |
||||
before(() => { |
||||
cy.randomNum().then(num => { |
||||
userFirstName += num; |
||||
userLastName += num; |
||||
jobDescription += num; |
||||
city += num; |
||||
phone += num; |
||||
website += num; |
||||
}); |
||||
cy.clearLocalStorageSnapshot(); |
||||
cy.clearLocalStorage({ domain: null }); |
||||
cy.clearCookies({ domain: null }); |
||||
}); |
||||
beforeEach(() => cy.restoreLocalStorage()); |
||||
afterEach(() => cy.saveLocalStorage()); |
||||
it('should visit user login screen', () => cy.userLogin()); |
||||
it('should login', () => cy.login()); |
||||
describe('User Edition process', () => { |
||||
it('should visit the user edit screen', () => cy.naviagte('/profile/solid-profile-edit-profile')); |
||||
/// Workaround - Routing bug - user won't land on edit profile screen
|
||||
it('should navigate to user edit screen', () => { |
||||
cy.get('#solid-profile-my-profile solid-link[next="solid-profile-edit-profile"]').click(); |
||||
}); |
||||
/// End workaround
|
||||
it('should enter new user data', () => { |
||||
cy.get('#solid-profile-edit-profile input[name="first_name"]').clear().type(userFirstName); |
||||
cy.get('#solid-profile-edit-profile input[name="first_name"]').should('have.value', userFirstName); |
||||
cy.get('#solid-profile-edit-profile input[name="last_name"]').clear().type(userLastName); |
||||
cy.get('#solid-profile-edit-profile input[name="last_name"]').should('have.value', userLastName); |
||||
cy.get('#solid-profile-edit-profile textarea[name="profile.job"]').clear().type(jobDescription); |
||||
cy.get('#solid-profile-edit-profile textarea[name="profile.job"]').should('have.value', jobDescription); |
||||
cy.get('#solid-profile-edit-profile input[name="profile.city"]').clear().type(city); |
||||
cy.get('#solid-profile-edit-profile input[name="profile.city"]').should('have.value', city); |
||||
cy.get('#solid-profile-edit-profile input[name="profile.phone"]').clear().type(phone); |
||||
cy.get('#solid-profile-edit-profile input[name="profile.phone"]').should('have.value', phone); |
||||
cy.get('#solid-profile-edit-profile input[name="profile.website"]').clear().type(website); |
||||
cy.get('#solid-profile-edit-profile input[name="profile.website"]').should('have.value', website); |
||||
}); |
||||
it('should click button to save the user', () => { |
||||
cy.get('#solid-profile-edit-profile input[value="ENREGISTRER"]').click(); |
||||
}); |
||||
it('should land on user information screen', () => { |
||||
cy.location().should(location => { |
||||
/// Workaround - Routing bug - route pathname won't be /profile as it should
|
||||
expect(location.pathname).to.eq('/'); |
||||
// expect(location.pathname).to.eq('/profile');
|
||||
/// End workaround
|
||||
}); |
||||
}); |
||||
it('should show edited user data on user information screen', () => { |
||||
cy.contains('solid-display-value[name="name"]', userFirstName + ' ' + userLastName).should("exist"); |
||||
cy.contains('solid-display-value[name="profile.job"]', jobDescription).should("exist"); |
||||
cy.contains('solid-display-value[name="profile.city"]', city).should("exist"); |
||||
cy.contains('solid-display-tel[name="profile.phone"] a', phone).should("exist"); |
||||
cy.contains('profile-website[name="profile.website"] a', website).should("exist"); |
||||
}); |
||||
}); |
||||
}); |
@ -0,0 +1,37 @@ |
||||
/// <reference types="Cypress" />
|
||||
/* globals cy, expect */ |
||||
|
||||
context('Leave Channel Browser Testing', () => { |
||||
let tableQuery = [ |
||||
'solid-display.table-body', |
||||
'solid-display:last-child', |
||||
'hubl-admin-circle-leave-button', |
||||
'solid-delete' |
||||
], |
||||
tableListQuery = [ |
||||
'solid-display[nested-field="circles"]', |
||||
'div >', |
||||
'solid-display' |
||||
]; |
||||
before(() => { |
||||
cy.clearLocalStorageSnapshot(); |
||||
cy.clearLocalStorage({ domain: null }); |
||||
cy.clearCookies({ domain: null }); |
||||
}); |
||||
beforeEach(() => cy.restoreLocalStorage()); |
||||
afterEach(() => cy.saveLocalStorage()); |
||||
it('should visit user login screend', () => cy.userLogin()); |
||||
it('should login', () => cy.login()); |
||||
describe('Channel Leaving process', () => { |
||||
it('should visit the channels list screen', () => cy.naviagte('/admin')); |
||||
it('should click the last channel leave button', () => { |
||||
cy.get(tableListQuery.join(' ')).its('length').as('channelsLength'); |
||||
cy.get(tableQuery.join(' ')).click(); |
||||
}); |
||||
it('should check if chennel was left', () => { |
||||
cy.get(tableListQuery.join(' ')).its('length').should(length => { |
||||
expect(length).to.eq(this.channelsLength - 1); |
||||
}); |
||||
}); |
||||
}); |
||||
}); |
@ -0,0 +1,79 @@ |
||||
/// <reference types="Cypress" />
|
||||
/* globals cy, expect */ |
||||
|
||||
context('List Job Offers Browser Testing', () => { |
||||
let listQuery = 'solid-display.job-board__list', |
||||
filtersQuery = [ |
||||
listQuery, |
||||
'solid-form', |
||||
'input' |
||||
], |
||||
listingCountQuery = [ |
||||
listQuery, |
||||
'solid-display' |
||||
], |
||||
firstListingQuery = [ |
||||
listQuery, |
||||
'solid-display:first-child', |
||||
'solid-display-value' |
||||
]; |
||||
before(() => { |
||||
cy.clearLocalStorageSnapshot(); |
||||
cy.clearLocalStorage({ domain: null }); |
||||
cy.clearCookies({ domain: null }); |
||||
}); |
||||
beforeEach(() => cy.restoreLocalStorage()); |
||||
afterEach(() => cy.saveLocalStorage()); |
||||
it('should visit user login screen', () => cy.userLogin()); |
||||
it('should login', () => cy.login()); |
||||
describe('Job Offer Listing process', () => { |
||||
let listingTitle, |
||||
listingDesccription, |
||||
listingCount; |
||||
it('should visit the job offers listing screen', () => cy.naviagte('/job-offers')); |
||||
it('should get the listing count', () => { |
||||
cy.get(listingCountQuery.join(' ')).its('length').then(length => listingCount = length); |
||||
}); |
||||
it('should get the first job offer listing data', () => { |
||||
cy.get(firstListingQuery.join(' ') + '[name="title"]').invoke('text').then(text => listingTitle = text); |
||||
cy.get(firstListingQuery.join(' ') + '[name="description"]').invoke('text').then(text => listingDesccription = text); |
||||
}); |
||||
// TO-DO: Search by title and description
|
||||
/*it('should filter the listing by first name', () => { |
||||
cy.get(filtersQuery.join(' ') + '[name="title"]').clear().type(listingTitle); |
||||
cy.get(filtersQuery.join(' ') + '[name="title"]').should('have.value', listingTitle); |
||||
}); |
||||
it('should get filtered listing count', () => { |
||||
cy.get(listingCountQuery.join(' ')).its('length').then(length => { |
||||
expect(length).to.eq(1); |
||||
}); |
||||
}); |
||||
it('should clear the first name filter', () => { |
||||
cy.get(filtersQuery.join(' ') + '[name="title"]').clear(); |
||||
cy.get(filtersQuery.join(' ') + '[name="title"]').should('have.value', ''); |
||||
}); |
||||
it('should get previous listing count', () => { |
||||
cy.get(listingCountQuery.join(' ')).its('length').then(length => { |
||||
expect(length).to.eq(listingCount); |
||||
}); |
||||
}); |
||||
it('should filter the listing by first name', () => { |
||||
cy.get(filtersQuery.join(' ') + '[name="description"]').clear().type(listingDesccription); |
||||
cy.get(filtersQuery.join(' ') + '[name="description"]').should('have.value', listingDesccription); |
||||
}); |
||||
it('should get filtered listing count', () => { |
||||
cy.get(listingCountQuery.join(' ')).its('length').then(length => { |
||||
expect(length).to.eq(1); |
||||
}); |
||||
}); |
||||
it('should clear the first name filter', () => { |
||||
cy.get(filtersQuery.join(' ') + '[name="description"]').clear(); |
||||
cy.get(filtersQuery.join(' ') + '[name="description"]').should('have.value', ''); |
||||
}); |
||||
it('should get previous listing count', () => { |
||||
cy.get(listingCountQuery.join(' ')).its('length').then(length => { |
||||
expect(length).to.eq(listingCount); |
||||
}); |
||||
});*/ |
||||
}); |
||||
}); |
@ -0,0 +1,119 @@ |
||||
/// <reference types="Cypress" />
|
||||
/* globals cy, expect */ |
||||
|
||||
context('List Users Browser Testing', () => { |
||||
let listQuery = 'solid-display#members-list__content', |
||||
filtersQuery = [ |
||||
listQuery, |
||||
'solid-form', |
||||
'input' |
||||
], |
||||
listingCountQuery = [ |
||||
listQuery, |
||||
'div:first-child', |
||||
'span' |
||||
], |
||||
firstListingQuery = [ |
||||
listQuery, |
||||
'solid-display:first-child', |
||||
'solid-display-value' |
||||
]; |
||||
before(() => { |
||||
cy.clearLocalStorageSnapshot(); |
||||
cy.clearLocalStorage({ domain: null }); |
||||
cy.clearCookies({ domain: null }); |
||||
}); |
||||
beforeEach(() => cy.restoreLocalStorage()); |
||||
afterEach(() => cy.saveLocalStorage()); |
||||
it('should visit user login screen', () => cy.userLogin()); |
||||
it('should login', () => cy.login()); |
||||
describe('User Listing process', () => { |
||||
let listingFirstName, |
||||
listingLastName, |
||||
listingJob, |
||||
listingCity, |
||||
listingCount; |
||||
it('should visit the users listing screen', () => cy.naviagte('/members')); |
||||
it('should get the listing count', () => { |
||||
cy.get(listingCountQuery.join(' ')).invoke('text').then(text => listingCount = text); |
||||
}); |
||||
it('should get the first user listing data', () => { |
||||
cy.get(firstListingQuery.join(' ') + '[name="first_name"]').invoke('text').then(text => listingFirstName = text); |
||||
cy.get(firstListingQuery.join(' ') + '[name="last_name"]').invoke('text').then(text => listingLastName = text); |
||||
cy.get(firstListingQuery.join(' ') + '[name="profile.job"]').invoke('text').then(text => listingJob = text); |
||||
cy.get(firstListingQuery.join(' ') + '[name="profile.city"]').invoke('text').then(text => listingCity = text); |
||||
}); |
||||
it('should filter the listing by first name', () => { |
||||
cy.get(filtersQuery.join(' ') + '[name="name"]').clear().type(listingFirstName); |
||||
cy.get(filtersQuery.join(' ') + '[name="name"]').should('have.value', listingFirstName); |
||||
}); |
||||
it('should get filtered listing count', () => { |
||||
cy.get(listingCountQuery.join(' ')).invoke('text').then(text => { |
||||
expect(text).to.eq('1 membres'); |
||||
}); |
||||
}); |
||||
it('should clear the first name filter', () => { |
||||
cy.get(filtersQuery.join(' ') + '[name="name"]').clear(); |
||||
cy.get(filtersQuery.join(' ') + '[name="name"]').should('have.value', ''); |
||||
}); |
||||
it('should get previous listing count', () => { |
||||
cy.get(listingCountQuery.join(' ')).invoke('text').then(text => { |
||||
expect(text).to.eq(listingCount); |
||||
}); |
||||
}); |
||||
it('should filter the listing by last name', () => { |
||||
cy.get(filtersQuery.join(' ') + '[name="name"]').clear().type(listingLastName); |
||||
cy.get(filtersQuery.join(' ') + '[name="name"]').should('have.value', listingLastName); |
||||
}); |
||||
it('should get filtered listing count', () => { |
||||
cy.get(listingCountQuery.join(' ')).invoke('text').then(text => { |
||||
expect(text).to.eq('1 membres'); |
||||
}); |
||||
}); |
||||
it('should clear the last name filter', () => { |
||||
cy.get(filtersQuery.join(' ') + '[name="name"]').clear(); |
||||
cy.get(filtersQuery.join(' ') + '[name="name"]').should('have.value', ''); |
||||
}); |
||||
it('should get previous listing count', () => { |
||||
cy.get(listingCountQuery.join(' ')).invoke('text').then(text => { |
||||
expect(text).to.eq(listingCount); |
||||
}); |
||||
}); |
||||
it('should filter the listing by job description', () => { |
||||
cy.get(filtersQuery.join(' ') + '[name="member-job"]').clear().type(listingJob); |
||||
cy.get(filtersQuery.join(' ') + '[name="member-job"]').should('have.value', listingJob); |
||||
}); |
||||
it('should get filtered listing count', () => { |
||||
cy.get(listingCountQuery.join(' ')).invoke('text').then(text => { |
||||
expect(text).to.eq('1 membres'); |
||||
}); |
||||
}); |
||||
it('should clear the job description filter', () => { |
||||
cy.get(filtersQuery.join(' ') + '[name="member-job"]').clear(); |
||||
cy.get(filtersQuery.join(' ') + '[name="member-job"]').should('have.value', ''); |
||||
}); |
||||
it('should get previous listing count', () => { |
||||
cy.get(listingCountQuery.join(' ')).invoke('text').then(text => { |
||||
expect(text).to.eq(listingCount); |
||||
}); |
||||
}); |
||||
it('should filter the listing by city', () => { |
||||
cy.get(filtersQuery.join(' ') + '[name="member-city"]').clear().type(listingCity); |
||||
cy.get(filtersQuery.join(' ') + '[name="member-city"]').should('have.value', listingCity); |
||||
}); |
||||
it('should get filtered listing count', () => { |
||||
cy.get(listingCountQuery.join(' ')).invoke('text').then(text => { |
||||
expect(text).to.eq('1 membres'); |
||||
}); |
||||
}); |
||||
it('should clear the city filter', () => { |
||||
cy.get(filtersQuery.join(' ') + '[name="member-city"]').clear(); |
||||
cy.get(filtersQuery.join(' ') + '[name="member-city"]').should('have.value', ''); |
||||
}); |
||||
it('should get previous listing count', () => { |
||||
cy.get(listingCountQuery.join(' ')).invoke('text').then(text => { |
||||
expect(text).to.eq(listingCount); |
||||
}); |
||||
}); |
||||
}); |
||||
}); |
@ -0,0 +1,55 @@ |
||||
/// <reference types="Cypress" />
|
||||
/* globals cy, expect */ |
||||
|
||||
context('Retire Channel Browser Testing', () => { |
||||
let menuQuery = [ |
||||
'solid-display.circle-tab', |
||||
'solid-display:last-child', |
||||
'solid-display[order-by="name"]' |
||||
], |
||||
menuCountQuery = [ |
||||
'solid-display.circle-tab', |
||||
'solid-display', |
||||
'solid-display[order-by="name"]' |
||||
]; |
||||
before(() => { |
||||
cy.clearLocalStorageSnapshot(); |
||||
cy.clearLocalStorage({ domain: null }); |
||||
cy.clearCookies({ domain: null }); |
||||
}); |
||||
beforeEach(() => cy.restoreLocalStorage()); |
||||
afterEach(() => cy.saveLocalStorage()); |
||||
it('should visit user login screend', () => cy.userLogin()); |
||||
it('should login', () => cy.login()); |
||||
describe('Channel Retirement process', () => { |
||||
let channelsLength; |
||||
it('should visit the channels list screen', () => cy.naviagte('/admin')); |
||||
it('should visit the last channel edit screen', () => { |
||||
cy.get(menuQuery.join(' ')) |
||||
.invoke('attr', 'data-src') |
||||
.then(url => cy.encodeUrl(url).then(id => { |
||||
cy.naviagte('/circle/@' + id + '/circle-information/circle-edit'); |
||||
})); |
||||
}); |
||||
it('should count the number of joined channels', () => { |
||||
cy.get(menuCountQuery.join(' ')).its('length').then(length => channelsLength = length); |
||||
}); |
||||
it('should click button to retire the channel', () => { |
||||
cy.get('solid-multiple[name="members"] solid-delete[data-label="Retirer"] button').click(); |
||||
}); |
||||
it('should stay on channel edit screen', () => { |
||||
cy.get(menuQuery.join(' ')) |
||||
.invoke('attr', 'data-src') |
||||
.then(url => cy.encodeUrl(url).then(id => { |
||||
cy.location().should((loc) => { |
||||
expect(loc.pathname).to.eq('/circle/@' + id + '/circle-information/circle-edit'); |
||||
}); |
||||
})); |
||||
}); |
||||
it('should check if chennel was retired', () => { |
||||
cy.get(menuCountQuery.join(' ')).its('length').should(length => { |
||||
expect(length).to.eq(channelsLength - 1); |
||||
}); |
||||
}); |
||||
}); |
||||
}); |
Loading…
Reference in new issue