Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ protected void doVerifySteps()

log("Check url's to are correctly constructed");
final String url = WebTestHelper.buildRelativeUrl("study", PROJECT_NAME + "/" + FOLDER_NAME, "dataset",
Maps.of("datasetId", 5018,
"Dataset.ParticipantId~in", PTID_NO_ALIAS + ";" + PTID_NEW_2));
Maps.of("datasetId", 5018, "Dataset.ParticipantId~in", PTID_NO_ALIAS + ";" + PTID_NEW_2))
.replace("%7E", "~"); // '~' isn't encoded in href
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this substitution generalizable for other use cases? Asking to prompt the question whether this should be done in a helper vs. in test code

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't count on it. There are a lot of "valid" encodings and I doubt we're consistent on the product side. We should probably avoid finding elements by href attribute like this. It would be preferable to grab the link by some other means and decode it.

assertElementPresent(Locator.linkWithHref(url));

log("Resolve conflicts and check for correct row retention");
Expand All @@ -148,8 +148,8 @@ protected void doVerifySteps()
clickTab(SUBJECT_NOUN_PLURAL);
waitAndClick(Locator.linkWithText(PTID_NEW_2));
waitForElement(Locator.tag("th").containing("5008: Demographics"));
assertElementPresent(Locator.tag("td").containing("Start Date").append("/following-sibling::td['2008-04-27']")); //value from oldId demographic row
assertElementPresent(Locator.tag("td").containing("Genetic Consent").append("/following-sibling::td['false']")); //value from newId consent row
assertElementPresent(Locator.tag("td").containing("Start Date").followingSibling("td").withText("2008-04-27")); //value from oldId demographic row
assertElementPresent(Locator.tag("td").containing("Genetic Consent").followingSibling("td").withText("false")); //value from newId consent row
}

private void configureAliases()
Expand Down
Loading