Skip to content

Conversation

@Neslee
Copy link
Collaborator

@Neslee Neslee commented Feb 27, 2024

Linked issues

Solution

Add check, and fix 200+ failures

Checklist

  • I have read the CONTRIBUTING.md document.
  • My commit messages follow the contributing standards and style of this project.
  • My code follows the coding standards and style of this project.
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Need to run update.php after code changes
  • Requires a change to end-user documentation.
  • Requires a change to developer documentation.
  • Requires a change to QA tests.
  • Requires a new QA test.
  • I have updated the documentation accordingly.
  • All new and existing tests passed.

@Neslee
Copy link
Collaborator Author

Neslee commented Feb 27, 2024

@jjroelofs I have created this new PR on top of your PR #487, so i can request your review once it's ready.

@jjroelofs
Copy link
Collaborator

/qa-demo-2x-bs5-tests

@Neslee
Copy link
Collaborator Author

Neslee commented Mar 5, 2024

/qa-demo-2x-bs5-tests

@jjroelofs
Copy link
Collaborator

@Neslee "48 errors and 0 warnings potentially fixable with the --fix option." did you try the autofix option?

@Neslee
Copy link
Collaborator Author

Neslee commented Mar 5, 2024

@jjroelofs yes, those are fixed in my local, will push in next commit.

@Neslee
Copy link
Collaborator Author

Neslee commented Mar 5, 2024

/qa-demo-2x-bs5-tests

@jjroelofs
Copy link
Collaborator

/qa-demo-2x-bs5-tests

@jjroelofs
Copy link
Collaborator

Exception: Tue Mar 05 19:06:00 UTC 2024 SEVERE http://nginx/core/assets/vendor/jquery/jquery.min.js?v=3.6.0 1:31702 Uncaught TypeError: Cannot read properties of null (reading 'classList')
java.lang.Exception: Tue Mar 05 19:06:00 UTC 2024 SEVERE http://nginx/core/assets/vendor/jquery/jquery.min.js?v=3.6.0 1:31702 Uncaught TypeError: Cannot read properties of null (reading 'classList')

@Neslee the QA tests are now expect to completely pass and there are just 10 errors remaining in the editor test suite, the above is one of those that should be fixable. I'm not sure what is up with the missing images, I think I need to still update some code from the test workflow files or something.

@Neslee
Copy link
Collaborator Author

Neslee commented Mar 6, 2024

/qa-demo-2x-bs5-tests

@Neslee
Copy link
Collaborator Author

Neslee commented Mar 6, 2024

/qa-demo-2x-bs5-tests

@Neslee
Copy link
Collaborator Author

Neslee commented Mar 6, 2024

/qa-demo-2x-bs5-tests

https://github.com/dxpr/dxpr_theme/actions/runs/8170262836/job/22337373159

@Neslee
Copy link
Collaborator Author

Neslee commented Mar 6, 2024

@jjroelofs All errors have been fixed from editor tests, but there are some with timeout and expected true but false

@Neslee Neslee requested a review from jjroelofs March 6, 2024 10:36
@jjroelofs
Copy link
Collaborator

If I run tests on the 6.x branch I get these failures:

***_builder_project_maven | [ERROR]   ImageCarouselIntervalOptionVisualTest.verifyTheIntervalOption:60 expected [false] but found [true]
***_builder_project_maven | [ERROR]   JumbotronAddElementVisualTest.verifyTheUserCanAddElementInsideJumbotronElement:47 expected [false] but found [true]
***_builder_project_maven | [ERROR]   TabsAddTabOptionVisualTest.verifyAddTabOption:41 expected [false] but found [true]
***_builder_project_maven | [ERROR]   TabsDirectionOptionVisualTest.verifyThatUserCanChangeDirectionOfTabs:52 expected [false] but found [true]
***_builder_project_maven | [ERROR]   TabsFocusAfterChangeTitleVisualTest.verifyThatUserCanAfterChangeTitleForSecondTabFocusBeInTheSecondTab:55 expected [false] but found [true]
***_builder_project_maven | [ERROR]   TabsMobileFriendlyOptionVisualTest.verifyThatUserCanChangeMobileFriendlyOption:71 expected [false] but found [true]
***_builder_project_maven | [ERROR]   ToggleEditorVisualTest.verifyToggleEditor:42
***_builder_project_maven | [ERROR]   VimeoVideoWithImageAndThemedPlayedButtonVisualTest>ChromeTestBase.afterClass:242 » 

On your branch I get these:

