e2e.js 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // ***********************************************************
  2. // This example support/e2e.js is processed and
  3. // loaded automatically before your test files.
  4. //
  5. // This is a great place to put global configuration and
  6. // behavior that modifies Cypress.
  7. //
  8. // You can change the location of this file or turn off
  9. // automatically serving support files with the
  10. // 'supportFile' configuration option.
  11. //
  12. // You can read more here:
  13. // https://on.cypress.io/configuration
  14. // ***********************************************************
  15. // Import commands.js using ES2015 syntax:
  16. import './commands';
  17. import fetchData from './fetchData.js';
  18. // Alternatively you can use CommonJS syntax:
  19. // require('./commands')
  20. // Put Owncast in a state where it's ready to be tested.
  21. // Set server URL
  22. fetchData('http://localhost:8080/api/admin/config/serverurl', {
  23. method: 'POST',
  24. data: { value: 'https://testing.biz' },
  25. });
  26. // Enable Fediverse features.
  27. fetchData('http://localhost:8080/api/admin/config/federation/enable', {
  28. method: 'POST',
  29. data: { value: true },
  30. });