updatingChannel.ts 854 B

123456789101112131415161718192021
  1. import { QueryNodeApi, WorkingGroups } from '../../Api'
  2. import { UpdateChannelFixture } from '../../fixtures/contentDirectoryModule'
  3. import { ChannelEntity } from 'cd-schemas/types/entities/ChannelEntity'
  4. import { assert } from 'chai'
  5. export function createUpdateChannelHandleFixture(api: QueryNodeApi): UpdateChannelFixture {
  6. // Create partial channel entity, only containing the fields we wish to update
  7. const channelUpdateInput: Partial<ChannelEntity> = {
  8. handle: 'Updated channel handle',
  9. }
  10. const uniquePropVal: Record<string, any> = { handle: 'Example channel' }
  11. return new UpdateChannelFixture(api, channelUpdateInput, uniquePropVal)
  12. }
  13. export default async function updateChannel(api: QueryNodeApi) {
  14. const createVideoHappyCaseFixture = createUpdateChannelHandleFixture(api)
  15. await createVideoHappyCaseFixture.runner(false)
  16. }