Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test: Certificate, Header #365

Merged
merged 4 commits into from
Mar 19, 2023
Merged

Conversation

Ririio
Copy link
Contributor

@Ririio Ririio commented Mar 17, 2023

Fixes: #251, Fixes: #173

This week, I'm creating a playwright test for the front end which includes, header, landing page and certificate

The certificate will cycle through 3 pages, and check for values that are specific for those pages
  • Request Page
    • Check if user is currently on the /certificate route
    • Check for user domain name through text
    • Expect that the title heading is Certificate
  • Loading Page
    • Check for the loading page to contain text
  • Key Page
    • Click download/clipboard buttons for private and public key
    • Catch toast pop up through heading
The header contains a hamburger state that is only visible in mobile, thus creating a new file `.mobile` to account for such instances
  • Signout Button
    • Expect to redirect to /login route when clicked
  • Card Links
    • Mobile
      • Click Hamburger Menu
      • Receive links to certificate and domain pages
      • Expect URL to either be /domain or /certificate
    • Desktop
      • Click either domain and certificate links
      • Expect URL to either be /domain or /certificate
On the landing page test we first check before starting if heading "DNS Records" and "Certificate" can be located in the `/` route
  • Card
    • Button
      • Find a button named "Manage DNS Records" or "Certificate"
      • Expect /domains or /certificate URL
    • Instruction Link
      • Look for a paragraph, and check if the paragraph contains a text: to learn more, see these instructions...
      • Expected URL when clicked /domains/instructions /certificate/instructions

We are also adding a testIgnore under playwright.config.ts to accommodate for instances where values are showing/hiding under different devices

@Ririio Ririio added the category: testing Unit tests, end to end tests label Mar 17, 2023
@Ririio Ririio added this to the Milestone 0.6 milestone Mar 17, 2023
playwright.config.ts Outdated Show resolved Hide resolved
playwright.config.ts Outdated Show resolved Hide resolved
test/e2e/login.spec.ts Outdated Show resolved Hide resolved
@Ririio Ririio changed the title Initial Commit for issue-testing Test: Certificate, Header Mar 17, 2023
@Ririio Ririio requested a review from Eakam1007 March 17, 2023 16:28
Copy link
Contributor

@Eakam1007 Eakam1007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few suggestions, but looks good

test/e2e/certificate.spec.ts Outdated Show resolved Hide resolved
test/e2e/landing-page.spec.ts Show resolved Hide resolved
test/e2e/landing-page.spec.ts Outdated Show resolved Hide resolved
test/e2e/landing-page.spec.ts Outdated Show resolved Hide resolved
test/e2e/landing-page.spec.ts Outdated Show resolved Hide resolved
test/e2e/landing-page.spec.ts Outdated Show resolved Hide resolved
test/e2e/landing-page.spec.ts Outdated Show resolved Hide resolved
test/e2e/landing-page.spec.ts Outdated Show resolved Hide resolved
test/e2e/login.spec.ts Outdated Show resolved Hide resolved
test/e2e/certificate.spec.ts Outdated Show resolved Hide resolved
test/e2e/certificate.spec.ts Outdated Show resolved Hide resolved
test/e2e/certificate.spec.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@Eakam1007 Eakam1007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@humphd humphd requested a review from Myrfion March 19, 2023 00:33
Copy link
Contributor

@Myrfion Myrfion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Ririio Ririio merged commit a580cf1 into DevelopingSpace:main Mar 19, 2023
@Ririio Ririio deleted the issue-testing branch March 19, 2023 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: testing Unit tests, end to end tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

E2E test for certificate components Create a test in regards to header page
3 participants