Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions tests/e2e/pageObjects/workbench-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ export class WorkbenchPage {
cancelButton: Selector
applyButton: Selector
documentButtonInQuickGuides: Selector
redisStackTutorialsButton: Selector
vectorSimilitaritySearchButton: Selector
nextPageButton: Selector
prevPageButton: Selector
hashWithVectorButton: Selector
redisStackLinks: Selector

constructor() {
//CSS selectors
Expand Down Expand Up @@ -130,6 +136,12 @@ export class WorkbenchPage {
this.cancelButton = Selector('[data-testid=cancel-btn]');
this.applyButton = Selector('[data-testid=apply-btn]');
this.documentButtonInQuickGuides = Selector('[data-testid=accordion-button-document]');
this.redisStackTutorialsButton = Selector('[data-testid=accordion-button-redis_stack]');
this.vectorSimilitaritySearchButton = Selector('[data-testid=internal-link-vector_similarity_search]');
this.nextPageButton = Selector('[data-testid=enablement-area__next-page-btn]');
this.prevPageButton = Selector('[data-testid=enablement-area__prev-page-btn]');
this.hashWithVectorButton = Selector('[data-testid="preselect-A hash with vector embeddings"]');
this.redisStackLinks = Selector('[data-testid=accordion-redis_stack] [data-testid^=internal-link]');
// TEXT INPUTS (also referred to as 'Text fields')
this.queryInput = Selector('[data-testid=query-input-container]');
this.scriptsLines = Selector('[data-testid=query-input-container] .view-lines');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,38 @@ test
//Verify the quick navigation section
await t.expect(workbenchPage.enablementAreaPagination.visible).ok('The quick navigation section is displayed');
});
test
.meta({ rte: rte.standalone })
('Verify that user can see the pagination for redis stack pages in Tutorials', async t => {
//Open any redis stack Tutorials
await t.click(workbenchPage.redisStackTutorialsButton);
await t.click(workbenchPage.vectorSimilitaritySearchButton);
//Verify the pagination
await t.expect(workbenchPage.enablementAreaPagination.visible).ok('The user can see the pagination for redis stack pages');
await t.expect(workbenchPage.nextPageButton.visible).ok('The user can see the next page for redis stack pages');
await t.expect(workbenchPage.prevPageButton.visible).ok('The user can see the prev page for redis stack pages');
});
test
.meta({ rte: rte.standalone })
('Verify that the same type of content is supported in the “Tutorials” as in the “Quick Guides”', async t => {
const tutorialsContent = [
'Working with JSON',
'Vector Similarity Search',
'Redis for time series',
'Working with graphs',
'Probabilistic data structures'
];
const command = 'HSET bikes:10000 ';
//Verify the redis stack links
await t.click(workbenchPage.redisStackTutorialsButton);
const linksCount = await workbenchPage.redisStackLinks.count;
for(let i = 0; i < linksCount; i++) {
await t.expect(workbenchPage.redisStackLinks.nth(i).textContent).eql(tutorialsContent[i], `The link ${tutorialsContent[i]} is in the Enablement area`);
}
//Verify the load script to Editor
await t.click(workbenchPage.vectorSimilitaritySearchButton);
await t.expect(workbenchPage.queryInputScriptArea.textContent).eql('', 'The editor is empty');
await t.click(workbenchPage.hashWithVectorButton);
const editorContent = (await workbenchPage.queryInputScriptArea.textContent).replace(/\s/g, ' ')
await t.expect(editorContent).eql(command, 'The selected command is in the Editor');
});