Create stories for layout testing (#2722)

* Inject services with useContext

* Extract service for video settings

* Create mock factories for services

* Create test data for chat history

* Add story to visualize different layouts

* Fix renaming mistake

* Add landscape and portrait viewports

* Add landscape stories

---------

Co-authored-by: Gabe Kangas <gabek@real-ity.com>
This commit is contained in:
Michael David Kuckuk
2023-02-27 01:54:28 +01:00
committed by GitHub
parent f0f9c2ced1
commit b38df2fbe3
14 changed files with 428 additions and 25 deletions

View File

@@ -0,0 +1,18 @@
import { ChatMessage } from '../interfaces/chat-message.model';
import { ChatStaticService, UserRegistrationResponse } from './chat-service';
export const chatServiceMockOf = (
chatHistory: ChatMessage[],
userRegistrationResponse: UserRegistrationResponse,
): ChatStaticService =>
class ChatServiceMock {
public static async getChatHistory(): Promise<ChatMessage[]> {
return chatHistory;
}
public static async registerUser(): Promise<UserRegistrationResponse> {
return userRegistrationResponse;
}
};
export default chatServiceMockOf;