[OTHER] Create basic test for every page
What would you like to share?
The goal of this issue is to have a test file and test to navigate to each page, and that checks the page loads correctly with the heading with no error (some pages might be covered already, please check)
- [x] home
- [x] profile (
eddiejaoude) and click on each tab - [x] search
- [ ] events https://github.com/EddieHubCommunity/LinkFree/pull/6187
- [x] map ~~https://github.com/EddieHubCommunity/LinkFree/issues/6064~~ https://github.com/EddieHubCommunity/LinkFree/pull/6084
- [ ] docs https://github.com/EddieHubCommunity/LinkFree/pull/6187
- [x] playground https://github.com/EddieHubCommunity/LinkFree/issues/6019
note: this issue does not have to do all the pages, but as I think they will be all very similar, it makes sense to do it in 1 PR
Example...
test("Footer link goes to GitHub", async ({ page }) => {
await page.goto("/");
const getFooter = page.getByText("Powered by EddieHub");
await getFooter.click();
await expect(page).toHaveURL(/github/);
await expect(page.locator("h1")).toHaveText(GitHub);
});
Every test file should have this check at the end...
test("should pass axe wcag accessibility tests", async ({ page }) => {
await page.goto("/");
const accessibilityScanResults = await new AxeBuilder({ page })
.withTags(["wcag2a", "wcag2aa", "wcag21a", "wcag21aa"])
.analyze();
expect(accessibilityScanResults.violations).toEqual([]);
});
tests files should be the same file structure as in pages
Additional information
NOT for this issue but a note for later
- [ ] account page tests (authentication required, need a way to mock that)
It's great having you contribute to this project
Welcome to the community :nerd_face:If you would like to continue contributing to open source and would like to do it with an awesome inclusive community, you should join our Discord chat and our GitHub Organisation - we help and encourage each other to contribute to open source little and often 🤓 . Any questions let us know.
Can you assign the issue to me
Sure, sign @iamvbenz49 👍
Hey! @iamvbenz49 and @eddiejaoude can we collaborate on this issue?
@eddiejaoude i made a PR
@iamvbenz49 it would be more convenient if you added a link to the PR
https://github.com/EddieHubCommunity/LinkFree/pull/5946
@iamvbenz49 it would be more convenient if you added a link to the PR
#5946
@iamvbenz49 I mean in the PR itself
Hey! @iamvbenz49 and @eddiejaoude can we collaborate on this issue?
@Vishrut19 I think this would be a good idea 👍 , I do suggest this issue is split per page, so please create an issue for the one pages you would like to do, and then create a PR for that page
I will convert this issue to an epic, and we can then assign the new issues for each page and get them merged sooner
Hey! I am working on the test related to Playground Page. Link - https://github.com/EddieHubCommunity/LinkFree/issues/6019
@Vishrut19 please include a link to the issue in you comment above so I can update the this issue's (epic) description with it
@Vishrut19 please include a link to the issue in you comment above so I can update the this issue's (epic) description with it
Done
Thank you @Vishrut19 , I have assigned the #6019 issue to you also
I can take the map page also.
@Vishrut19 great 👍 please can you create an issue for it and mention this epic issue also
This issue seems covered now and also there are more improvements regarding dark mode happening - there are some failing tests in this PR any help appreciated https://github.com/EddieHubCommunity/LinkFree/pull/5992