-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feat/toolbar-3000
- Loading branch information
Showing
261 changed files
with
5,904 additions
and
2,271 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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 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 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 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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,43 @@ | ||
import { randomString } from '../support/random' | ||
|
||
function visitNotebooksList(): void { | ||
cy.clickNavMenu('dashboards') | ||
cy.location('pathname').should('include', '/dashboard') | ||
cy.get('h1').should('contain', 'Dashboards & Notebooks') | ||
cy.get('li').contains('Notebooks').should('exist').click() | ||
} | ||
|
||
function createNotebookAndFindInList(notebookTitle: string): void { | ||
cy.get('[data-attr="new-notebook"]').click() | ||
cy.get('.NotebookEditor').type(notebookTitle) | ||
|
||
visitNotebooksList() | ||
cy.get('[data-attr="notebooks-search"]').type(notebookTitle) | ||
} | ||
|
||
describe('Notebooks', () => { | ||
beforeEach(() => { | ||
visitNotebooksList() | ||
}) | ||
|
||
it('can create and name a notebook', () => { | ||
const notebookTitle = randomString('My new notebook') | ||
|
||
createNotebookAndFindInList(notebookTitle) | ||
cy.get('[data-attr="notebooks-table"] tbody tr').should('have.length', 1) | ||
}) | ||
|
||
it('can delete a notebook', () => { | ||
const notebookTitle = randomString('My notebook to delete') | ||
|
||
createNotebookAndFindInList(notebookTitle) | ||
|
||
cy.contains('[data-attr="notebooks-table"] tr', notebookTitle).within(() => { | ||
cy.get('[aria-label="more"]').click() | ||
}) | ||
cy.contains('.LemonButton', 'Delete').click() | ||
|
||
// and the table updates | ||
cy.contains('[data-attr="notebooks-table"] tr', notebookTitle).should('not.exist') | ||
}) | ||
}) |
This file contains 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 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 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 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 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 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 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.