This file contains hidden or 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
| /** | |
| * Playwright Socket.io WebSocket Mock | |
| * | |
| * A reusable utility for mocking Socket.io WebSocket connections in Playwright E2E tests. | |
| * Fully mocks the connection without hitting a real server - handles Engine.IO/Socket.io | |
| * protocol handshakes so the browser client thinks it's connected. | |
| * | |
| * Usage: | |
| * const mock = createWebSocketMock(); | |
| * await mock.setup(page, /your-ws-pattern/); |
This file contains hidden or 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
| /** | |
| * Playwright Socket.io WebSocket Mock | |
| * | |
| * A reusable utility for mocking Socket.io WebSocket connections in Playwright E2E tests. | |
| * Fully mocks the connection without hitting a real server - handles Engine.IO/Socket.io | |
| * protocol handshakes so the browser client thinks it's connected. | |
| * | |
| * Usage: | |
| * const mock = createWebSocketMock(); | |
| * await mock.setup(page, /your-ws-pattern/); |
This file contains hidden or 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
| import { Page, WebSocketRoute } from '@playwright/test'; | |
| /** | |
| * A reusable WebSocket mock for Playwright tests. | |
| * Fully mocks Socket.io connections without connecting to the real server. | |
| */ | |
| class WebSocketMock { | |
| private wsRoute: WebSocketRoute | null = null; | |
| private pingInterval: ReturnType<typeof setInterval> | null = null; |
This file contains hidden or 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
| /* | |
| * Copyright 2024 Collate. | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * Unless required by applicable law or agreed to in writing, software | |
| * distributed under the License is distributed on an "AS IS" BASIS, | |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| * See the License for the specific language governing permissions and |
This file contains hidden or 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
| /* | |
| * Copyright 2024 Collate. | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * Unless required by applicable law or agreed to in writing, software | |
| * distributed under the License is distributed on an "AS IS" BASIS, | |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| * See the License for the specific language governing permissions and |
This file contains hidden or 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
| import React, { Component } from "react"; | |
| import { Query } from "react-apollo"; | |
| import { GET_ALL_TODOS } from "../queries"; | |
| import MarkTodo from "./MarkTodo"; | |
| import DeleteTodo from "./DeleteTodo"; | |
| import { | |
| ListGroup, | |
| ListGroupItem, | |
| ButtonGroup, | |
| Grid, |
This file contains hidden or 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
| import React, { Component } from "react"; | |
| import { Mutation } from "react-apollo"; | |
| import { DELETE_TODO, GET_INCOMPLETE_TODOS, GET_ALL_TODOS } from "../queries"; | |
| import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; | |
| import { faTimes } from "@fortawesome/free-solid-svg-icons"; | |
| import { Button } from "react-bootstrap"; | |
| class DeleteTodo extends Component { | |
| constructor(props) { | |
| super(props); |
This file contains hidden or 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
| import React, { Component } from "react"; | |
| import { | |
| MARK_TODO_COMPLETE, | |
| GET_INCOMPLETE_TODOS, | |
| GET_ALL_TODOS | |
| } from "../queries"; | |
| import { Mutation } from "react-apollo"; | |
| import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; | |
| import { faCheck } from "@fortawesome/free-solid-svg-icons"; | |
| import { Button } from "react-bootstrap"; |
This file contains hidden or 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
| import React from "react"; | |
| import { Query } from "react-apollo"; | |
| import { GET_INCOMPLETE_TODOS } from "../queries"; | |
| import MarkTodo from "./MarkTodo"; | |
| import DeleteTodo from "./DeleteTodo"; | |
| import AddTodos from "./AddTodo"; | |
| import { | |
| ListGroup, | |
| ListGroupItem, | |
| ButtonGroup, |
This file contains hidden or 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
| import gql from "graphql-tag"; | |
| export const GET_ALL_TODOS = gql` | |
| { | |
| todos { | |
| todo_id | |
| todo_text | |
| todo_completed | |
| todo_user | |
| } |
NewerOlder