update: wrapping up and final adjustments to completed test flows
This commit is contained in:
37
cypress/integration/leave-channel.spec.js
Normal file
37
cypress/integration/leave-channel.spec.js
Normal file
@ -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);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user