hipsterbrown / adonis-realworld-example-app Goto Github PK
View Code? Open in Web Editor NEWReal World App implementation using AdonisJS
Real World App implementation using AdonisJS
Hey guys ๐
I really wanted to check out the app and how the testing is done with playwright and it is really well done.
However, when I try to execute the tests all tests fail. Below is one example..
FAILED
total : 20
failed : 20
duration : 7s
page.goto: NS_ERROR_CONNECTION_REFUSED
=========================== logs ===========================
navigating to "http://0.0.0.0:55997/profiles/TestPerson", waiting until "load"
============================================================
at Object.executor tests/e2e/profiles/show.spec.ts:33
28| article.with('profile', 1, (profile) => profile.with('user'))
29| )
30| .merge({ profileId: profile.id })
31| .createMany(3)
32|
โฏ 33| await page.goto(route('profiles.show', profile))
34| let screen = await getScreen()
35|
36| assert.exists(await screen.findByRole('heading', { level: 1, name: 'TestPerson' }))
37| assert.exists(await screen.findByText('I am a test person'))
38| assert.exists(await screen.findByRole('link', { name: 'My Articles' }))
โ logged in user does not see follow button on their profile
Pretty much followed all the set up steps to the T.
What am I missing? :)
Windows 11
NPM v - 8.5.1
node v - 17.6.0
Inspired by this recent web.dev post, it would be good to demonstrate solid a11y practices by ensuring a good experience around the various navigation areas of the app: top nav bar in the layout template, tabs on articles/index and profiles/show views, pagination on articles/index
To help other folks using Japa write end-to-end tests, the custom plugin code found in tests/bootstrap.ts
should be abstracted into its own AdonisJS-specific (or general Japa) plugin. Japa plugin docs
Right now authenticating a user in the end-to-end tests relies on stepping through the actual login flow. It should be faster and more efficient to provide test bindings with the @adonisjs/auth
provider as demonstrated here: https://github.com/adonisjs/auth/blob/master/src/Bindings/Tests.ts#L35-L42
That would allow the Japa plugin to abstracted more easily while still providing the easy login
macro in the tests.
Each step should be a separate job in a single workflow file (possibly after a cached pnpm install
step).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.