Advertisement
Guest User

Untitled

a guest
Apr 25th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. it.only('C15052 - All channel types highlight properly on sidebar', () => {
  2. cy.visit('/');
  3.  
  4. // should have remove button for DM/GM channels
  5. const publicChannelId = '7exhcp44dtru9gymohe5tms4de'; // should get dynamically
  6. cy.get(`#sidebarChannel_${publicChannelId}`).scrollIntoView().children().children().then(($el) => {
  7. assert.equal($el.length, 3, 'should have 3 children where last child is a remove button');
  8. assert.equal($el[2].id, `remove_${publicChannelId}`);
  9. cy.get(`#remove_${publicChannelId}`).should('not.be.visible');
  10. cy.get(`#remove_${publicChannelId}`).invoke('show').should('be.visible');
  11. });
  12.  
  13. // should not have remove button for public or private channel
  14. const dmChannelId = 'xe617kybnjrr988i6mhds6rhdc'; // should get dynamically
  15. cy.get(`#sidebarChannel_${dmChannelId}`).scrollIntoView().children().children().then(($el) => {
  16. assert.equal($el.length, 2, 'should have 2 children only, no remove button');
  17. });
  18. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement