feat(testing): Added prod build of front end

This commit is contained in:
Muhammed Mustafa
2022-10-28 21:23:41 +05:30
parent 2384774ed4
commit 30d8d9f1c5
4 changed files with 16 additions and 4 deletions

View File

@@ -203,7 +203,12 @@ export class ColumnPageObject extends BasePage {
}
async save({ isUpdated }: { isUpdated?: boolean } = {}) {
await this.get().locator('button:has-text("Save")').click();
await this.waitForResponse({
uiAction: this.get().locator('button:has-text("Save")').click(),
requestUrlPathToMatch: 'api/v1/db/data/noco/',
httpMethodsToMatch: ['GET'],
responseJsonMatcher: (json) => json['pageInfo'],
});
await this.toastWait({
message: isUpdated ? "Column updated" : "Column created",

View File

@@ -157,6 +157,11 @@ export class ProjectsPage extends BasePage {
await projRow.locator(".nc-action-btn").nth(0).click();
await project.locator("input.nc-metadb-project-name").fill(newTitle);
// press enter to save
await project.locator("input.nc-metadb-project-name").press("Enter");
const submitAction = project.locator("input.nc-metadb-project-name").press("Enter");
await this.waitForResponse({
uiAction: submitAction,
requestUrlPathToMatch: 'api/v1/db/meta/projects/',
httpMethodsToMatch: ['PATCH'],
});
}
}