Skip to content

Commit

Permalink
cypress admin configure language optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
msmannan00 committed Nov 14, 2024
1 parent d14f2c9 commit cf4a8d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<div class="form-group">
<label>{{ 'Homepage title' | translate }}</label>
<div>
<textarea class="form-control" name="node.dataModel.header_title_homepage" [attr.data-cy]="'header_title_homepage'" [(ngModel)]="nodeResolver.dataModel.header_title_homepage"></textarea>
<textarea class="form-control" name="node.dataModel.header_title_homepage" [(ngModel)]="nodeResolver.dataModel.header_title_homepage"></textarea>
</div>
</div>
<div class="form-group">
Expand Down
5 changes: 2 additions & 3 deletions client/cypress/e2e/11-test-admin-configure-languages.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe("admin configure languages", () => {

cy.waitForUrl("/#/admin/settings");
cy.get('#LanguagePickerBox').should('be.visible').find('ng-select').last().click().get('ng-dropdown-panel').contains('Italiano').click();
cy.get('[data-cy="header_title_homepage"]').clear().type("TEXT1_IT");
cy.get('[name="node.dataModel.header_title_homepage"]').clear().type("TEXT1_IT");
cy.get('[name="node.dataModel.presentation"]').clear().type("TEXT2_IT");
cy.get('button.btn.btn-primary').eq(0).get("#save_settings").click();

Expand Down Expand Up @@ -60,8 +60,7 @@ describe("admin configure languages", () => {
cy.visit("/#/admin/settings");
cy.waitForUrl("/#/admin/settings");
cy.get('#LanguagePickerBox').should('be.visible', { timeout: 10000 }).find('ng-select').last().click().get('ng-dropdown-panel').contains('Italian').click();
cy.get('[data-cy="header_title_homepage"]').clear();

cy.get('[name="node.dataModel.header_title_homepage"]').clear();
cy.get('[name="node.dataModel.presentation"]').clear();
cy.get('button.btn.btn-primary').eq(0).get("#save_settings").click();

Expand Down

0 comments on commit cf4a8d4

Please sign in to comment.