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/branding UI tests #1773

Open
wants to merge 88 commits into
base: main
Choose a base branch
from
Open

Feat/branding UI tests #1773

wants to merge 88 commits into from

Conversation

andrewleith
Copy link
Member

@andrewleith andrewleith commented Mar 7, 2024

Summary | Résumé

This PR adds UI tests for the branding features

Test suites

Branding settings

  • Passes a11y and HTML validation
  • Current branding can be seen
  • Current branding can be previewed

Choose GOC brandings

  • Passes a11y and HTML validation
  • Cannot submit when no selection made
  • English-first logo is saved when selected
  • French-first logo is saved when selected

Choose from pool

  • Passes a11y and HTML validation
  • No selection made
  • Branding can be previewed
  • Branding can be saved
  • Org has no logos

Preview Branding

  • Passes a11y and HTML validation
  • GOC english-first brand can be previewed
  • GOC french-first brand can be previewed
  • Custom logo can be previewed

Branding request tests

  • Passes a11y and HTML validation
  • Loads request branding page
  • Disallows submission when there is no data
  • Disallows submission when there is no image
  • Disallows submission when there is no brand name
  • Only allows pngs
  • Allows submission when all valid data provided
  • Displays branding preview
  • Rejects malicious files

whabanks and others added 3 commits March 18, 2024 17:07
- Small refactor on file name
- Added some more testids
- Started some groundwork for expanding tests on the service settings
  page
Base automatically changed from feat/self-serve-branding to main March 21, 2024 14:42

import config from "../../../../config";
import ServiceSettingsPage from "../../../Notify/Admin/Pages/ServiceSettingsPage";
import { EditBranding, BrandingSettings } from "../../../Notify/Admin/Pages/AllPages";

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused import BrandingSettings.
- Only working locally at the moment. Need to add env variables for different environments
Copy link
Member Author

@andrewleith andrewleith left a comment

Choose a reason for hiding this comment

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

A couple of changes needed for content/design changes that have occurred.

For the review pool tests, the Saves the selected custom logo test is failing and I noticed that one of the components returns all the radio options as an array and then tries to click it, perhaps you meant to select just one?

 AvailableLogoRadios: () => cy.get('input[id*="pool_branding-"]'),

whabanks and others added 5 commits March 27, 2024 13:40
Co-authored-by: Andrew <andrew.leith@cds-snc.ca>
- Added more data-testids
- Make a couple tests less reliant on page content
- Improve logging around Redis tasks
- added additional data-testid
- Add /branding page to the list of branding routes for a11y
@whabanks whabanks marked this pull request as ready for review March 27, 2024 19:52
- Since the github CI runner does not have direct access to redis, the previous method of connecting directly to redis to clear the cache is not viable.
- Use admin user to navigate to the admin panel to clear the cache when we test the review pool page for empty and non-empty lists
@amazingphilippe amazingphilippe added a11y and removed a11y labels Apr 2, 2024
Copy link

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.

None yet

3 participants