Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Update data model header asset #19729

Merged
merged 5 commits into from
Feb 11, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { test } from '@playwright/test';
import { expect, test } from '@playwright/test';
import { isUndefined } from 'lodash';
import { CustomPropertySupportedEntityList } from '../../constant/customProperty';
import { ApiEndpointClass } from '../../support/entity/ApiEndpointClass';
Expand Down Expand Up @@ -65,8 +65,9 @@ test.use({ storageState: 'playwright/.auth/admin.json' });
entities.forEach((EntityClass) => {
const entity = new EntityClass();
const deleteEntity = new EntityClass();
const entityName = entity.getType();

test.describe(entity.getType(), () => {
test.describe(entityName, () => {
test.beforeAll('Setup pre-requests', async ({ browser }) => {
const { apiContext, afterAction } = await createNewPage(browser);

Expand Down Expand Up @@ -192,6 +193,16 @@ entities.forEach((EntityClass) => {
);
});

if (['Dashboard', 'Dashboard Data Model'].includes(entityName)) {
test(`${entityName} page should show the project name`, async ({
page,
}) => {
await expect(
page.getByText((entity.entity as { project: string }).project)
).toBeVisible();
});
}

test('Update description', async ({ page }) => {
await entity.descriptionUpdate(page);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { EntityClass } from './EntityClass';
export class DashboardClass extends EntityClass {
private dashboardName = `pw-dashboard-${uuid()}`;
private dashboardDataModelName = `pw-dashboard-data-model-${uuid()}`;
private projectName = `pw-project-${uuid()}`;
service = {
name: `pw-dashboard-service-${uuid()}`,
serviceType: 'Superset',
Expand All @@ -51,6 +52,7 @@ export class DashboardClass extends EntityClass {
name: this.dashboardName,
displayName: this.dashboardName,
service: this.service.name,
project: this.projectName,
};
children = [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,12 @@ export const getDataAssetsHeaderInfo = (
value={dataModelDetails.dataModelType}
/>
)}
{dataModelDetails.project && (
<ExtraInfoLabel
label={t('label.project')}
value={dataModelDetails.project}
/>
)}
</>
);

Expand Down
Loading