01_offline_basic.cy.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. import { setup } from '../../support/setup.js';
  2. setup();
  3. describe(`Basic tests`, () => {
  4. it('Can visit the page', () => {
  5. cy.visit('http://localhost:8080/');
  6. });
  7. // Offline banner
  8. it('Has correct offline banner values', () => {
  9. cy.contains(
  10. 'This stream is offline. You can be notified the next time New Owncast Server goes live or follow streamer@testing.biz on the Fediverse.'
  11. ).should('exist');
  12. });
  13. // Verify the tags show up
  14. it('Has correct tags visible', () => {
  15. cy.contains('#owncast').should('exist');
  16. cy.contains('#streaming').should('exist');
  17. });
  18. // it('Can open notify modal', () => {
  19. // cy.contains('Be notified').click();
  20. // cy.wait(1500);
  21. // cy.get('.ant-modal-close').click();
  22. // });
  23. // it('Can open follow modal', () => {
  24. // cy.contains('Follow').click();
  25. // cy.wait(1500);
  26. // cy.get('.ant-modal-close').click();
  27. // });
  28. it('Can change to Followers tab', () => {
  29. cy.contains('Followers').click();
  30. });
  31. // Verify content header values
  32. it('Has correct content header values', () => {
  33. cy.get('.header-title').should('have.text', 'New Owncast Server');
  34. cy.get('.header-subtitle').should(
  35. 'have.text',
  36. 'This is a new live video streaming server powered by Owncast.'
  37. );
  38. });
  39. it('Has correct global header values', () => {
  40. cy.get('#global-header-text').should('have.text', 'New Owncast Server');
  41. });
  42. });