Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Updated another set of third party urls #36571

Merged
merged 12 commits into from
Oct 4, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ import EditorNavigation, {

const ppt =
"https://ssz.sgp1.digitaloceanspaces.com/3ZEO2582C29EA0KKK2/ppt-on-population-pptxafa26c44-208f-46a3-89cc-8a5c020b6863.pptx";
const pngImage =
"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRb8umIiCU_K6ac-xS-ni4y6SP7XAd8C7Ms3Q&usqp=CAU";
const pngImage = "https://www.appsmith.com/favicon.png";
const jpgImage =
"https://community.appsmith.com/sites/default/files/styles/small_thumbnail/public/2024-03/aws-logo.jpg?itok=yG4bpfFs";
"https://community.appsmith.com/sites/default/files/styles/small_thumbnail/public/2024-03/aws-logo.jpg";
sagar-qa007 marked this conversation as resolved.
Show resolved Hide resolved
const pdf =
"https://www.learningcontainer.com/wp-content/uploads/2019/09/sample-pdf-file.pdf";

Expand Down Expand Up @@ -212,10 +211,7 @@ describe(
agHelper.AssertElementExist(
locators._widgetInDeployed("documentviewerwidget"),
);
agHelper.AssertContains(
"Current file type is not supported",
"not.exist",
);
agHelper.AssertContains("Current file type is not supported");
sagar-qa007 marked this conversation as resolved.
Show resolved Hide resolved
deployMode.NavigateBacktoEditor();
//Should not show an jpg image file"
EditorNavigation.SelectEntityByName("DocumentViewer1", EntityType.Widget);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ describe(
{ tags: ["@tag.Widget", "@tag.Modal"] },
function () {
const image = (src: string) => 'img[src="' + src + '"]';
const jpgImg = "https://jpeg.org/images/jpegsystems-home.jpg";
const gifImg =
"https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/5eeea355389655.59822ff824b72.gif";
const jpgImg =
Copy link
Member

Choose a reason for hiding this comment

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

@sagar-qa007 QQ: These images are still external to the Appsmith product. What would happen if the Devrel team decided to change or remove this image? Wouldn't this still lead to flakiness in the product?

Would it be possible to bring these images in control of TED? Or is there a technical limitation in doing so?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We initially attempted to store the Docker images locally, but the test case requires loading an image via HTTPS for the deployed application. While adding the images to a CDN was considered, it was not deemed an ideal solution. However, the logos selected are from stable sources that are unlikely to change frequently, minimizing potential issues with third-party hosting within appsmith.

Copy link
Member

Choose a reason for hiding this comment

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

@sagar-qa007 Why was a CDN solution deemed not ideal? Can you throw some light into this?

"https://community.appsmith.com/sites/default/files/styles/small_thumbnail/public/2024-03/aws-logo.jpg";
const gifImg = "https://docs.appsmith.com/img/multi-update-sql.gif";
sagar-qa007 marked this conversation as resolved.
Show resolved Hide resolved

it("1. Modal widget functionality", () => {
entityExplorer.DragDropWidgetNVerify(draggableWidgets.BUTTON);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,32 +30,35 @@ describe(
_.deployMode.DeployApp();

//_.table.SelectTableRow(1)

_.table.ReadTableRowColumnData(0, 0).then(($cellData) => {
expect($cellData).to.eq("1376499.jpg");
expect($cellData).contains("cube-logo_S50__hLNq.jpeg");
});

_.table.ReadTableRowColumnData(1, 0).then(($cellData) => {
expect($cellData).to.eq("https://wallpaperaccess.com/full/1688623.jpg");
expect($cellData).to.eq(
"https://docs.appsmith.com/img/Appsmith-Login-Screen-Shows-SAML.jpg",
);
});

_.table.ReadTableRowColumnData(2, 0).then(($cellData) => {
expect($cellData).to.eq("2117775.jpg");
expect($cellData).contains("zapier-logo_odZ9wZQ3vY.jpeg");
});

_.table.ReadTableRowColumnData(3, 0).then(($cellData) => {
expect($cellData).to.eq("https://wallpaperaccess.com/full/812632.jpg");
expect($cellData).to.eq(
"https://docs.appsmith.com/img/replyto-logo_6yaZHFIeU.jpeg",
);
});

_.table.AssertURLColumnNavigation(
0,
0,
"https://wallpaperaccess.com/full/1376499.jpg",
"https://docs.appsmith.com/img/cube-logo_S50__hLNq.jpeg",
);
// _.table.AssertURLColumnNavigation(
// 3,
sagar-qa007 marked this conversation as resolved.
Show resolved Hide resolved
// 0,
// "https://wallpaperaccess.com/full/812632.jpg",
// "https://docs.appsmith.com/img/replyto-logo_6yaZHFIeU.jpeg",
// );

_.deployMode.NavigateBacktoEditor();
Expand All @@ -73,30 +76,34 @@ describe(
_.deployMode.DeployApp();

_.table.ReadTableRowColumnData(0, 0).then(($cellData) => {
expect($cellData).to.eq("1376499.jpg");
expect($cellData).contains("cube-logo_S50__hLNq.jpeg");
});

_.table.ReadTableRowColumnData(1, 0).then(($cellData) => {
expect($cellData).to.eq("https://wallpaperaccess.com/full/1688623.jpg");
expect($cellData).to.eq(
"https://docs.appsmith.com/img/Appsmith-Login-Screen-Shows-SAML.jpg",
);
});

_.table.ReadTableRowColumnData(2, 0).then(($cellData) => {
expect($cellData).to.eq("2117775.jpg");
expect($cellData).contains("zapier-logo_odZ9wZQ3vY.jpeg");
});

_.table.ReadTableRowColumnData(3, 0).then(($cellData) => {
expect($cellData).to.eq("https://wallpaperaccess.com/full/812632.jpg");
expect($cellData).to.eq(
"https://docs.appsmith.com/img/replyto-logo_6yaZHFIeU.jpeg",
);
});

_.table.AssertURLColumnNavigation(
1,
0,
"https://wallpaperaccess.com/full/1688623.jpg",
"https://docs.appsmith.com/img/Appsmith-Login-Screen-Shows-SAML.jpg",
);
// _.table.AssertURLColumnNavigation(
// 2,
// 0,
// "https://wallpaperaccess.com/full/2117775.jpg",
// "https://docs.appsmith.com/img/zapier-logo_odZ9wZQ3vY.jpeg",
// );

_.deployMode.NavigateBacktoEditor();
Expand All @@ -114,30 +121,34 @@ describe(
_.deployMode.DeployApp();

_.table.ReadTableRowColumnData(0, 0).then(($cellData) => {
expect($cellData).to.eq("1376499.jpg");
expect($cellData).contains("cube-logo_S50__hLNq.jpeg");
});

_.table.ReadTableRowColumnData(1, 0).then(($cellData) => {
expect($cellData).to.eq("https://wallpaperaccess.com/full/1688623.jpg");
expect($cellData).to.eq(
"https://docs.appsmith.com/img/Appsmith-Login-Screen-Shows-SAML.jpg",
);
});

_.table.ReadTableRowColumnData(2, 0).then(($cellData) => {
expect($cellData).to.eq("2117775.jpg");
expect($cellData).contains("zapier-logo_odZ9wZQ3vY.jpeg");
});

_.table.ReadTableRowColumnData(3, 0).then(($cellData) => {
expect($cellData).to.eq("https://wallpaperaccess.com/full/812632.jpg");
expect($cellData).to.eq(
"https://docs.appsmith.com/img/replyto-logo_6yaZHFIeU.jpeg",
);
});

_.table.AssertURLColumnNavigation(
0,
0,
"https://wallpaperaccess.com/full/1376499.jpg",
"https://docs.appsmith.com/img/cube-logo_S50__hLNq.jpeg",
);
// _.table.AssertURLColumnNavigation(
// 3,
// 0,
// "https://wallpaperaccess.com/full/812632.jpg",
// "https://docs.appsmith.com/img/replyto-logo_6yaZHFIeU.jpeg",
// );

_.deployMode.NavigateBacktoEditor();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const TABLE_DATA_2 = `[
"name": "Barty Crouch",
"status": "APPROVED",
"gender": "",
"avatar": "https://robohash.org/sednecessitatibuset.png?size=100x100&set=set1",
"avatar": "http://host.docker.internal:4200/clouddefaultImage.png",
"email": "[email protected]",
"address": "St Petersberg #911 4th main",
"createdAt": "2020-03-16T18:00:05.000Z",
Expand All @@ -73,7 +73,7 @@ const TABLE_DATA_2 = `[
"name": "Jenelle Kibbys",
"status": "APPROVED",
"gender": "Female",
"avatar": "https://robohash.org/quiaasperiorespariatur.bmp?size=100x100&set=set1",
"avatar": "http://host.docker.internal:4200/453-200x300.jpg",
"email": "[email protected]",
"address": "85 Tennessee Plaza",
"createdAt": "2019-10-04T03:22:23.000Z",
Expand All @@ -84,7 +84,7 @@ const TABLE_DATA_2 = `[
"name": "Demetre",
"status": "APPROVED",
"gender": "Male",
"avatar": "https://robohash.org/iustooptiocum.jpg?size=100x100&set=set1",
"avatar": "http://host.docker.internal:4200/clouddefaultImage.png",
"email": "[email protected]",
"address": "262 Saint Paul Park",
"createdAt": "2020-05-01T17:30:50.000Z",
Expand All @@ -95,7 +95,7 @@ const TABLE_DATA_2 = `[
"name": "Tobin Shellibeer",
"status": "APPROVED",
"gender": "Male",
"avatar": "https://robohash.org/odioeumdolores.png?size=100x100&set=set1",
"avatar": "http://host.docker.internal:4200/453-200x300.jpg",
"email": "[email protected]",
"address": "4 Ridgeway Lane",
"createdAt": "2019-11-27T06:09:41.000Z",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ describe(
"Ensure XSS vulnerability are handled",
{ tags: ["@tag.Datasource"] },
() => {
const test_rest_api_url1 = "https://jsonplaceholder.typicode.com/users";
const test_rest_api_url1 =
"http://host.docker.internal:5001/v1/mock-api?records=20";

it("1. Ensures xss scripts are not executed when an API is run.", () => {
apiPage.CreateApi("FirstAPI");
Expand Down
Loading
Loading