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

feat: Add External Portals to E2E ui-driven tests #4005

Merged
merged 17 commits into from
Dec 2, 2024
Merged

Conversation

RODO94
Copy link
Contributor

@RODO94 RODO94 commented Nov 25, 2024

What does this PR do?

This PR adds the External Portal component to the ui-driven end to end testing. This required adding another flow to the create-flow.spec so that it could be added properly and adjusting how flows are handled in context. If have separated out the flows so we have flow which is intended to be the main one, then externalPortalFlow which is intended to only be for creating an External Portal. I found mainFlow, targetFlow, parentFlow unnecessary and making externalPortalFlow felt more explicit and easy to understand what it is

I also set up some test fixes on flaky parts of the test and added helpers to simplify the process of publishing, turning a service online, and navigating between services.

Copy link

github-actions bot commented Nov 25, 2024

Removed vultr server and associated DNS entries

@RODO94 RODO94 force-pushed the rory/e2e-ext-portals branch from 9ccf42f to 551aae8 Compare November 27, 2024 10:24
@RODO94 RODO94 marked this pull request as ready for review November 27, 2024 10:25
@RODO94 RODO94 requested a review from a team November 27, 2024 10:25
Copy link
Contributor

@jamdelion jamdelion 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 questions and suggestions from me, mainly to improve readability/consistency. But nothing blocking so feel free to follow up in a separate PR if you like! 💪

Copy link
Contributor

@DafyddLlyr DafyddLlyr left a comment

Choose a reason for hiding this comment

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

Some great comments here by @jamdelion 🙌

Great to see this being tested, a few comments to do with how context is handled - we should probably aim to keep this simple with a single flow if possible. Very open to thoughts here!

e2e/tests/ui-driven/src/helpers/context.ts Outdated Show resolved Hide resolved
e2e/tests/ui-driven/src/helpers/context.ts Outdated Show resolved Hide resolved
e2e/tests/ui-driven/src/helpers/globalHelpers.ts Outdated Show resolved Hide resolved
e2e/tests/ui-driven/src/create-flow.spec.ts Outdated Show resolved Hide resolved
e2e/tests/ui-driven/src/helpers/context.ts Outdated Show resolved Hide resolved
@RODO94
Copy link
Contributor Author

RODO94 commented Nov 29, 2024

2 similar comments
@RODO94
Copy link
Contributor Author

RODO94 commented Nov 29, 2024

@RODO94
Copy link
Contributor Author

RODO94 commented Nov 29, 2024

@RODO94 RODO94 force-pushed the rory/e2e-ext-portals branch from 7f0d982 to 80bf6a1 Compare November 29, 2024 14:52
separate out types and service data

lint fix
@RODO94 RODO94 force-pushed the rory/e2e-ext-portals branch from 80bf6a1 to eee94ee Compare November 29, 2024 14:54
Copy link
Contributor

@DafyddLlyr DafyddLlyr left a comment

Choose a reason for hiding this comment

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

One small tidy up around redundant functions and we're good to go here, last round of changes look good 👍

e2e/tests/ui-driven/src/helpers/context.ts Show resolved Hide resolved
e2e/tests/ui-driven/src/helpers/types.ts Show resolved Hide resolved
data?: object;
}

export interface TestContext {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I'm not sure if TestContext is really much clearer or better than Context here when we're entirely within Playwright tests.

Not a strongly held opinion - was there a motivation for this change? Classes with BrowserContext maybe?

Copy link
Contributor Author

@RODO94 RODO94 Dec 2, 2024

Choose a reason for hiding this comment

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

I can't fully remember why, but it did come out of some frustration with the generalised context. Might have been to help express that as a Type it was generated within the Test so it is test specific, rather than bringing it in from external Types. If that makes sense?

@RODO94 RODO94 requested a review from DafyddLlyr December 2, 2024 12:44
Copy link
Contributor

@DafyddLlyr DafyddLlyr left a comment

Choose a reason for hiding this comment

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

Great! ✅

@RODO94 RODO94 merged commit 747db39 into main Dec 2, 2024
12 checks passed
@RODO94 RODO94 deleted the rory/e2e-ext-portals branch December 2, 2024 14:14
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.

3 participants