Skip to content

Upgrade tests to html2 (part 2) #5543

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
5 changes: 0 additions & 5 deletions __tests__/html/activity.unknownActivity.js

This file was deleted.

5 changes: 0 additions & 5 deletions __tests__/html/activity.unknownAttachment.js

This file was deleted.

This file was deleted.

5 changes: 0 additions & 5 deletions __tests__/html/activityGrouping.avatarMiddleware.js

This file was deleted.

5 changes: 0 additions & 5 deletions __tests__/html/activityGrouping.customMiddleware.js

This file was deleted.

6 changes: 0 additions & 6 deletions __tests__/html/activityGrouping.disableTimestamp.js

This file was deleted.

6 changes: 0 additions & 6 deletions __tests__/html/activityGrouping.groupingActivityStatus.js

This file was deleted.

5 changes: 0 additions & 5 deletions __tests__/html/activityGrouping.legacyActivityMiddleware.js

This file was deleted.

This file was deleted.

6 changes: 0 additions & 6 deletions __tests__/html/activityStatus.sendFailed.noEchoBack.js

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

6 changes: 0 additions & 6 deletions __tests__/html/activityStatusTelemetry.sendingToSent.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
await pageObjects.sendMessageViaSendBox('unknown activity');
await pageConditions.minNumActivitiesShown(1);

await host.snapshot();
// This snapshot differs with NODE_ENV, we need to make it pass in NODE_ENV !== 'production'
await host.snapshot('local');
},
{ ignoreErrors: true }
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en-US">
<head>
<link href="/assets/index.css" rel="stylesheet" type="text/css" />
Expand All @@ -23,7 +23,8 @@
await pageObjects.sendMessageViaSendBox('unknown attachment');
await pageConditions.minNumActivitiesShown(2);

await host.snapshot();
// This snapshot differs with NODE_ENV, we need to make it pass in NODE_ENV !== 'production'
await host.snapshot('local');
},
{ ignoreErrors: true }
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
await pageConditions.uiConnected();
await pageConditions.allImagesLoaded();

await host.snapshot();
await host.snapshot('local');
});
</script>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@
await pageConditions.uiConnected();
await pageConditions.allImagesLoaded();

await host.snapshot();
await host.snapshot('local');
});
</script>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,16 @@

await directLine.emulateIncomingActivity('Quis sit aliquip sit velit in velit magna culpa velit qui.');

await host.snapshot();
await host.snapshot('local');

clock.tick(29000);

await host.snapshot();
await host.snapshot('local');

await resolveAll1();
await resolveAll2();

await host.snapshot();
await host.snapshot('local');
});
</script>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,23 +73,23 @@
const sendMessage5 = await directLine.emulateOutgoingActivity('This activity is being sent.');

clock.tick(4000);
await host.snapshot();
await host.snapshot('local');

clock.tick(1000);
await sendMessage5.echoBack(activity => ({
...activity,
text: 'Nostrud proident nisi dolore deserunt veniam labore labore mollit veniam.'
}));
sendMessage5.resolvePostActivity();
await host.snapshot();
await host.snapshot('local');

clock.tick(1000);
await sendMessage2.echoBack(activity => ({
...activity,
text: 'Excepteur culpa culpa ullamco consectetur et dolor excepteur cillum enim nostrud ex do.'
}));
sendMessage2.resolvePostActivity();
await host.snapshot();
await host.snapshot('local');
});
</script>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
await pageConditions.scrollToBottomCompleted();
await pageConditions.allImagesLoaded();

await host.snapshot();
await host.snapshot('local');
});
</script>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@
'This message should have status "Sending...", then turn to "Send failed".'
);

await host.snapshot();
await host.snapshot('local');

clock.tick(20000);

await host.snapshot();
await host.snapshot('local');
});
</script>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@
// THEN: The message should have status of "Sending".
await activityStatusInnerTextContained('Sending');

// THEN: It should match snapshot.
await host.snapshot('local');

// WHEN: After 20 seconds.
clock.tick(20000);

Expand All @@ -93,6 +96,9 @@
// This is because the message passed 20s as defined in `styleOptions.sendTimeout`.
await activityStatusInnerTextContained('Send failed. Retry.');

// THEN: It should match snapshot.
await host.snapshot('local');

// WHEN: After 280 seconds (at t=5m).
clock.tick(280000);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en-US">
<head>
<link href="/assets/index.css" rel="stylesheet" type="text/css" />
Expand Down Expand Up @@ -70,6 +70,9 @@
// THEN: The message should have status of "Sending".
await activityStatusInnerTextContained('Sending');

// THEN: It should match snapshot.
await host.snapshot('local');

// WHEN: `postActivity` is rejected.
sendMessage.rejectPostActivity(new Error('artificial error'));

Expand All @@ -84,6 +87,9 @@

// THEN: The message should have status of "Send failed. Retry.".
await activityStatusInnerTextContained('Send failed. Retry.');

// THEN: It should match snapshot.
await host.snapshot('local');
},
{ ignoreErrors: true }
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@
// THEN: The message should have status of "Sending".
await activityStatusInnerTextContained('Sending');

// THEN: It should match snapshot.
await host.snapshot('local');

// WHEN: After 20 seconds (at t=20s).
clock.tick(20000);

Expand All @@ -101,6 +104,9 @@
// THEN: The message should have status of "Send failed", based on `styleOptions.sendTimeout`.
await activityStatusInnerTextContained('Send failed');

// THEN: It should match snapshot.
await host.snapshot('local');

// WHEN: After 280 seconds (at t=5m).
clock.tick(280000);

Expand Down
Loading