Skip to content

Commit

Permalink
Merge pull request #2417 from concord-consortium/188355313-fix-cypres…
Browse files Browse the repository at this point in the history
…s-test

Fix Cypress Tests
  • Loading branch information
scytacki authored Sep 30, 2024
2 parents 8935985 + 4b252fe commit 3f37fc1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cypress/support/elements/common/SortedWork.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class SortedWork {
return cy.get("[data-test=list-item-all]");
}
openSortWorkSection(sectionLabel) {
return cy.get(".sort-work-view .sorted-sections .section-header-label").contains(sectionLabel).get(".section-header-right .section-header-arrow").click({multiple: true});
return cy.get(".sort-work-view .sorted-sections .section-header-label").contains(".section-header-label", sectionLabel).find(".section-header-arrow").click();
}
checkDocumentInGroup(groupName, doc) {
this.getSortWorkGroup(groupName).find(".documents-list .list-item .footer .info").should("contain", doc);
Expand Down
4 changes: 2 additions & 2 deletions cypress/support/elements/tile/DataflowToolTile.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,13 +242,13 @@ class DataflowToolTile {
recordData(samplingRate, timer) {
this.selectSamplingRate(samplingRate);
this.getRecordButton().click();
this.getCountdownTimer().should("contain", "000:0" + timer.toString());
this.getCountdownTimer({timeout: (timer + 2) * 1000}).should("contain", "000:0" + timer.toString());
this.getStopButton().click();
}
recordDataWithoutStop(samplingRate, timer) {
this.selectSamplingRate(samplingRate);
this.getRecordButton().click();
this.getCountdownTimer().should("contain", "000:0" + timer.toString());
this.getCountdownTimer({timeout: (timer + 2) * 1000}).should("contain", "000:0" + timer.toString());
}
clearRecordedData() {
this.getRecordingClearButton().click();
Expand Down
5 changes: 3 additions & 2 deletions src/models/stores/sorted-documents.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { makeAutoObservable } from "mobx";
import { makeAutoObservable, runInAction } from "mobx";
import { types, Instance, SnapshotIn, applySnapshot, typecheck, unprotect } from "mobx-state-tree";
import { union } from "lodash";
import firebase from "firebase";
Expand Down Expand Up @@ -310,7 +310,8 @@ export class SortedDocuments {
problem: doc.problem,
unit: doc.unit
});
docsMap.put(metadata);
// MST's unprotect doesn't disable MobX's strict mode warnings
runInAction(() => docsMap.put(metadata));
});
return docsMap;
}
Expand Down

0 comments on commit 3f37fc1

Please sign in to comment.