21448: expanded copy to oclipboard change Arvados-DCO-1.1-Signed-off-by: Lisa Knox...
[arvados.git] / services / workbench2 / cypress / e2e / search.cy.js
index 1bf2b5c3efb4b83a8bdd8324f751ffb67d7b53c5..094a3f618c64c1502b66f2227eef6ca7c192c65e 100644 (file)
@@ -169,7 +169,7 @@ describe("Search tests", function () {
 
         // Intercept config to insert remote cluster
         cy.intercept({ method: "GET", hostname: "127.0.0.1", url: "**/arvados/v1/config?nocache=*" }, req => {
-            req.reply(res => {
+            req.on('response', res => {
                 res.body.RemoteClusters = {
                     "*": res.body.RemoteClusters["*"],
                     xxxxx: {
@@ -249,7 +249,7 @@ describe("Search tests", function () {
 
             // Intercept search results to add federated result
             cy.intercept({ method: "GET", url: "**/arvados/v1/groups/contents?*" }, req => {
-                req.reply(res => {
+                req.on('response', res => {
                     res.body.items = [
                         res.body.items[0],
                         {
@@ -271,17 +271,17 @@ describe("Search tests", function () {
                 cy.stub(win, "open").as("Open");
             });
 
-            // Check copy to clipboard
+            // Check Copy link to clipboard
             cy.get("[data-cy=search-results]").contains(colName).rightclick();
             cy.get("[data-cy=context-menu]").within(ctx => {
                 // Check that there are 4 items in the menu
                 cy.get(ctx).children().should("have.length", 4);
                 cy.contains("API Details");
-                cy.contains("Copy to clipboard");
+                cy.contains("Copy link to clipboard");
                 cy.contains("Open in new tab");
                 cy.contains("View details");
 
-                cy.contains("Copy to clipboard").click();
+                cy.contains("Copy link to clipboard").click();
                 cy.waitForDom();
                 cy.window().then(win =>
                     win.navigator.clipboard.readText().then(text => {
@@ -298,10 +298,10 @@ describe("Search tests", function () {
                 cy.get("@Open").should("have.been.calledOnceWith", `${window.location.origin}/collections/${testCollection.uuid}`);
             });
 
-            // Check federated result copy to clipboard
+            // Check federated result Copy link to clipboard
             cy.get("[data-cy=search-results]").contains(federatedColName).rightclick();
             cy.get("[data-cy=context-menu]").within(() => {
-                cy.contains("Copy to clipboard").click();
+                cy.contains("Copy link to clipboard").click();
                 cy.waitForDom();
                 cy.window().then(win =>
                     win.navigator.clipboard.readText().then(text => {