[affected:*][ci:force] Fixing e2e - the long painful journey

This commit is contained in:
Vito Albano
2024-03-20 23:10:54 +00:00
parent df3f9f9225
commit eaf3b435eb
11 changed files with 32 additions and 41 deletions
@@ -139,13 +139,13 @@ describe('CardView Component - properties', () => {
await viewerPage.checkInfoSideBarIsDisplayed();
await metadataViewPage.clickOnPropertiesTab();
await CheckboxPage.uncheck(metadataViewPage.defaultPropertiesSwitch);
await togglePage.disableToggle(metadataViewPage.defaultPropertiesSwitch);
await metadataViewPage.checkMetadataGroupIsNotPresent('properties');
await metadataViewPage.checkMetadataGroupIsPresent('Versionable');
await metadataViewPage.checkMetadataGroupIsExpand('Versionable');
await CheckboxPage.check(metadataViewPage.defaultPropertiesSwitch);
await togglePage.enableToggle(metadataViewPage.defaultPropertiesSwitch);
await metadataViewPage.checkMetadataGroupIsPresent('properties');
await metadataViewPage.checkMetadataGroupIsExpand('properties');
+2 -2
View File
@@ -38,8 +38,8 @@ export class MetadataViewPage {
multiSwitch = $(`#adf-metadata-multi`);
defaultPropertiesSwitch = $('#adf-metadata-default-properties');
closeButton = element(by.cssContainingText(`button${materialLocators.Button.class} span`, 'Close'));
displayAspect = $(`input[data-placeholder='Display Aspect']`);
applyAspect = element(by.cssContainingText(`button span${materialLocators.Button.wrapper}`, 'Apply Aspect'));
displayAspect = $(`input[placeholder='Display Aspect']`);
applyAspect = element(by.cssContainingText(`button span${materialLocators.Button.label}`, 'Apply Aspect'));
saveMetadataButton = $(`[data-automation-id='save-metadata']`);
saveGeneralMetadataButton = $(`[data-automation-id='save-general-info-metadata']`);
resetMetadataButton = $(`[data-automation-id='reset-metadata']`);
@@ -20,19 +20,19 @@ import { element, by, browser } from 'protractor';
export class ProcessServiceTabBarPage {
tasksButton = element.all(by.cssContainingText(`div[class*="${materialLocators.Tab.label.root}"] ${materialLocators.Tab.labels.class} div`, 'Tasks')).first();
processButton = element.all(by.cssContainingText(`div[class*="${materialLocators.Tab.label.root}"] ${materialLocators.Tab.labels.class} div`, 'Process')).first();
reportsButton = element.all(by.cssContainingText(`div[class*="${materialLocators.Tab.label.root}"] ${materialLocators.Tab.labels.class} div`, 'Reports')).first();
tasksButton = element.all(by.cssContainingText(`div[class*="${materialLocators.Tab.label.root}"] ${materialLocators.Tab.labels.class}`, 'Tasks')).first();
processButton = element.all(by.cssContainingText(`div[class*="${materialLocators.Tab.label.root}"] ${materialLocators.Tab.labels.class}`, 'Process')).first();
reportsButton = element.all(by.cssContainingText(`div[class*="${materialLocators.Tab.label.root}"] ${materialLocators.Tab.labels.class}`, 'Reports')).first();
reportsButtonSelected = element.all(by.cssContainingText(`div[class*="${materialLocators.Tab.label.root}"] ${materialLocators.Tab.labels.class} div[aria-selected="true"]`, 'Reports')).first();
async clickTasksButton(): Promise<void> {
await BrowserActions.click(this.tasksButton);
await browser.sleep(500);
await browser.sleep(100);
}
async clickProcessButton(): Promise<void> {
await BrowserActions.click(this.processButton);
await browser.sleep(500);
await browser.sleep(100);
}
async clickReportsButton(): Promise<void> {
+6 -4
View File
@@ -100,7 +100,7 @@ describe('Search Slider Filter', () => {
});
it('[C276972] Should be keep value when Search Size Slider is collapsed', async () => {
const size = 5;
const size = 10;
await searchFilters.checkSizeSliderFilterIsDisplayed();
await searchFilters.clickSizeSliderFilterHeader();
@@ -112,7 +112,9 @@ describe('Search Slider Filter', () => {
await searchFilters.clickSizeSliderFilterHeader();
await searchFilters.checkSizeSliderFilterIsExpanded();
await expect(await sizeSliderFilter.getValue()).toEqual(`${size}`);
const currentValue = await sizeSliderFilter.getValue();
await expect(currentValue).toEqual(`${size}`);
});
it('[C276981] Should be able to clear value in Search Size Slider', async () => {
@@ -129,7 +131,7 @@ describe('Search Slider Filter', () => {
const currentSize = await BrowserActions.getAttribute(currentResult, 'title');
if (currentSize && currentSize.trim() !== '') {
await expect(parseInt(currentSize, 10) <= 5000).toBe(true);
await expect(parseInt(currentSize, 10) <= 5000).toBe(true, `${parseInt(currentSize, 10)} is not bigger than 5000`);
}
}
@@ -143,7 +145,7 @@ describe('Search Slider Filter', () => {
const currentSize = await BrowserActions.getAttribute(currentResult, 'title');
if (currentSize && currentSize.trim() !== '') {
await expect(parseInt(currentSize, 10) >= 5000).toBe(true);
await expect(parseInt(currentSize, 10) >= 5000).toBe(true, `${parseInt(currentSize, 10)} is not bigger than 5000`);
}
}
});