This repository has been archived by the owner on May 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show youtube redirect when no playable video
- Loading branch information
Showing
12 changed files
with
116 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// | ||
// VideoBlockViewControllerTests.swift | ||
// edX | ||
// | ||
// Created by Akiva Leffert on 3/15/16. | ||
// Copyright © 2016 edX. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
@testable import edX | ||
|
||
class VideoBlockViewControllerTests : SnapshotTestCase { | ||
|
||
func testSnapshotYoutubeOnly() { | ||
// Create a course with a youtube video | ||
let summary = OEXVideoSummary(videoID: "some-video", name: "Youtube Video", encodings: [ | ||
"youtube": OEXVideoEncoding(name: "youtube", URL: "https://some-youtube-url", size: 12)]) | ||
let outline = CourseOutline(root: "root", blocks: [ | ||
"root" : CourseBlock(type: CourseBlockType.Course, children: ["video"], blockID: "root", name: "Root", multiDevice: true, graded: false), | ||
"video" : CourseBlock(type: CourseBlockType.Video(summary), children: [], blockID: "video", name: "Youtube Video", multiDevice: true, graded: false) | ||
]) | ||
|
||
let environment = TestRouterEnvironment() | ||
environment.mockCourseDataManager.querier = CourseOutlineQuerier(courseID: "some-course", outline: outline) | ||
|
||
let videoController = VideoBlockViewController(environment: environment, blockID: "video", courseID: "some-course") | ||
inScreenNavigationContext(videoController) { | ||
assertSnapshotValidWithContent(videoController.navigationController!) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters