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

First setup for Tools E2E tests #996

Merged
merged 70 commits into from
Oct 16, 2023
Merged

First setup for Tools E2E tests #996

merged 70 commits into from
Oct 16, 2023

Conversation

Ghislain89
Copy link
Contributor

@Ghislain89 Ghislain89 commented Oct 5, 2023

This PR adds

  • Shared Playwright Configuration, to be consumed in dApps
  • E2E tests with limited mocking for tools dApp.
  • Shared Page Objects for re-usable components.
  • GitHub Actions for these tests

@changeset-bot
Copy link

changeset-bot bot commented Oct 5, 2023

🦋 Changeset detected

Latest commit: ac99ec0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Oct 5, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

5 Ignored Deployments
Name Status Preview Comments Updated (UTC)
alpha-docs ⬜️ Ignored (Inspect) Visit Preview Oct 16, 2023 11:11am
docs-storybook ⬜️ Ignored (Inspect) Visit Preview Oct 16, 2023 11:11am
immutable-records ⬜️ Ignored (Inspect) Visit Preview Oct 16, 2023 11:11am
react-ui ⬜️ Ignored (Inspect) Visit Preview Oct 16, 2023 11:11am
tools ⬜️ Ignored (Inspect) Visit Preview Oct 16, 2023 11:11am

? process.env.PLAYWRIGHT_BASE_URL
: 'http://127.0.0.1:3000',
channel: 'chromium',
trace: `retain-on-failure`,
Copy link
Member

Choose a reason for hiding this comment

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

nitpick, can be without backticks

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed.

webServer: {
command: `pnpm --filter ${process.env.TESTOBJECT} run start`,
url: 'http://127.0.0.1:3000',
reuseExistingServer: !process.env.CI,
Copy link
Member

Choose a reason for hiding this comment

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

What happens when this is an empty string? For clarity could be process.env.CI === undefined

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Empty string assume false, but i'll change it either way to make it more clear.

@@ -0,0 +1,18 @@
import type { Page } from '@playwright/test';

export default class MockHelper {
Copy link
Member

Choose a reason for hiding this comment

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

Can we use named exports, for easy importing and maintainability

@@ -0,0 +1,15 @@
import type { Locator, Page } from '@playwright/test';

export default class NavHeaderComponent {
Copy link
Member

Choose a reason for hiding this comment

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

Can we use named exports, for easy importing and maintainability

@@ -0,0 +1,19 @@
import type { Locator, Page } from '@playwright/test';

export default class NotificationContainerComponent {
Copy link
Member

Choose a reason for hiding this comment

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

Can we use named exports, for easy importing and maintainability

@@ -0,0 +1,13 @@
import type { Page } from '@playwright/test';

export default class AsideComponent {
Copy link
Member

Choose a reason for hiding this comment

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

Can we use named exports, for easy importing and maintainability

Comment on lines 6 to 8
export default class ToolsHeaderComponent extends NavHeaderComponent {
public networkCard: CardComponent;

Copy link
Member

Choose a reason for hiding this comment

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

Can we use named exports, for easy importing and maintainability

(Applies to all the others as well. I stopped adding the comment from here)

"extends": "./node_modules/@kadena-dev/heft-rig/tsconfig-base.json",
"compilerOptions": {
"types": ["node"],
"rootDir": "./",
Copy link
Member

Choose a reason for hiding this comment

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

Why we wouldn't have src as rootDir?

Copy link
Contributor Author

@Ghislain89 Ghislain89 Oct 16, 2023

Choose a reason for hiding this comment

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

It wasn't the rootrdir before. Good Catch.

@Ghislain89 Ghislain89 merged commit 672bd89 into main Oct 16, 2023
9 checks passed
@Ghislain89 Ghislain89 deleted the test/e2e-tools branch October 16, 2023 11:44
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