***_builder_project_maven | [ERROR]   JumbotronAddElementVisualTest.verifyTheUserCanAddElementInsideJumbotronElement:47 expected [false] but found [true]
***_builder_project_maven | [ERROR]   ModelCK5AddImageVisualTest.insertAndVerifyCK5EditorImageLinkOption:41 expected [false] but found [true]
***_builder_project_maven | [ERROR]   ModelCK5ImageAlignmentVisualTest.verifyCK5EditorImageAlignmentOption:44 » Timeout
***_builder_project_maven | [ERROR]   ModelCK5ImageAlignmentVisualTest.verifyCK5EditorImageAlignmentOption:44 » Timeout
***_builder_project_maven | [ERROR]   ModelCK5ImageAlignmentVisualTest.verifyCK5EditorImageAlignmentOption:44 » Timeout
***_builder_project_maven | [ERROR]   ModelCK5ImageCaptionVisualTest.addAndVerifyCK5EditorImageCaptionOption:42 » Timeout
***_builder_project_maven | [ERROR]   ModelCK5InlineImageOptionVisualTest.insertAndVerifyCK5EditorImageLinkOption:42 expected [false] but found [true]
***_builder_project_maven | [ERROR]   ModelCK5ResizeImageVisualTest.verifyCK5EditorImageResizeOption:44 » Timeout Ex...
***_builder_project_maven | [ERROR]   ModelCK5ResizeImageVisualTest.verifyCK5EditorImageResizeOption:44 » Timeout Ex...
***_builder_project_maven | [ERROR]   ModelCK5SideImageOptionVisualTest.sideCK5EditorImageAndVerify:45 expected [false] but found [true]
***_builder_project_maven | [ERROR]   ModelCK5TableMergeOptionsVisualTest.verifyCK5EditorMergeCellTable:73 » MoveTargetOutOfBounds
***_builder_project_maven | [ERROR]   TabsAddTabOptionVisualTest.verifyAddTabOption:41 expected [false] but found [true]
***_builder_project_maven | [ERROR]   TabsDirectionOptionVisualTest.verifyThatUserCanChangeDirectionOfTabs:52 expected [false] but found [true]
***_builder_project_maven | [ERROR]   TabsFocusAfterChangeTitleVisualTest.verifyThatUserCanAfterChangeTitleForSecondTabFocusBeInTheSecondTab:55 expected [false] but found [true]
***_builder_project_maven | [ERROR]   TabsMobileFriendlyOptionVisualTest.verifyThatUserCanChangeMobileFriendlyOption:71 expected [false] but found [true]
***_builder_project_maven | [ERROR]   ToggleEditorVisualTest.verifyToggleEditor:42
***_builder_project_maven | [ERROR]   VimeoVideoWithImageAndThemedPlayedButtonVisualTest>ChromeTestBase.afterClass:242 » 
***_builder_project_maven | [ERROR]   YouTubeWithImageAndThemedPlayedButtonVisualTest>ChromeTestBase.afterClass:242 » 

I will manually test the additional failures' related features and also run the tests again to see if it is consistent.

@jjroelofs
Copy link
Collaborator

/qa-demo-2x-bs5-tests

@Neslee Neslee self-assigned this Mar 7, 2024
@Neslee
Copy link
Collaborator Author

Neslee commented Mar 8, 2024

@jjroelofs did you find some time to look into this editor test fails, seems like it's running forever.

@Neslee
Copy link
Collaborator Author

Neslee commented Mar 8, 2024

@jjroelofs just checked now there are 18 editor test failures in 6.x branch - #491
In this pr changes there are 17 editor test failures, so probably we have merged something to 6.x without running these tests

@jjroelofs
Copy link
Collaborator

@Neslee I think the problem is also happening in dxpr_builder repo which uses dxpr_theme:5.x. So, this is probably a problem with the tests themselves, they are new tests.

@Neslee Neslee changed the title Add check that prohibits jQuery functions and Fix eslint errors Add checks for ESlint and fix ESlint issues Mar 8, 2024
@Neslee Neslee requested a review from jjroelofs March 8, 2024 07:27
Copy link
Collaborator

@jjroelofs jjroelofs left a comment

Choose a reason for hiding this comment

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

dxpr-theme-header.min.js?s9weip:1 Uncaught DOMException: Failed to execute 'querySelectorAll' on 'Element': '> li' is not a valid selector.

I see that 80% of the work is in dxpr-theme-header.js but since the file is now throwing an error on every page I'll let you fix that first before manually testing your changes. If you haven't already please do manual testing yourself of the header's various functions that you worked on.

image

foreach ($theme_list as $theme) {
$theme_name = $theme->getName();
if ('dxpr_theme' === ($theme->info['base theme'] ?? '') OR 'dxpr_theme' === $theme_name) {
if ('dxpr_theme' === ($theme->info['base theme'] ?? '') or 'dxpr_theme' === $theme_name) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I've never seen this in PHP, does it even work? I'm pretty sure a lowercase "or" is not in Drupal coding standards. This PR should also not touch any PHP.

@Neslee Neslee requested a review from jjroelofs March 10, 2024 12:21
@Neslee
Copy link
Collaborator Author

Neslee commented Mar 10, 2024

@jjroelofs I tried a lot to squash commits but i am getting errors and git is throwing me various warnings and making conflicts when I do it
Screenshot 2024-03-10 at 5 52 13 PM

Copy link
Collaborator

@jjroelofs jjroelofs left a comment

Choose a reason for hiding this comment

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

Great, dropdowns are working fine now :)

@jjroelofs jjroelofs merged commit 60fcb12 into 6.x Mar 11, 2024
@jjroelofs jjroelofs deleted the neslee/6.x/#485-fix-eslint-errors branch March 11, 2024 11:17
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.

Update dependencies based on dxpr_builder repo Fix ESLint issues

3 participants