Skip to content

make route for become-a-provider #188

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

Merged
merged 6 commits into from
Nov 4, 2024
Merged

Conversation

shannonwells
Copy link
Collaborator

@shannonwells shannonwells commented Oct 29, 2024

Goal

The goal of this PR is to make a route for become-a-provider so that it's easier to navigate between the login/become provider routes and so that clicking Home takes you to the website root, i.e. main page.

I also added Playwright to test navigation and for future tests, however, I didn't add it to CI since it was starting to get further out of scope. There is a chore for it now though: #191

Closes #183

Checklist

  • PR Self-Review and Commenting
  • Tests updated
  • Tests added

How To Test the Changes

git fetch && git co feat/link-become-provider-#183
npm install
npx playwright test
npm run dev

After verifying that the Playwright tests passed:

  1. Verify that after clicking 'Become a Provider' from the main page:
    a. the browser back button takes you back home.
    b. the 'Back' link takes you back home.
    c. ... and selecting Testnet network, the 'Cancel' link takes you back home.
    d. ... and selecting Mainnet network, the 'Cancel' link takes you back home.
  2. Verify that clicking 'Home' also takes you home even if you have connected. If logged in, you should see the dashboard. If not, you should see the Connect and Become A Provider elements
  3. Verify that you can just type in /become-a-provider after the root and it shows you the Become A Provider page, and that the buttons all do what they're supposed to.

Make EmailProviderRequest's Cancel be a link to /
@shannonwells shannonwells force-pushed the feat/link-become-provider-#183 branch from 3a6c311 to c191272 Compare October 30, 2024 18:29
import ProviderLogin from '$components/ProviderLogin.svelte';
import { pageContent, PageContent } from '$lib/stores/pageContentStore';
</script>

{#if $pageContent === PageContent.Dashboard}
<Dashboard />
{:else if $pageContent === PageContent.Login}
{:else}
<ProviderLogin />
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Since it's just a link now we don't need 3 conditions.

@@ -8,28 +8,20 @@ import userEvent from '@testing-library/user-event';
globalThis.alert = () => {};

describe('CreateProvider component', () => {
const mockCancelAction = vi.fn();
Copy link
Collaborator Author

@shannonwells shannonwells Oct 31, 2024

Choose a reason for hiding this comment

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

cancelActionsand mockCancelActions all were canceled went away because now you just go back to root, as a link.

@shannonwells shannonwells marked this pull request as ready for review October 31, 2024 22:03
@shannonwells shannonwells requested a review from a team October 31, 2024 22:04
- webkit and firefox passing now for some reason
- add clicking the 'Home' button to the playwright navigation test
Copy link

@JoeCap08055 JoeCap08055 left a comment

Choose a reason for hiding this comment

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

Update Testing section of README with instructions to install necessary Playwright browsers before running tests

Copy link

@JoeCap08055 JoeCap08055 left a comment

Choose a reason for hiding this comment

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

  • Reviewed code
  • Pulled branch, ran tests & browsed locally

@shannonwells shannonwells merged commit a2315ee into main Nov 4, 2024
5 checks passed
@shannonwells shannonwells deleted the feat/link-become-provider-#183 branch November 4, 2024 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Way to directly link to the Become a Provider Path
2 participants