mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-19 00:41:31 +00:00
Initial Move from Azure DevOps to GitHub
This commit is contained in:
56
cypress/utilities/connectionString.js
Normal file
56
cypress/utilities/connectionString.js
Normal file
@@ -0,0 +1,56 @@
|
||||
module.exports = {
|
||||
loginUsingConnectionString: function (api) {
|
||||
|
||||
|
||||
const prodUrl = "https://cosmos.azure.com/";
|
||||
const timeout = 15000;
|
||||
|
||||
cy.visit(prodUrl);
|
||||
cy.get('iframe[id="explorerMenu"]').should("be.visible");
|
||||
|
||||
cy.get("iframe").then($element => {
|
||||
const $body = $element.contents().find("body");
|
||||
|
||||
cy.wrap($body)
|
||||
.find("#connectExplorer")
|
||||
.should("exist")
|
||||
.find("div[class='connectExplorer']")
|
||||
.should("exist")
|
||||
.find("p[class='welcomeText']")
|
||||
.should("exist");
|
||||
|
||||
cy.wrap($body.find("div > p.switchConnectTypeText"))
|
||||
.should("exist")
|
||||
.last()
|
||||
.click({ force: true });
|
||||
|
||||
const secret = Cypress.env('connectionString')[api];
|
||||
|
||||
cy.wrap($body)
|
||||
.find("input[class='inputToken']")
|
||||
.should("exist")
|
||||
.type(secret, {
|
||||
force: true
|
||||
});
|
||||
|
||||
cy.wrap($body.find("input[value='Connect']"), { timeout })
|
||||
.first()
|
||||
.click({ force: true });
|
||||
|
||||
cy.wait(15000);
|
||||
|
||||
cy.wrap($body)
|
||||
.find(".connectExplorer > p:nth-child(3)")
|
||||
.should("be.visible");
|
||||
|
||||
});
|
||||
},
|
||||
constants:{
|
||||
sql: "sql",
|
||||
mongo: "mongo",
|
||||
table: "table",
|
||||
graph: "graph",
|
||||
cassandra: "cassandra"
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user