[affected:*][ci:force] Fixed e2e with new notation

This commit is contained in:
Vito Albano
2024-03-09 02:09:58 +00:00
parent d6ef8a8879
commit 94eabfd527
8 changed files with 24 additions and 11 deletions

View File

@@ -20,6 +20,7 @@ export const materialLocators = {
root: 'mat-error'
},
Tooltip: {
root: 'mat-tooltip-component'
root: 'mat-tooltip-component',
message: '.mdc-tooltip__surface'
}
};

View File

@@ -21,7 +21,7 @@ import { materialLocators } from './material-locators';
export class TooltipComponent extends BaseComponent {
private static rootElement = materialLocators.Tooltip.root;
public content = this.getChild('div');
public content = this.getChild(materialLocators.Tooltip.message);
constructor(page: Page) {
super(page, TooltipComponent.rootElement);

View File

@@ -397,6 +397,11 @@ describe('Content Services Viewer', () => {
});
});
/**
*
* @param originalFileName
* @param newVersionLocation
*/
async function uploadNewVersion(originalFileName: string, newVersionLocation: string): Promise<void> {
await contentServicesPage.doubleClickRow(originalFileName);
await viewerPage.waitTillContentLoaded();
@@ -410,14 +415,23 @@ describe('Content Services Viewer', () => {
await browser.refresh();
}
/**
*
* @param unsupportedFileName
*/
async function previewUnsupportedFile(unsupportedFileName: string): Promise<void> {
await contentServicesPage.doubleClickRow(unsupportedFileName);
await viewerPage.waitTillContentLoaded();
await viewerPage.checkUnknownFormatIsDisplayed();
await expect(await viewerPage.getUnknownFormatMessage()).toBe("Couldn't load preview. Unknown format.");
await expect(await viewerPage.getUnknownFormatMessage()).toBe('Couldn\'t load preview. Unknown format.');
await viewerPage.clickCloseButton();
}
/**
*
* @param fileName
* @param newName
*/
async function changeFileNameInViewer(fileName: string, newName: string): Promise<void> {
await contentServicesPage.doubleClickRow(fileName);
await viewerPage.waitTillContentLoaded();

View File

@@ -69,8 +69,7 @@ describe('Login component - SSO', () => {
false,
false,
browser.params.testConfig.appConfig.oauth2.clientId,
browser.params.testConfig.appConfig.oauth2.redirectUriLogout,
false);
browser.params.testConfig.appConfig.oauth2.redirectUriLogout);
await loginPage.waitForElements();

View File

@@ -122,8 +122,8 @@ describe('InfiniteScrollDatasource', () => {
expect(renderedItems[0].innerText).toBe('test1');
expect(renderedItems[2].innerText).toBe('test3');
});
// eslint-disable-next-line
xit('should load next batch when user scrolls towards the end of the list', fakeAsync(() => {
it('should load next batch when user scrolls towards the end of the list', fakeAsync(() => {
fixture.autoDetectChanges();
const stable = fixture.whenStable();
const renderingDone = fixture.whenRenderingDone();

View File

@@ -20,7 +20,7 @@
border-radius: 6px;
/* TODO(mdc-migration): The following rule targets internal classes of select that may no longer apply for the MDC version. */
.mat-select-value {
.mat-mdc-select-value {
color: var(--adf-metadata-action-button-clear-color);
}
}

View File

@@ -20,7 +20,6 @@
}
&-input-form-field-divider {
/* TODO(mdc-migration): The following rule targets internal classes of form-field that may no longer apply for the MDC version. */
.mat-form-field-underline {
background-color: var(--adf-theme-primary-50);

View File

@@ -391,12 +391,12 @@ export const materialLocators = {
root: 'mat-tab-label-active'
},
content: {
class: '.mat-mdc-tab-label-content',
class: '.mdc-tab__content',
root: 'mat-tab-label-content'
}
},
labels: {
class: '.mat-mdc-tab-labels'
class: '.mdc-tab__text-label'
},
list: '.mat-mdc-tab-list'
},