update: wrapping up and final adjustments to completed test flows
This commit is contained in:
@ -2,13 +2,7 @@
|
||||
/* globals cy, expect */
|
||||
|
||||
context('Create Channel Browser Testing', () => {
|
||||
let channelName = 'Test Channel ',
|
||||
description = 'Test Description ';
|
||||
before(() => {
|
||||
cy.randomNum().then(num => {
|
||||
channelName += num;
|
||||
description += num;
|
||||
});
|
||||
cy.clearLocalStorageSnapshot();
|
||||
cy.clearLocalStorage({ domain: null });
|
||||
cy.clearCookies({ domain: null });
|
||||
@ -16,28 +10,78 @@ context('Create Channel Browser Testing', () => {
|
||||
beforeEach(() => cy.restoreLocalStorage());
|
||||
afterEach(() => cy.saveLocalStorage());
|
||||
it('should visit user login screen', () => cy.userLogin());
|
||||
describe('Channel Creation process', () => {
|
||||
it('should login', () => cy.login());
|
||||
it('should login', () => cy.login());
|
||||
describe('Channel Creation process #1', () => {
|
||||
let channelName = 'Test Channel ',
|
||||
description = 'Test Description ';
|
||||
it('should visit the channel creation screen', () => cy.naviagte('/admin/admin-circle-create'));
|
||||
/*it('should enter incorrect channel data', () => {
|
||||
cy.get('#admin-circle-create input[name="name"]').type('!"#$%&');
|
||||
cy.get('#admin-circle-create input[name="name"]').should('have.value', '!"#$%&');
|
||||
cy.get('#admin-circle-create input[name="description"]').type(description);
|
||||
cy.get('#admin-circle-create input[name="description"]').should('have.value', description);
|
||||
it('should enter correct channel data', () => {
|
||||
cy.randomNum().then(num => {
|
||||
channelName += num;
|
||||
description += num;
|
||||
cy.get('#admin-circle-create input[name="name"]').clear().type(channelName);
|
||||
cy.get('#admin-circle-create input[name="name"]').should('have.value', channelName);
|
||||
cy.get('#admin-circle-create input[name="description"]').clear().type(description);
|
||||
cy.get('#admin-circle-create input[name="description"]').should('have.value', description);
|
||||
});
|
||||
});
|
||||
it('should click on create channel button', () => {
|
||||
cy.get('#admin-circle-create input[type="submit"]').click();
|
||||
});
|
||||
it('should provide errors about incorrect channel data', () => {
|
||||
// TO-DO: Check for error messages
|
||||
cy.get('element')
|
||||
.should('contain.text', 'Error message.');
|
||||
});*/
|
||||
it('should land on channels list screen', () => {
|
||||
cy.location().should((loc) => {
|
||||
expect(loc.pathname).to.eq('/admin');
|
||||
});
|
||||
});
|
||||
it('should land newly created channel on channels list screen', () => {
|
||||
cy.contains('solid-display-value[name="circle.name"]', channelName).should("exist");
|
||||
cy.fixture('admin.json').then(admin => {
|
||||
cy.contains('solid-display-value[name="username"]', admin.username).should("exist");
|
||||
});
|
||||
});
|
||||
});
|
||||
describe('Channel Creation process #2', () => {
|
||||
let channelName = 'Test Channel ',
|
||||
description = 'Test Description ';
|
||||
it('should visit the channel creation screen', () => cy.naviagte('/admin/admin-circle-create'));
|
||||
it('should enter correct channel data', () => {
|
||||
cy.get('#admin-circle-create input[name="name"]').clear().type(channelName);
|
||||
cy.get('#admin-circle-create input[name="name"]').should('have.value', channelName);
|
||||
cy.get('#admin-circle-create input[name="description"]').clear().type(description);
|
||||
cy.get('#admin-circle-create input[name="description"]').should('have.value', description);
|
||||
cy.randomNum().then(num => {
|
||||
channelName += num;
|
||||
description += num;
|
||||
cy.get('#admin-circle-create input[name="name"]').clear().type(channelName);
|
||||
cy.get('#admin-circle-create input[name="name"]').should('have.value', channelName);
|
||||
cy.get('#admin-circle-create input[name="description"]').clear().type(description);
|
||||
cy.get('#admin-circle-create input[name="description"]').should('have.value', description);
|
||||
});
|
||||
});
|
||||
it('should click on create channel button', () => {
|
||||
cy.get('#admin-circle-create input[type="submit"]').click();
|
||||
});
|
||||
it('should land on channels list screen', () => {
|
||||
cy.location().should((loc) => {
|
||||
expect(loc.pathname).to.eq('/admin');
|
||||
});
|
||||
});
|
||||
it('should land newly created channel on channels list screen', () => {
|
||||
cy.contains('solid-display-value[name="circle.name"]', channelName).should("exist");
|
||||
cy.fixture('admin.json').then(admin => {
|
||||
cy.contains('solid-display-value[name="username"]', admin.username).should("exist");
|
||||
});
|
||||
});
|
||||
});
|
||||
describe('Channel Creation process #3', () => {
|
||||
let channelName = 'Test Channel ',
|
||||
description = 'Test Description ';
|
||||
it('should visit the channel creation screen', () => cy.naviagte('/admin/admin-circle-create'));
|
||||
it('should enter correct channel data', () => {
|
||||
cy.randomNum().then(num => {
|
||||
channelName += num;
|
||||
description += num;
|
||||
cy.get('#admin-circle-create input[name="name"]').clear().type(channelName);
|
||||
cy.get('#admin-circle-create input[name="name"]').should('have.value', channelName);
|
||||
cy.get('#admin-circle-create input[name="description"]').clear().type(description);
|
||||
cy.get('#admin-circle-create input[name="description"]').should('have.value', description);
|
||||
});
|
||||
});
|
||||
it('should click on create channel button', () => {
|
||||
cy.get('#admin-circle-create input[type="submit"]').click();
|
||||
|
Reference in New Issue
Block a user