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

Basic Cypress configuration #667

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Basic Cypress configuration #667

wants to merge 1 commit into from

Conversation

justinorringer
Copy link
Contributor

Description

Cypress configuration started in notifications drawer refactor

RHCLOUDXXXX


Screenshots

Before:

After:


Checklist ☑️

  • PR only fixes one issue or story
  • Change reviewed for extraneous code
  • UI best practices adhered to
  • Commits squashed and meaningfully named
  • All PR checks pass locally (build, lint, test, E2E)

  • (Optional) QE: Needs QE attention (OUIA changed, perceived impact to tests, no test coverage)
  • (Optional) QE: Has been mentioned
  • (Optional) UX: Needs UX attention (end user UX modified, missing designs)
  • (Optional) UX: Has been mentioned

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.30%. Comparing base (a00862a) to head (930c9b1).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #667   +/-   ##
=======================================
  Coverage   91.30%   91.30%           
=======================================
  Files           3        3           
  Lines          23       23           
=======================================
  Hits           21       21           
  Misses          2        2           

justinorringer added a commit that referenced this pull request Jan 28, 2025
Copy link

@jjaquish jjaquish left a comment

Choose a reason for hiding this comment

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

Commented on some issues I saw and found running locally. Another note is I think you'll need a component.ts file in the support folder, or specify somehow that there won't be one

}
});
require('@cypress/code-coverage/task')(on, config);
config.port = 8002;
Copy link

Choose a reason for hiding this comment

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

Any reason we're insisting on 8002 here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

None that I have, copy pasted that part! I'll try it out after the drawer move gets finished

launchOptions.preferences.height = 720;
}
});
require('@cypress/code-coverage/task')(on, config);
Copy link

Choose a reason for hiding this comment

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

I believe this is gonna need to be added to package


export default defineConfig({
component: {
specPattern: 'cypress/component/**/*.cy.{js,jsx,ts,tsx}',
Copy link

Choose a reason for hiding this comment

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

I think you'll need to change this to components or change the folder to component

@@ -0,0 +1,244 @@
import React, { useEffect, useRef, useState } from 'react';
import { BrowserRouter } from 'react-router-dom';
import DrawerPanel from '../../src/components/NotificationsDrawer/DrawerPanel';
Copy link

Choose a reason for hiding this comment

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

Hitting an error here. Does this exist as declared?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey! This is the component we are refactoring to this repo (and why Bryan and I added cypress tests here). PR for that #661

justinorringer added a commit that referenced this pull request Feb 17, 2025
Hyperkid123 added a commit that referenced this pull request Feb 20, 2025
* working prototype

* working base; missing refs

* modify panelRef

* Passing toggle down and using it onClose()

* webpack/cypress files

* Testing stuff

* mock useChrome function (not working)

* Fix component tests

* Prettier fixes

* disable disallow-fec-relative-imports eslint

* Cypress cleanup

* Remove cypress configuration (drafted #667)

* Moving test data to __test__

* Extra function body suggestion

* Various formatting changes

* EmptyNotifications to its own file

* Swapping jotai to redux

* Drafted singleton class

* Replacing nested function

* Changed to generic getDateDaysAgo

* Uninstalling jotai

* Moved dropdown components to a different file

* Accidentally removed existing cypress import

* WIP module nonsense

* Debugging shared scope obj

* Get unreadnotif

* Finally working with JSclients and exposing var in scope and context as fed mod

* Its working

* Removing context provider

* Using JS Client

* Moving bell to notifications

* Exposing DrawerBell

* Removing unused test file

---------

Co-authored-by: Blake Holifield <[email protected]>
Co-authored-by: Justin Orringer <[email protected]>
Co-authored-by: Bryan Florkiewicz <[email protected]>
Co-authored-by: Martin Marosi <[email protected]>
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