Skip to content

Conversation

elenaNaboko
Copy link
Contributor

The following tests are added:

  • Verify that user can find (using right click) "Run Commands" custom shortcut option in monaco menu and run a command;
  • Verify that user can see saved scroll position in Enablement area when he leaves Workbench page and goes back again.

@elenaNaboko elenaNaboko self-assigned this Dec 24, 2021
//Go back to Workbench page
await t.click(myRedisDatabasePage.workbenchButton);
//Check that scroll position is saved
await t.expect(workbenchPage.scrolledEnablementArea.scrollTop).eql(scrollPosition, 'Scroll position is correct');

Choose a reason for hiding this comment

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

Regarding the error message, the more correct is The scroll position status

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

//Select Command Palette option
await t.click(workbenchPage.monacoContextMenu.find(workbenchPage.cssMonacoCommandPaletteLine));
//Print "Run Commands" shortcut
await t.typeText(workbenchPage.monacoShortcutInput, 'Run Commands');

Choose a reason for hiding this comment

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

I recommend using with { replace: true, paste: true } on typeText

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Did not add replace and paste options because monaco context menu doesn't work with them and test fails. Need "typeahead" behavior in this test

await t.click(workbenchPage.monacoSuggestionOption);
//Check the result with sent command
const commandTextInResult = await workbenchPage.queryCardCommand.withExactText(command);
await t.expect(commandTextInResult.exists).ok('Result of sent command exists');

Choose a reason for hiding this comment

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

More accurate error message: The result of sent command

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@elenaNaboko elenaNaboko merged commit c6b7335 into main Jan 3, 2022
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.

2 participants