Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connect to AI Service #3077

Open
wants to merge 3 commits into
base: feature/horizon
Choose a base branch
from

Conversation

reabbotted
Copy link

To test this, just tap the AI button on the home screen and type in a message.

@reabbotted reabbotted changed the title Clx 348 i os connect to ai service Connect to AI Service Jan 22, 2025
@inst-danger
Copy link
Contributor

Fails
🚫

Please add a release note. If no release note is wanted, use none. Example: release note: Fixed a bug that prevented users from enjoying the app.

🚫

Please add which apps this change affects. Example: affects: Teacher, Student or affects: none

🚫

Please add a reference to a Jira ticket. For example: refs: MBL-10023

🚫 Build failed, skipping coverage check
❌ XCTest failed: CoreTests/AssignmentCellViewModelTests/testSubmissionStatusAndIconAndColor
XCTAssertEqual failed: ("#6a7883") is not equal to ("#697783")
XCTAssertEqual failed: ("#03893d") is not equal to ("#03893c")
❌ XCTest failed: CoreTests/DiscussionDetailsViewControllerTests/testAutomaticRead
Asynchronous wait failed: Exceeded timeout of 9 seconds, with unfulfilled expectations: "Expect predicate `runningCount == 0` for object <_TtCC9CoreTests36DiscussionDetailsViewControllerTests11MockWebView: 0x105808200; frame = (0 0; 375 100); opaque = NO; backgroundColor = <UIDynamicCatalogColor: 0x6000023835c0; name = backgroundLightest>; layer = <CALayer: 0x600000718f60>>".
XCTAssertNotNil failed
Asynchronous wait failed: Exceeded timeout of 9 seconds, with unfulfilled expectations: "Expect predicate `runningCount == 0` for object <_TtCC9CoreTests36DiscussionDetailsViewControllerTests11MockWebView: 0x105808200; frame = (0 0; 375 100); opaque = NO; backgroundColor = <UIDynamicCatalogColor: 0x6000023835c0; name = backgroundLightest>; layer = <CALayer: 0x600000718f60>>".
Asynchronous wait failed: Exceeded timeout of 9 seconds, with unfulfilled expectations: "Expect predicate `runningCount == 0` for object <_TtCC9CoreTests36DiscussionDetailsViewControllerTests11MockWebView: 0x105808200; frame = (0 0; 375 100); opaque = NO; backgroundColor = <UIDynamicCatalogColor: 0x6000023835c0; name = backgroundLightest>; layer = <CALayer: 0x600000718f60>>".
❌ XCTest failed: CoreTests/DiscussionDetailsViewControllerTests/testLayout
Asynchronous wait failed: Exceeded timeout of 9 seconds, with unfulfilled expectations: "Expect predicate `runningCount == 0` for object <_TtCC9CoreTests36DiscussionDetailsViewControllerTests11MockWebView: 0x10d823000; frame = (0 0; 375 100); opaque = NO; backgroundColor = <UIDynamicCatalogColor: 0x6000023835c0; name = backgroundLightest>; layer = <CALayer: 0x600000728ca0>>".
XCTAssertTrue failed
XCTAssertTrue failed
XCTAssertTrue failed
XCTAssertTrue failed
XCTAssertTrue failed
XCTAssertTrue failed
XCTAssertTrue failed
XCTAssertTrue failed
XCTAssertTrue failed
Asynchronous wait failed: Exceeded timeout of 9 seconds, with unfulfilled expectations: "Expect predicate `runningCount == 0` for object <_TtCC9CoreTests36DiscussionDetailsViewControllerTests11MockWebView: 0x10d823000; frame = (0 0; 375 100); opaque = NO; backgroundColor = <UIDynamicCatalogColor: 0x6000023835c0; name = backgroundLightest>; layer = <CALayer: 0x600000728ca0>>".
Asynchronous wait failed: Exceeded timeout of 9 seconds, with unfulfilled expectations: "Expect predicate `runningCount == 0` for object <_TtCC9CoreTests36DiscussionDetailsViewControllerTests11MockWebView: 0x10d823000; frame = (0 0; 375 100); opaque = NO; backgroundColor = <UIDynamicCatalogColor: 0x6000023835c0; name = backgroundLightest>; layer = <CALayer: 0x600000728ca0>>".
XCTAssertTrue failed
Asynchronous wait failed: Exceeded timeout of 9 seconds, with unfulfilled expectations: "Expect predicate `runningCount == 0` for object <_TtCC9CoreTests36DiscussionDetailsViewControllerTests11MockWebView: 0x10d823000; frame = (0 0; 375 100); opaque = NO; backgroundColor = <UIDynamicCatalogColor: 0x6000023835c0; name = backgroundLightest>; layer = <CALayer: 0x600000728ca0>>".
XCTAssertTrue failed
❌ XCTest failed: CoreTests/DiscussionDetailsViewControllerTests/testShowEntry
Asynchronous wait failed: Exceeded timeout of 9 seconds, with unfulfilled expectations: "Expect predicate `runningCount == 0` for object <_TtCC9CoreTests36DiscussionDetailsViewControllerTests11MockWebView: 0x10e068e00; frame = (0 0; 375 100); opaque = NO; backgroundColor = <UIDynamicCatalogColor: 0x6000023835c0; name = backgroundLightest>; layer = <CALayer: 0x600000730200>>".
XCTAssertEqual failed: ("nil") is not equal to ("Optional("4")")
❌ XCTest failed: CoreTests/DiscussionDetailsViewControllerTests/testShowReplies
Asynchronous wait failed: Exceeded timeout of 9 seconds, with unfulfilled expectations: "Expect predicate `runningCount == 0` for object <_TtCC9CoreTests36DiscussionDetailsViewControllerTests11MockWebView: 0x10303a800; frame = (0 0; 375 100); opaque = NO; backgroundColor = <UIDynamicCatalogColor: 0x6000023835c0; name = backgroundLightest>; layer = <CALayer: 0x60000072d100>>".
XCTAssertTrue failed
XCTAssertTrue failed
❌ XCTest failed: CoreTests/DiscussionDetailsViewControllerTests/testStudentGroupTopic
Asynchronous wait failed: Exceeded timeout of 9 seconds, with unfulfilled expectations: "Expect predicate `runningCount == 0` for object <_TtCC9CoreTests36DiscussionDetailsViewControllerTests11MockWebView: 0x10e06f000; frame = (0 0; 375 100); opaque = NO; backgroundColor = <UIDynamicCatalogColor: 0x6000023835c0; name = backgroundLightest>; layer = <CALayer: 0x600000730bc0>>".
XCTAssertTrue failed
XCTAssertTrue failed
XCTAssertTrue failed
❌ XCTest failed: CoreTests/DiscussionDetailsViewControllerTests/testStudentGroupTopicWhenUserNotInAGroup
Asynchronous wait failed: Exceeded timeout of 9 seconds, with unfulfilled expectations: "Expect predicate `runningCount == 0` for object <_TtCC9CoreTests36DiscussionDetailsViewControllerTests11MockWebView: 0x10e074400; frame = (0 0; 375 100); opaque = NO; backgroundColor = <UIDynamicCatalogColor: 0x6000023835c0; name = backgroundLightest>; layer = <CALayer: 0x600000731440>>".
XCTAssertTrue failed
XCTAssertTrue failed
XCTAssertTrue failed
❌ XCTest failed: CoreTests/DiscussionDetailsViewControllerTests/testTeacherGroupTopic
Asynchronous wait failed: Exceeded timeout of 9 seconds, with unfulfilled expectations: "Expect predicate `runningCount == 0` for object <_TtCC9CoreTests36DiscussionDetailsViewControllerTests11MockWebView: 0x10e075600; frame = (0 0; 375 100); opaque = NO; backgroundColor = <UIDynamicCatalogColor: 0x6000023835c0; name = backgroundLightest>; layer = <CALayer: 0x600000731cc0>>".
XCTAssertTrue failed
XCTAssertTrue failed
XCTAssertTrue failed

Generated by 🚫 dangerJS against 4b80a12

Copy link
Contributor

@szabinst szabinst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion, we should try to follow our existing patterns and

  • use Combine instead of async-await (however in the long run we should definitely evaluate it with the whole iOS team with a proper RfC)
  • use the existing API structure with API, APIRequestable
  • use the existing graphQL structure APIGraphQLRequestable

You can check:

  • GetCoursesProgressionRequest to see how a graphQL request is structured
  • StudioAPIAuthInteractor to get an idea how you could interact with an API that is not canvas

Testing:

  • If we stick to Combine, we can leverage combine-schedulers and test async behaviour like it was synchronous. Check CalendarFilterInteractorTests L102 and other places where scheduler: .immediate is used.

New target, new dependencies:

  • Any new target, dependency needs to be added to the project's yml file, in this case /canvas-ios/Horizon/project.yml and project-ci.yml so XcodeGen can generate the project file correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants