Skip to content

Commit

Permalink
Avoid using this on notebook name access
Browse files Browse the repository at this point in the history
Signed-off-by: Simeon Widdis <sawiddis@amazon.com>
  • Loading branch information
Swiddis committed Mar 26, 2024
1 parent c8bf658 commit 2cb5ada
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,10 @@ describe('Testing notebook actions', () => {
cy.wrap({ name: notebookName }).as('notebook');
});

afterEach(function () {
// ^^^^^^^^ Cannot use arrow callback to access beforeEach wrapper state
deleteNotebook(this.notebook.name);
afterEach(() => {
cy.get('@notebook').then((notebook) => {
deleteNotebook(notebook.name);
});
});

it('Creates a code paragraph', () => {
Expand Down Expand Up @@ -144,9 +145,10 @@ describe('Test reporting integration if plugin installed', () => {
cy.wrap({ name: notebookName }).as('notebook');
});

afterEach(function () {
// ^^^^^^^^ Cannot use arrow callback to access beforeEach wrapper state
deleteNotebook(this.notebook.name);
afterEach(() => {
cy.get('@notebook').then((notebook) => {
deleteNotebook(notebook.name);
});
});

it('Create in-context PDF report from notebook', () => {
Expand Down

0 comments on commit 2cb5ada

Please sign in to comment.