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(text-field): add screenshot tests using reusable test code #956

Merged

Conversation

max-umain
Copy link
Collaborator

@max-umain max-umain commented Dec 20, 2024

Describe pull-request

Adds screenshot tests for text-field in lightmode and darkmode, using the reusable test code.

Issue Linking:

How to test

  1. Run npm run test
  2. Visually inspect the files generated by the tests

Checklist before submission

  • I have added unit tests for my changes (if applicable)
  • All existing tests pass
  • I have updated the documentation (if applicable)
  • Not breaking production behavior
  • Behavior available in storybook with documented descriptions (if applicable)
  • npm run build-all without errors

Suggested test steps

  • Browser testing (Chrome, Safari, Firefox)
  • Keyboard operability
  • Interactive elements have labels.
  • Storybook controls
  • Design/controls/props is aligned with other components
  • Dark/light mode and variants
  • Input fields – values should be displayed properly
  • Events

Screenshots

Not applicable

Additional context

For one of the tests in read-only-success, the color of an element is checked. This doesn't work when the mode or mode variant changes, because that also changes the color. So, I simply skip that test now when we have a configuration. Let me know if this should be handled for all modes and mode variants.

Copy link
Contributor

github-actions bot commented Dec 20, 2024

Playwright test results

passed  539 passed
skipped  1 skipped

Details

stats  540 tests across 146 suites
duration  1 minute, 12 seconds
commit  6b11c6c

Skipped tests

src/components/table/table/test/expandable-row-autocollapse/expandable-row-autocollapse.e2e.ts › tds-table-expandable-row-autoCollapse › NEEDS FIXING: expanding one row collapses the others when autoCollapse is true

Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-956.d3fazya28914g3.amplifyapp.com

@max-umain max-umain force-pushed the test/text-field-new-screenshot-tests branch from 83691c4 to 6b11c6c Compare December 20, 2024 13:28
@max-umain max-umain changed the base branch from develop to test/reusable-code-for-tests December 20, 2024 13:29
Copy link
Contributor

@nathalielindqvist nathalielindqvist left a comment

Choose a reason for hiding this comment

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

This component has multiple renditions of primary light mode tests, should we adress it?

@max-umain max-umain force-pushed the test/text-field-new-screenshot-tests branch from c8180c4 to eeebf92 Compare January 14, 2025 15:12
@ckrook ckrook merged commit 0f0622b into test/reusable-code-for-tests Jan 15, 2025
2 checks passed
@ckrook ckrook deleted the test/text-field-new-screenshot-tests branch January 15, 2025 13:39
max-umain added a commit that referenced this pull request Jan 28, 2025
* test: add testConfiguration file with reusable test code

* test: change testConfiguration function parameter name

* test: remove undefined test configuration from testConfiguration.ts

* test: improve setupPage and getTestDescribeText

* test(tooltip): add screenshot tests using reusable test code (#960)

* test(tooltip): use reusable test code for lightmode and darkmode screenshot tests

* test(tooltip): move non-screenshot tests to not run for all style configurations

* test(toggle): add screenshot tests using reusable test code (#959)

* test(toggle): add screenshot tests using reusable test code

* test(toggle): move non-screenshot tests to not run for all style configurations

* test(toggle): remove old screenshots

* test(slider): add screenshot tests using reusable test code (#953)

* test(toast): add screenshot tests using reusable test code (#958)

* test(textarea): add screenshot tests using reusable test code (#957)

* test(text-field): add screenshot tests using reusable test code (#956)

* test(side-menu): add screenshot tests using reusable test code (#952)

* test(radio-button): add screenshot tests using reusable test code (#951)

* test(popover menu): add screenshot tests using reusable test code (#950)

* test(popover-canvas): add screenshot tests using reusable test code (#949)

* test(message): add screenshot tests using reusable test code (#948)

* test(chip): add screenshot tests using reusable test code (#947)

* test(link): add screenshot tests using reusable test code (#946)

* test(header): add screenshot tests using reusable test code (#945)

* test(footer): add screenshot tests using reusable test code (#944)

* test(dropdown): improved and added more screenshot tests with reusable test code (#943)

* test(datetime): update and improve lightmode and darkmode screenshot tests, with reusable test code (#942)

* test(checkbox): more and improved screenshot tests using reusable test code (#941)

* test(card): use reusable test code for lightmode and darkmode screenshot tests (#940)

* test(button): new and improved screenshot tests with reusable test code (#938)

* test(breadcrumbs): improved screenshot tests with reusable code (#937)

* test(banner): improved and more screenshot tests with reusable code (#936)

* test(accordion): more screenshot tests with reusable code (#935)

* test(tabs): add screenshot tests using reusable test code (#955)

* test(table): add screenshot tests using reusable test code (#954)

* test: make testConfiguration.ts more general

* test(stepper): add screenshot tests using reusable test code (#971)

* test(modal): add screenshot tests using reusable test code (#970)

* test(divider): add screenshot tests using reusable test code (#969)

* test(block): add screenshot tests using reusable test code (#968)

* test(spinner): add screenshot tests using reusable test code (#972)

* test(dropdown): update screenshots
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants