BioDrop icon indicating copy to clipboard operation
BioDrop copied to clipboard

[OTHER] Create basic test for every page

Open eddiejaoude opened this issue 3 years ago • 15 comments

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)

eddiejaoude avatar Apr 02 '23 09:04 eddiejaoude

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.

github-actions[bot] avatar Apr 02 '23 09:04 github-actions[bot]

Can you assign the issue to me

iamvbenz49 avatar Apr 02 '23 10:04 iamvbenz49

Sure, sign @iamvbenz49 👍

eddiejaoude avatar Apr 02 '23 10:04 eddiejaoude

Hey! @iamvbenz49 and @eddiejaoude can we collaborate on this issue?

Vishrut19 avatar Apr 04 '23 04:04 Vishrut19

@eddiejaoude i made a PR

iamvbenz49 avatar Apr 09 '23 10:04 iamvbenz49

@iamvbenz49 it would be more convenient if you added a link to the PR

eddiejaoude avatar Apr 09 '23 15:04 eddiejaoude

https://github.com/EddieHubCommunity/LinkFree/pull/5946

iamvbenz49 avatar Apr 09 '23 16:04 iamvbenz49

@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

eddiejaoude avatar Apr 11 '23 04:04 eddiejaoude

Hey! I am working on the test related to Playground Page. Link - https://github.com/EddieHubCommunity/LinkFree/issues/6019

Vishrut19 avatar Apr 12 '23 11:04 Vishrut19

@Vishrut19 please include a link to the issue in you comment above so I can update the this issue's (epic) description with it

eddiejaoude avatar Apr 12 '23 11:04 eddiejaoude

@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

Vishrut19 avatar Apr 12 '23 11:04 Vishrut19

Thank you @Vishrut19 , I have assigned the #6019 issue to you also

eddiejaoude avatar Apr 12 '23 11:04 eddiejaoude

I can take the map page also.

Vishrut19 avatar Apr 13 '23 17:04 Vishrut19

@Vishrut19 great 👍 please can you create an issue for it and mention this epic issue also

eddiejaoude avatar Apr 14 '23 03:04 eddiejaoude

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

eddiejaoude avatar Apr 18 '23 14:04 eddiejaoude