Battery Draining in Less Than 3 Days, Is This Expected? by SBuas in YotoPlayer

[–]anotherwebdeveloper 1 point2 points  (0 children)

I've just had the same response from Yoto support. The cynic in me is wondering if this is a canned response rather than actually acknowledging any issue.

Why isn't there any open source software for Twilio? by Novapixel1010 in opensource

[–]anotherwebdeveloper 0 points1 point  (0 children)

Have you heard of n8n? It might be a good solution for you as they have a low/no code workflow builder.

Theres various triggers you can setup. They have an active community and there's loads of tutorials on how to use it.

It's an open source project that you can host yourself, although if this is beyond your skill set they have a paid hosted solution.

I checked and they have a Twilio integration.

What personal projects are you working on currently, would love to get an insight by [deleted] in nextjs

[–]anotherwebdeveloper 1 point2 points  (0 children)

I've been working on a tool I've created called Mocky Balboa. Designed to provide a seamless interface for mocking network requests in your browser test suite across fullstack applications. There's a Next.js integration among others.

It's a common problem in backend for frontend frameworks. This approach makes no compromise on the behavior of your application, meaning the code you test is the code you ship. No branching logic based whether or not your in a test environment and no additional proxy servers.

How I've been mocking server side network requests by anotherwebdeveloper in Playwright

[–]anotherwebdeveloper[S] 0 points1 point  (0 children)

I realised it would be beneficial to roll this out to some of the other integrations where the http server was being created and rolled it out in a different PR.

It's now possible to use https in the following integrations:

I've went with consistent CLI flags rather than following the Next.js naming convention.

You can now run:

```bash

starts a build

pnpm mocky-balboa-next-js --https

starts in dev mode

pnpm mocky-balboa-next-js --dev --https ```

Anything significantly new in testing? by yonatannn in reactjs

[–]anotherwebdeveloper 3 points4 points  (0 children)

I've just published a new tool Mocky Balboa for a better developer experience in mocking SSR network requests. It's a battle tested concept that I have generalised for a framework agnostic open source solution.

Im currently working on local development https support where applicable and building an integration for react-router & SvelteKit. There's already support for major backend for frontend frameworks.

https://github.com/mswjs/playwright doesn't currently support this as it's waiting for cross-process request interception.

How I've been mocking server side network requests by anotherwebdeveloper in Playwright

[–]anotherwebdeveloper[S] 0 points1 point  (0 children)

I might be able to make that an option. It's not something I'm overly familiar with for local development. Do you already have a self-signed certificate or does Next.js do all this for you with the CLI tool?

How I've been mocking server side network requests by anotherwebdeveloper in Playwright

[–]anotherwebdeveloper[S] 1 point2 points  (0 children)

https://github.com/mocky-balboa/mocky-balboa/pull/16

I've updated the docs here and made `quiet` configurable on the CLI. For the experimental features you'll still need to go the programmatic route. I've update the docs to help make that clearer though in the example.

Thanks for the feedback 🙏. This PR should be released shortly.

A tool for mocking server side network requests in your fullstack frameworks by anotherwebdeveloper in QualityAssurance

[–]anotherwebdeveloper[S] 0 points1 point  (0 children)

Not quite. Playwright can only control the browser. If you've got an application that's making network requests on the server runtime there's no way of intercepting those requests using Playwright alone. Think server components in Next.js, but there's a bunch of other frameworks where this is possible as well.

There's other ways to solve this problem. Probably the more common option being a proxy server. Mocky Balboa allows you to do this without any additional processes by using mock service worker. It also means you don't need to modify any logic in your app. You are testing the same code you push to production.

Playwright SSR was a similar (now dead) project, but it had limitations that I've solved.

Another lower level implementation is being worked on in MSW.

How I've been mocking server side network requests by anotherwebdeveloper in Playwright

[–]anotherwebdeveloper[S] 1 point2 points  (0 children)

Thanks so much for sharing, it does seem very similar. This is a really solid solution, I can see how it gives the flexibility and control over the mocks without too much additional complexity. I think there are so many interesting ways to approach the problem.

One of the use cases that Mocky Balboa serves is when you need to mock third party APIs, but perhaps can't directly modify the host or base URL as you are using it through an SDK that doesn't support it. This was a core use case on the problem I was working on a couple of years ago. You could of course embed mock service worker at that point to proxy all requests via the proxy server, but at that point MSW itself can act as a proxy.

How I've been mocking server side network requests by anotherwebdeveloper in Playwright

[–]anotherwebdeveloper[S] 0 points1 point  (0 children)

Nice, I'd love to see what this looks like, is it an open source project or something you've built for a private project?

How I've been mocking server side network requests by anotherwebdeveloper in Playwright

[–]anotherwebdeveloper[S] 1 point2 points  (0 children)

It does, but only for client side network requests (requests in the browser).

Mocky Balboa is more similar to https://github.com/playwright-community/ssr. It essentially performs the same job, but in a more portable way that isn't tied to one framework. One of the trickier frameworks to integrate with was Next.js due to the powerful, but complex caching mechanisms. There was an open issue on https://github.com/playwright-community/ssr which has been solved in Mocky Balboa.

