releaseStats.spec.jsx 962 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. import React from 'react';
  2. import {mount} from 'enzyme';
  3. import ConfigStore from 'app/stores/configStore';
  4. import GroupReleaseStats from 'app/components/group/releaseStats';
  5. import EnvironmentStore from 'app/stores/environmentStore';
  6. describe('GroupReleaseStats', function() {
  7. let component;
  8. beforeEach(function() {
  9. // Set timezone for snapshot
  10. ConfigStore.loadInitialData({
  11. user: {
  12. options: {
  13. timezone: 'America/Los_Angeles',
  14. },
  15. },
  16. });
  17. component = mount(
  18. <GroupReleaseStats
  19. group={TestStubs.Group()}
  20. project={TestStubs.Project()}
  21. allEnvironments={TestStubs.Group()}
  22. location={TestStubs.location()}
  23. />,
  24. {
  25. context: {
  26. organization: TestStubs.Organization(),
  27. },
  28. }
  29. );
  30. });
  31. it('renders', function() {
  32. EnvironmentStore.loadInitialData(TestStubs.Environments());
  33. expect(component).toMatchSnapshot();
  34. });
  35. });