Capybara, when using #text or similar methods, typically only returns
text that is considered visible on the page. However, the definition of
"visible" depends on both the underlying driver and Capybara's
heuristics.
As such, Capybara + Cuprite consider the following rule in our
`.hidden-for-sighted` implementation's rule as "invisible":
left: -10000px
However the Primer `.sr-only` implementation is considered "visible":
clip-path: rect(0 0 0 0)
This commit updates the affected feature specs to account for this
difference in visibility detection. The tests now properly handle
screen reader only text that Capybara considers "visible" when using
Primer's `.sr-only` class instead of the custom `.hidden-for-sighted`
implementation.
* add a new helper for breadcrumb in wiki page
* set page header in destroy page
* set page header in edit page
* set page header in history and rename and edit parent pages
* change toolbar items into page header items
* add new wiki action to sub header
* remove version edit page which is not in use any more
* add export as a menu item of the header
* fix rubocup errors
* fix failing tests
* replace page header in annotate page
* replace page header in diff page
* add page header in select menu page
* fix rubocup errors
* fix errors on rename test
* fix errors on selecting items from toolbar
* fix errors on tests for child pages
* set correct permission for configure menu item
* replace page header in summary page
* replace page header in summary details page
* edit docs of sub header
* add page header in wiki new page
* remove controller and a route for edit method
* undo changes for docs of sub header
* extract header in show page into a new component
* use helper method in header component
* add wiki module to the breadcrumb
* rename page header component for wiki page
* simplify how lock and lock implemented
* extract sub header
* remove wiki title from header of history page
* fix page header in new page
* use page.find_test_selector in test
* fix failing test for summary page
* fix failing test for wiki child pages
* change the summary test
* use test selector for page header title
* undo changes for activate user in admin
* use test selector in adding editing history test
* use test selector in attachment upload test
* use test selector in child pages tests
* use test selector in wiki menu items tests
* change test selector for breadcrumbs
* extract conditions to show edit button into a method
* extract conditions to show rollback action menu item into a method
* extract conditions to show create button into a method
* fix duplicated code in test
* move show_create to the controller instead of the component
* fix showing history breadcrumbs
* fix showing table of contents breadcrumbs
* Open external links with window.open using link hook
* Handle edge case of opening an invalid url in a new page
* Use localhost in external link spec.
---------
Co-authored-by: Dombi Attila <83396+dombesz@users.noreply.github.com>
This is done, so former versions can be rolled back to. The transformation of the view object to it`s wrapped model needs to be prevented.
Once that had been achieved more indirections via content were removable.
The flaky test fixed 59eb308cbb was failing because the test was not
waiting for the attachments element to be displayed. In some other
similar tests, the code was waiting for it, and one test ever scrolled
to that element.
If code was properly factored, the above test would never have been
flaky.
This commit is an attempt to factor the interactions with the
attachments list so that the next test written using it will be reliable
by default.
Due to having a <base /> tag, links that only contains anchors break as they
reference the application base url + the anchor instead of the current page.
https://community.openproject.org/wp/46351
* [#43577] Fix drag and drop by counting drag over and leave
- https://community.openproject.org/work_packages/43577
- replace action button text for attaching files
- refactored drag and drop behaviour
- on any global dragenter increase a counter
- on any global dragleave decrease counter
- if counter is 0 -> no global dragging is happening (mouse was moved out of window)
- this way, we are independent from the order in which the DragEvents are fired by the browser (bigger differences between Firefox and Chrome)
Co-authored-by: Benjamin Bädorf <b.baedorf@openproject.com>
* Initial attachment list changes
* Merge attachment list and uploads
* Move upload mechanisms to op-attachment
* Refactoring attachment styles
* Fix state handling of attachments
* Drag and drop works
* Improve drop zone styles
* Small style improvement
* Remove debug log
* Finished wiki attachments upload spec
* Attachments upload spec for forum works
* Add feature spec for document drag & drop
* Add feature spec for budget attachment drag & drop
* Add feature spec for workpackge attachment drag & drop
* Add default value for attachment list to fix specs
* Fix attachment list for work package create page, remove unused styles
* Fix linting errors
* Add extra checks in document attachment uplaod spec
* Adress PR comments
* Fix broken selector in spec
* Make sure to blur in the ckeditor instance
* Fix meeting module attachment spec
* Fix qa selector
* Fix eslint errors
* Fix rubocop errors
Found via `codespell -q 3 -S ./.git,./config/locales,./modules/xls_export/config/locales,./modules/job_status/config/locales,./modules/two_factor_authentication/config/locales,./modules/backlogs/config/locales/crowdin,./**/config/locales,./frontend/src/vendor -L ba,inflight,nd,parms,pullrequest,pullrequests,sur,varius`
In case there is no wiki items, even if there should always be one,
the wiki will be unaccessible.
To avoid this, we ensure the main wiki item is always created in case it is missing
- https://community.openproject.org/work_packages/41340
- added new files tab to wp details view
- added attachments components to files tab
- removed attachments from wp single view, except for wp creation
- fixed a couple of eslint issues in affected files
- migrated attachments to resource store
- added upload to attachment store
- pull in newly built ckeditor
- removed old, hacky regression test
* Fix argument alignment since f08bea3467
The FactoryBot.* prefix has been removed in f08bea3467. Since then
rubocop complains about Layout/ArgumentAlignment. This commit fixes it.
* do not fix alignments for modules/*/spec yet
hoping to be under the limit of 65535 characters for reviewdog to report on rubocop errors
* Rename most notification to toaster instances
* Frontend builds
* Fix spec build
* Rename more notification elements to toaster
* Rename toaster-box to op-toast
* Fix op-toast-container
* Rename toasters upload progress
* Try fixing page.rb toaster check
* Fix some specs, break some others
* Correctly overwrite toast_type
* Fix more specs
* Fix one more notification to toaster rename
* Fix linting errors, harmonize naming more
* Remove byebug debugging statement
* Remove byebug debugging statement
* Rename notification in the backend, too
* Rename more instances of notifications to toastService
* Rename backend back to notification since bundle gems expect it there
* expect_toaster -> expect_toast
Co-authored-by: Henriette Darge <h.darge@openproject.com>