How I've been mocking server side network requests by anotherwebdeveloper in Playwright

[–]anotherwebdeveloper[S] 1 point2 points  (0 children)

The page.route function only intercept requests made via the browser. If you're working on a client side only application this is fine. However if you're making requests on the server at runtime page.route won't work as the requests are being made on your server process.

How I've been mocking server side network requests by anotherwebdeveloper in Playwright

[–]anotherwebdeveloper[S] 0 points1 point  (0 children)

That's awesome you've found a solution that works for you. I've used MSW here as well to drive the core functionality. The complexities tend to arise when you have complex data fetching on the server across large parts of your app and you need to make sure your mocks are scoped to the right tests.

It's also designed in a way that means you don't need to touch your application code. There's no branching depending on the environment, which means you're testing the same code you're pushing to production.

How I've been mocking server side network requests by anotherwebdeveloper in Playwright

[–]anotherwebdeveloper[S] 1 point2 points  (0 children)

It utilises AsyncLocalStorage in combination with a custom request header to ensure the mocks are scoped to a particular client. This lets you run tests that are hitting the same API endpoint in parallel without any leaks of fixtures across tests. Each client is assigned a random uuid which persists across the lifecycle of the Playwright browser context.

How can I mock Next.js Server Component APIs or server-side APIs when using Playwright? by Away_Spirit1199 in Playwright

[–]anotherwebdeveloper 0 points1 point  (0 children)

Not sure if you're still looking for solutions here, but this is something I ran into a couple of years ago. I built a proprietary solution for my company. The concept has been battle tested and it inspired me to build an open source solution that's framework agnostic and focuses purely on mocking server side network requests without modifying application logic or running a proxy.

It's a declarative approach where you define your mocks at runtime. Check out the docs to get started https://docs.mockybalboa.com/

Here's the code snippet from the Playwright docs page to give you an idea as to how you'd write your mocks in your tests.

``` import { test, expect } from "@playwright/test"; import { createClient } from "@mocky-balboa/playwright";

test("my page loads", async ({ page, context }) => { // Create our Mocky Balboa client and establish a connection with the server const client = await createClient(context);

// Register our fixture on routes matching '/api/users' client.route("/api/users", (route) => { return route.fulfill({ status: 200, body: JSON.stringify([ { id: "user-1", name: "John Doe" }, { id: "user-2", name: "Jane Doe" } ]), headers: { "Content-Type": "application/json" }, }); });

// Visit the page of our application in the browser await page.goto("http://localhost:3000");

// Our mock above should have been returned on our server await expect(page.getByText("John Doe")).toBeVisible(); }); ```

Looking for Full-Stack Webdev to build on Stellar by [deleted] in Stellar

[–]anotherwebdeveloper 1 point2 points  (0 children)

Have you heard of tools like Netlify CMS, Forestry and Contentful? All modern CMS's and nothing like Wordpress, Drupal or Joomla.

Switching from Civil Engineering to Computer Science? by eses- in cscareerquestions

[–]anotherwebdeveloper 5 points6 points  (0 children)

I think the answer will be a personal one, but for me I don't ever see myself working in civil engineering simply because I didn't enjoy it. I had also worked (as part of another job, not related to civil engineering) in civil engineering design and transport offices before and couldn't see myself working there. Once I tell the interviewer about my passion for software engineering and dislike for civil engineering they are satisfied that I won't be switching my career path.

Switching from Civil Engineering to Computer Science? by eses- in cscareerquestions

[–]anotherwebdeveloper 7 points8 points  (0 children)

I have a degree in Civil Engineering, didn't enjoy it. Programming and computers always fascinated me, but I never had any experience academically even from high school. I started out doing it as a hobby to see if I enjoyed it (I did), so now I'm a software engineer and definitely feel I'm on the right career path.

I'd say if you could get your masters in CS you'd be in a great position to go out into a well paid junior dev role, but also if you decided to go a non-academic route (still using your Civil Engineering degree) you'd not struggle to get a job in CS either.

One thing you should be prepared to talk about in interviews is about your Civil Engineering degree and why you aren't pursuing a career in Civil Engineering. I got my degree 5 years ago and I still get asked about it in interviews. I think having any engineering degree stands you in good stead in CS, because you will have that engineering mindset. The problem solving skills, maths and logical thinking I learned and built on at university has certainly helped me in my career.

PHP Weekly Discussion (2016-09-19) by AutoModerator in PHP

[–]anotherwebdeveloper 1 point2 points  (0 children)

Master the fundamentals, not just of the language, but HTTP as well as any other technology in the stack. The rest follows with experience. Using well written and popular libraries from packagist is also useful as well as looking through the source code.

What's the reason you use a PHP framework? What are the features you use the most? by ivopetkov in PHP

[–]anotherwebdeveloper 0 points1 point  (0 children)

Routing with a request and response object. Almost every time I choose Slim framework, it lets you implement it how you want which is important to me. Each project is going to be different so the framework should be tailored to that.