-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[ZEPPELIN-6358] Add E2E tests about /#/notebook/:noteid for New UI #5101
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
Open
dididy
wants to merge
134
commits into
apache:master
Choose a base branch
from
dididy:e2e/notebook
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
134 commits
Select commit
Hold shift + click to select a range
3e8ce73
change playwright config ts to js
dididy 25992d9
change to folder base note managing and cleanup
dididy fc44d9c
add notebook related methods in utils
dididy ce0712c
add comment for globl-teardown
dididy 3f69895
remove unnecessary code
dididy 2f57b0d
utils convert to arrow func, separate regex to constant
dididy 5cbb05d
Add notebook related tests
dididy e00c303
combine tests
dididy 35d1842
add shortcut tests
dididy 8b5f2e1
fix broken tests
dididy 428de97
remove unsued function and apply review
dididy e5c9efb
add global teardown's cleanup test notebooks
dididy 746e1e8
cleanupTestNotebooks only for local, add waitForSelector
dididy dff6451
enhance tests
dididy f399ed2
apply lint:fix
dididy d6b763f
fix broken tests
dididy 8d92b37
refactor error handling to fail fast instead of catching and continuing
dididy 1871327
fix broken tests
dididy b18ae4d
verify icon updates by asserting svg data-icon attribute
dididy c407b99
make verifyTitleEditingFunctionality assert actual editing behavior
dididy 5626dc3
lint fix + throw error
dididy ff7a9d7
extract browser-specific logic in executePlatformShortcut for clarity
dididy a3793c7
fix broken tests
dididy 8c24df1
fix broken tests
dididy 1f39a48
add missing annotation
dididy e38875d
add additional tests
dididy a1b1a24
fix broken tests
dididy 76c9d17
remove unused part by tbonelee
dididy d7ecc40
fix sidebar-functionality.spec related tests
dididy 33da679
add sidebar aria-label
dididy 2db8b5f
apply published-paragraph related tests
dididy f33d40e
apply review about notebook-paragraph and sidebar
dididy 5082747
apply review rest of tests
dididy dc36067
fix action bar relate tests
dididy 01c2b32
fix published paragraph test
dididy 947be5b
fix notebook paragraph related tests
dididy e04c735
fix tests
dididy d071569
fix broken tests
dididy 5ba3e17
add tear up and tear down related about ZEPPELIN_NOTEBOOK_DIR
dididy 8ae424b
fix borken test
dididy f59666a
fix test pom about keyboard and sidebar
dididy 8a4831a
remove try catch
dididy ceb3406
remove conditional test
dididy b239020
remove try catch
dididy f7fd948
fix broken tests
dididy ab04607
fix remove condition of test
dididy f6e61a2
fix broken tests
dididy 53bb844
fix broken test
dididy f7567a7
add ci settings for python
dididy 59949e8
remove conditional skip tests
dididy 023af3c
fix interpreter not found error
dididy 4ebe9a5
fix broken tests
dididy 5cece0b
fix issue where Control+Alt+F dialog does not appear
dididy 59e7907
fix broken tests
dididy 94198f5
conver to use createTestNotebook deleteTestNotebook from utils
dididy 283de97
fix broken tests
dididy 8cb1e8c
disable the button in the rename modal when the input field is empty
dididy cc94601
fix broken tests
dididy fd9aed0
test
dididy f6a52fa
Apply minor suggestions from code review
tbonelee 89ad9f9
Apply minor suggestions from code review
tbonelee f32e043
Remove console log
tbonelee 7d25cf7
Remove unused method
tbonelee d7821cf
Reformat blank lines
tbonelee fedc862
Reformat blank lines
tbonelee 10f2568
fix broken tests
dididy d655de7
change goto('/') to goto('/#/')
dididy e64c0ab
fix borken tests
dididy ba559d8
remove r setup in frontend.yml playwright step
dididy 7c244a5
reflecting a simple review
dididy ef32970
fix broken tests
dididy 5fc96b5
added a comment to the additionally assigned issue.
dididy 0b51039
fix broken test
dididy 2c08fd6
remove deleteNotebook func and step for afterEach
dididy acb8fb9
refactor teardown step about delete note
dididy e03ce58
refactor tests
dididy 0d79ff4
fix broken tests
dididy 61cc9be
refactoring
dididy 301fd76
fix broken tests
dididy 6a2cb02
refactoring and fix broken tests
dididy 6bb1a7e
fix broken tests
dididy 6125729
fix borken tests
dididy a060732
reset unnecessary changes about package.json
dididy fa0466d
add safe step for watiForNotebookLinks
dididy 8144699
fix broken tests
dididy 11ecb43
change e2eTestFolder selector on base-page
dididy 6daa110
refactoring performLoginIfRequired for broken tests
dididy 3fb9315
fix broken tests
dididy bcc79ea
add expandfolder step in getFolderNode
dididy 6ca454d
fix broken test
dididy 36e8dd9
fix broken test about Control+Alt+F
dididy 9c84a38
fix broken test about rename folder
dididy 52b563a
fix broken test
dididy 832e8e5
move constants location and make a new constant
dididy 058776d
add comments for ZEPPELIN_E2E_TEST_NOTEBOOK_DIR
dididy 1536005
simplize Setup Test Notebook Directory step in CI
dididy b997b44
separate constatns to constant file
dididy a02cf95
rollback constants location for circular dependency issue
dididy 7f3d117
fix broken test
dididy fc218c6
fix broken test
dididy b0658f6
fix env config in yml
dididy b72afac
fix path condition in cleanupTestNotebooks
dididy 9158f07
fix broken test
dididy df5c72f
add waitForZeppelinReady step in performLoginIfRequired
dididy cecf9fa
fix broken test
dididy 894bb56
fix broken test
dididy 4937c35
fix broken test
dididy a54fbd0
fix broken test
dididy 5d6e07f
fix broken test
dididy 062836b
fix broken test
dididy a654de2
fix broken test
dididy 17cd586
fix broken test
dididy f8bebc1
fix broken test
dididy 6b0121b
fix broken test
dididy 33d6d59
fix broken test
dididy 0a8d223
fix constants path
dididy cf67a1b
fix broken test
dididy fda5987
updated the folder rename test to run outside of E2E_TEST_FOLDER for …
dididy 7bd0d0d
Ctrl+Y marked as skipped in CI - ZEPPELIN-6379
dididy 8bf4f78
apply review
dididy 74a7eee
apply review
dididy 5c30df9
fix broken tests
dididy 1a77f06
fix broken test
dididy 57895fe
fix broken test
dididy 6cdce4d
fix broken test
dididy 632d0dd
fix broken test
dididy 611ed3c
fix broken test
dididy e0e99b9
fix broken test
dididy 5ded275
apply review
dididy 8c3dab5
apply review
dididy 6010891
remove unused code
dididy 450cb9c
refactoring tests
dididy 0c97624
fix broken test
dididy 29c9a2e
revert unproper change for selenium ci step
dididy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| /* | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| import { BASE_URL, E2E_TEST_FOLDER } from './models/base-page'; | ||
|
|
||
| export const cleanupTestNotebooks = async () => { | ||
| try { | ||
| console.log('Cleaning up test folder via API...'); | ||
|
|
||
| // Get all notebooks and folders | ||
| const response = await fetch(`${BASE_URL}/api/notebook`); | ||
| const data = await response.json(); | ||
| if (!data.body || !Array.isArray(data.body)) { | ||
| console.log('No notebooks found or invalid response format'); | ||
| return; | ||
| } | ||
|
|
||
| // Find the test folders (E2E_TEST_FOLDER, TestFolder_, and TestFolderRenamed_ patterns) | ||
| const testFolders = data.body.filter((item: { path: string }) => { | ||
| if (!item.path || item.path.includes(`~Trash`)) { | ||
| return false; | ||
| } | ||
| const folderName = item.path.split('/')[1]; | ||
| return ( | ||
| folderName === E2E_TEST_FOLDER || | ||
| folderName?.startsWith('TestFolder_') || | ||
| folderName?.startsWith('TestFolderRenamed_') | ||
| ); | ||
| }); | ||
|
|
||
| if (testFolders.length === 0) { | ||
| console.log('No test folder found to clean up'); | ||
| return; | ||
| } | ||
|
|
||
| await Promise.all( | ||
| testFolders.map(async (testFolder: { id: string; path: string }) => { | ||
| try { | ||
| console.log(`Deleting test folder: ${testFolder.id} (${testFolder.path})`); | ||
|
|
||
| const deleteResponse = await fetch(`${BASE_URL}/api/notebook/${testFolder.id}`, { | ||
| method: 'DELETE' | ||
| }); | ||
|
|
||
| // Although a 500 status code is generally not considered a successful response, | ||
| // this API returns 500 even when the operation actually succeeds. | ||
| // I'll investigate this further and create an issue. | ||
| if (deleteResponse.status === 200 || deleteResponse.status === 500) { | ||
| console.log(`Deleted test folder: ${testFolder.path}`); | ||
| } else { | ||
| console.warn(`Failed to delete test folder ${testFolder.path}: ${deleteResponse.status}`); | ||
| } | ||
| } catch (error) { | ||
| console.error(`Error deleting test folder ${testFolder.path}:`, error); | ||
| } | ||
| }) | ||
| ); | ||
|
|
||
| console.log('Test folder cleanup completed'); | ||
| } catch (error) { | ||
| if (error instanceof Error && error.message.includes('ECONNREFUSED')) { | ||
| console.error('Failed to connect to local server. Please start the frontend server first:'); | ||
| console.error(' npm start'); | ||
| console.error(` or make sure ${BASE_URL} is running`); | ||
| } else { | ||
| console.warn('Failed to cleanup test folder:', error); | ||
| } | ||
| } | ||
| }; | ||
|
|
||
| if (require.main === module) { | ||
| cleanupTestNotebooks() | ||
| .then(() => { | ||
| console.log('Cleanup completed successfully'); | ||
| process.exit(0); | ||
| }) | ||
| .catch(error => { | ||
| console.error('Cleanup failed:', error); | ||
| process.exit(1); | ||
| }); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could use
ZEPPELIN_E2E_TEST_NOTEBOOK_DIRto remove test notebook directory if possible.