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

Record presentation playwright #2519

Merged
merged 11 commits into from
Aug 21, 2024
7 changes: 1 addition & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ E2ErecordEditForeignKeyDropdown=test/e2e/specs/default-config/recordedit/foreign
E2ErecordEditInputIframe=test/e2e/specs/all-features/recordedit/input-iframe.config.ts
# Record tests
E2EDrecord=test/e2e/specs/all-features-confirmation/record/presentation-btn.config.ts
E2EDrecordProt=test/e2e/specs/all-features-confirmation/record/presentation-btn.conf.js
E2EDrecordCopy=test/e2e/specs/all-features/record/copy-btn.config.ts
E2ErecordNoDeleteBtn=test/e2e/specs/delete-prohibited/record/no-delete-btn.config.ts
E2EDrecordRelatedTable=test/e2e/specs/all-features/record/related-table.config.ts
Expand Down Expand Up @@ -92,14 +91,13 @@ DefaultConfigParallel=test/e2e/specs/default-config/playwright.config.ts
Manualrecordset=test/manual/specs/recordset.conf.js

# protractor tests
RECORD_TESTS_PROTRACTOR=$(E2EDrecordProt)
RECORDSET_TESTS_PROTRACTOR=$(E2EDrecordset) $(E2ErecordsetAdd) $(E2EDrecordsetEdit)
RECORDADD_TESTS_PROTRACTOR=$(E2EDIrecordAdd) $(E2EDIrecordMultiFormInput) $(E2EDIrecordImmutable)
RECORDEDIT_TESTS_PROTRACTOR=$(E2EDIrecordEdit) $(E2EDIrecordMultiEdit) $(E2EDrecordEditSubmissionDisabled) $(E2EDIrecordEditMultiColTypes)
DEFAULT_CONFIG_PARALLEL_TESTS_PROTRACTOR=$(DefaultConfigParallel_PROTRACTOR)
ALL_FEATURES_CONFIRMATION_PARALLEL_TESTS_PROTRACTOR=$(AllFeaturesConfirmationParallel_PROTRACTOR)
PARALLEL_TESTS_PROTRACTOR=$(AllFeaturesConfirmationParallel_PROTRACTOR) $(DefaultConfigParallel_PROTRACTOR)
ALL_TESTS_PROTRACTOR=$(RECORD_TESTS_PROTRACTOR) $(RECORDSET_TESTS_PROTRACTOR) $(RECORDADD_TESTS_PROTRACTOR) $(RECORDEDIT_TESTS_PROTRACTOR)
ALL_TESTS_PROTRACTOR=$(RECORDSET_TESTS_PROTRACTOR) $(RECORDADD_TESTS_PROTRACTOR) $(RECORDEDIT_TESTS_PROTRACTOR)

# playwright tests
NAVBAR_TESTS=$(E2Enavbar) $(E2EnavbarHeadTitle) $(E2EnavbarCatalogConfig)
Expand Down Expand Up @@ -153,9 +151,6 @@ testrecord-protractor: test_protractor-RECORD_TESTS_PROTRACTOR
.PHONY: testrecord
testrecord: test-RECORD_TESTS

.PHONY: testrecord-protractor
testrecord-protractor: test-RECORD_TESTS_PROTRACTOR

#Rule to run record add app tests
.PHONY: testrecordadd
testrecordadd: test-RECORDADD_TESTS
Expand Down
25 changes: 25 additions & 0 deletions test/e2e/locators/record.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ export default class RecordLocators {
return container.locator('.columns-container li.toc-heading');
}

static getSidePanelItemById(container: Locator | Page, idx: number): Locator {
return container.locator(`#recordSidePan-heading-${idx}`);
}


// ----------------- main section selectors ------------------------ //

Expand Down Expand Up @@ -101,6 +105,18 @@ export default class RecordLocators {
return container.locator(`#row-${columnName} .entity-value span`);
}

static getInlineRelatedTableInlineComment(container: Locator | Page, displayname: string) {
return RecordLocators.getEntityRelatedTable(container, displayname).locator('.inline-tooltip');
}

static getLinkChild(el: Locator) {
return el.locator('a');
};

static getValueMarkdownContainer(el: Locator) {
return el.locator('.markdown-container:not(.chaise-comment)');
};

// --------------------- related table selectors ----------------- //

static getRelatedTableContainer(container: Locator | Page, displayname: string, isInline?: boolean): Locator {
Expand All @@ -113,10 +129,19 @@ export default class RecordLocators {
return container.locator(`#rt-heading-${displayname}`);
}

static getRelatedTable(container: Locator | Page, displayname: string): Locator {
displayname = makeSafeIdAttr(displayname);
return container.locator(`#rt-${displayname}`);
}

static getRelatedSectionSpinner(page: Page): Locator {
return page.locator('.related-section-spinner');
}

static getRelatedTables(page: Page): Locator {
return page.locator('.chaise-accordion:not(.forced-hidden)');
};

static getDisplayedRelatedTableTitles(page: Page): Locator {
return page.locator('.chaise-accordion:not(.forced-hidden) .chaise-accordion-header .chaise-accordion-displayname')
}
Expand Down
4 changes: 4 additions & 0 deletions test/e2e/locators/recordset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ export default class RecordsetLocators {
return container.locator(`.c_${rawColumnName} .not-sorted-icon`);
};

static getNoResultsRow(container: Page | Locator): Locator {
return container.locator('#no-results-row');
};


// -------------------- row-level selectors ------------------------ //

Expand Down
4 changes: 3 additions & 1 deletion test/e2e/specs/all-features-confirmation/chaise-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ var chaiseConfig = {
// TODO: make sure this is working properly in spec
maxRecordsetRowHeight: false, // triggers (ignores) some logic in ellipsis.js. Tests view buttons having proper links
allowErrorDismissal : true,
resolverImplicitCatalog: 2, // in parallel config mode, this config is used first with catalog Id
// in parallel config mode, this config is used second with catalog Id 2
// We want to ensure this value is NOT the same as the catalog used when testing
resolverImplicitCatalog: 100,
systemcolumnsdisplaycompact: ['RCB', 'RMT'], //testing case-insensitive properties
SystemColumnsDisplayDetailed: true, //testing case-insensitive properties
systemColumnsDisplayENTRY: ['RCB', 'RMB', 'RMT'], //testing case-insensitive properties
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default getConfig({
configFileName: 'record/dev.json',
mainSpecName: 'all-features-confirmation',
testMatch: [
// 'presentation.spec.ts',
'presentation.spec.ts',
'create-btn.spec.ts',
'delete-btn.spec.ts',
'edit-btn.spec.ts'
Expand Down
Loading
Loading