Skip to content

Commit

Permalink
test case optimizations
Browse files Browse the repository at this point in the history
File Upload Completion Checks: Ensured files are fully uploaded before further processing.
Homepage Header Title Fix: Resolved ID fetch issue.
  • Loading branch information
msmannan00 committed Nov 14, 2024
1 parent 6f9dbe4 commit d14f2c9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 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" [(ngModel)]="nodeResolver.dataModel.header_title_homepage"></textarea>
<textarea class="form-control" name="node.dataModel.header_title_homepage" [attr.data-cy]="'header_title_homepage'" [(ngModel)]="nodeResolver.dataModel.header_title_homepage"></textarea>
</div>
</div>
<div class="form-group">
Expand Down
5 changes: 3 additions & 2 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('[name="node.dataModel.header_title_homepage"]').clear().type("TEXT1_IT");
cy.get('[data-cy="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,7 +60,8 @@ 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('[name="node.dataModel.header_title_homepage"]').clear();
cy.get('[data-cy="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
3 changes: 3 additions & 0 deletions client/cypress/e2e/15-test-admin-configure-network.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,21 @@ describe("admin configure network", () => {
fileName: "key.pem",
mimeType: "application/x-pem-file"
}, {"force": true});
cy.get("#deleteKey").should('be.visible')

cy.get("div.card.cert input[type=file]").selectFile({
contents: "../backend/globaleaks/tests/data/https/valid/cert.pem",
fileName: "cert.pem",
mimeType: "application/x-pem-file"
}, {"force": true});
cy.get("#deleteCert").should('be.visible')

cy.get("div.card.chain input[type=file]").selectFile({
contents: "../backend/globaleaks/tests/data/https/valid/chain.pem",
fileName: "chain.pem"
}, {"force": true});

cy.get("#deleteChain").should('be.visible')
cy.get("#deleteChain").click();
cy.get("#modal-action-ok").click();

Expand Down

0 comments on commit d14f2c9

Please sign in to comment.