@remit/ui 0.0.183 → 0.0.184

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/ui",
3
- "version": "0.0.183",
3
+ "version": "0.0.184",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src"
@@ -641,7 +641,7 @@ describe("RunStepBody", () => {
641
641
  assert.match(html, /The rule itself is saved/);
642
642
  });
643
643
 
644
- it("says a stopped run was never sent rather than rejected", () => {
644
+ it("says a stopped run went unconfirmed rather than rejected", () => {
645
645
  const html = renderToString(
646
646
  createElement(RunStepBody, {
647
647
  ...runProps,
@@ -653,8 +653,8 @@ describe("RunStepBody", () => {
653
653
  }),
654
654
  );
655
655
  assert.match(html, /Stopped after 2/);
656
- assert.match(html, /nothing was sent for them/);
657
- assert.match(html, /Never sent/);
656
+ assert.match(html, /The rest were not sent/);
657
+ assert.match(html, /Not confirmed/);
658
658
  assert.doesNotMatch(html, /Server rejected/);
659
659
  });
660
660
 
@@ -998,9 +998,11 @@ export function RunStepBody(props: RunStepProps) {
998
998
  const { matched, applied, failures } = props;
999
999
  const outcome = runOutcomeOf(props);
1000
1000
  const copy = runCopy(outcome);
1001
- // A stopped run never sent these, so nothing rejected them.
1001
+ // A stopped run confirmed none of these: most were never sent, and the ones
1002
+ // on their way when the stop landed may have gone through anyway. Neither is
1003
+ // a rejection, so neither can be badged as one.
1002
1004
  const failureBadge =
1003
- props.state === "runStopped" ? "Never sent" : "Server rejected";
1005
+ props.state === "runStopped" ? "Not confirmed" : "Server rejected";
1004
1006
 
1005
1007
  return (
1006
1008
  <div className="space-y-4 pt-2">
@@ -588,12 +588,15 @@ describe("runCopy", () => {
588
588
 
589
589
  it("separates a run that stopped from a pass the server rejected", () => {
590
590
  // The bulk endpoints accept every id in a call that returns, so the only
591
- // failure the chunked runner can observe is a call that threw — and
592
- // everything after it was never sent. Saying the mail server rejected
593
- // those states a cause that did not happen.
591
+ // failure the chunked runner can observe is a call that threw or was
592
+ // aborted — and everything after it was never sent. Saying the mail server
593
+ // rejected those states a cause that did not happen. Stopping aborts the
594
+ // request on the wire without un-sending it (#113), so the copy stops short
595
+ // of promising that batch never landed either.
594
596
  const stopped = outcome("runStopped", "once");
595
597
  assert.equal(stopped.title, "Stopped after 10");
596
- assert.match(stopped.detail, /nothing was sent for them/);
598
+ assert.match(stopped.detail, /The rest were not sent/);
599
+ assert.match(stopped.detail, /may still have gone through/);
597
600
  assert.doesNotMatch(stopped.detail, /rejected/);
598
601
  assert.equal(stopped.retryLabel, "Retry 2");
599
602
  assert.equal(stopped.showProgress, true);
@@ -602,7 +602,7 @@ export const runCopy = ({
602
602
  return {
603
603
  ...shared,
604
604
  title: `Stopped after ${applied}`,
605
- detail: `${applied} of ${matched} ${done}. The run stopped before it reached the rest, so nothing was sent for them and nothing has happened to them.`,
605
+ detail: `${applied} of ${matched} ${done}. The rest were not sent, apart from the ones already on their way when you stopped — those may still have gone through.`,
606
606
  tone: "warning",
607
607
  dismissLabel: "Close",
608
608
  retryLabel: `Retry ${failed}`,