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

Stage Release #2894

Merged
merged 13 commits into from
Jul 31, 2024
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion cypress/e2e/content/content.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ describe("Content Specs", () => {
});

it("Currency Field", () => {
cy.get("#12-b35c68-jd1s8s input[type=number]")
cy.get("#12-b35c68-jd1s8s input")
.focus()
.clear()
.type("100.00")
Expand Down
40 changes: 40 additions & 0 deletions cypress/e2e/schema/field.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ const SELECTORS = {
FIELD_SELECT_MEDIA: "FieldItem_images",
FIELD_SELECT_BOOLEAN: "FieldItem_yes_no",
FIELD_SELECT_ONE_TO_ONE: "FieldItem_one_to_one",
FIELD_SELECT_CURRENCY: "FieldItem_currency",
MEDIA_CHECKBOX_LIMIT: "MediaCheckbox_limit",
MEDIA_CHECKBOX_LOCK: "MediaCheckbox_group_id",
DROPDOWN_ADD_OPTION: "DropdownAddOption",
DROPDOWN_DELETE_OPTION: "DeleteOption",
AUTOCOMPLETE_MODEL_ZUID: "Autocomplete_relatedModelZUID",
AUTOCOMPLETE_FIELED_ZUID: "Autocomplete_relatedFieldZUID",
AUTOCOMPLETE_FIELD_CURRENCY: "Autocomplete_currency",
INPUT_LABEL: "FieldFormInput_label",
INPUT_NAME: "FieldFormInput_name",
INPUT_OPTION_LABEL: "OptionLabel",
Expand Down Expand Up @@ -357,6 +359,44 @@ describe("Schema: Fields", () => {
cy.getBySelector(`Field_${fieldName}`).should("exist");
});

it("Creates a currency field", () => {
cy.intercept("**/fields?showDeleted=true").as("getFields");

const fieldLabel = `Currency ${timestamp}`;
const fieldName = `currency_${timestamp}`;

// Open the add field modal
cy.getBySelector(SELECTORS.ADD_FIELD_BTN).should("exist").click();
cy.getBySelector(SELECTORS.ADD_FIELD_MODAL).should("exist");

// Select one-to-one relationship field
cy.getBySelector(SELECTORS.FIELD_SELECT_CURRENCY).should("exist").click();

// Select default currency
cy.getBySelector(SELECTORS.AUTOCOMPLETE_FIELD_CURRENCY).type("phil");
cy.get("[role=listbox] [role=option]").first().click();

// Fill up fields
cy.getBySelector(SELECTORS.INPUT_LABEL).should("exist").type(fieldLabel);

// Navigate to rules tab and add default value
cy.getBySelector(SELECTORS.RULES_TAB_BTN).click();
// click on the default value checkbox
cy.getBySelector(SELECTORS.DEFAULT_VALUE_CHECKBOX).click();
// enter a default value
cy.getBySelector(SELECTORS.DEFAULT_VALUE_INPUT).type("1000.50");
// Verify default currency
cy.getBySelector(SELECTORS.DEFAULT_VALUE_INPUT).contains("PHP");
// Click done
cy.getBySelector(SELECTORS.SAVE_FIELD_BUTTON).should("exist").click();
cy.getBySelector(SELECTORS.ADD_FIELD_MODAL).should("not.exist");

cy.wait("@getFields");

// Check if field exists
cy.getBySelector(`Field_${fieldName}`).should("exist");
});

it("Creates a field via add another field button", () => {
cy.intercept("**/fields?showDeleted=true").as("getFields");

Expand Down
150 changes: 150 additions & 0 deletions public/images/flags/ad.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions public/images/flags/ae.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
81 changes: 81 additions & 0 deletions public/images/flags/af.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions public/images/flags/ag.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions public/images/flags/ai.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions public/images/flags/al.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions public/images/flags/am.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions public/images/flags/ao.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions public/images/flags/aq.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions public/images/flags/ar.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading