You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -53,30 +52,30 @@ function renderApp(gitlabUrl: string) {
53
52
);
54
53
}
55
54
56
-
test(
55
+
test.serial(
57
56
'deletes 4 old pipelines that are older than 30 days',
58
-
withGitLabServer({},async(url)=>{
57
+
withGitLabServer({},async(t,url)=>{
59
58
const{ lastFrame, frames }=renderApp(url);
60
59
awaitwaitUntilDeleted(frames);
61
60
62
61
constactual=lastFrame();
63
62
constexpected=
64
63
'4 pipelines found\nDeleting pipeline with id 32 for project 42\nDeleting pipeline with id 33 for project 42\nDeleting pipeline with id 34 for project 42\nDeleting pipeline with id 35 for project 42\n\u001b[32mPipelines deleted\u001b[39m';
65
-
assert.equal(actual,expected);
64
+
65
+
t.is(actual,expected);
66
66
}),
67
67
);
68
68
69
-
test(
69
+
test.serial(
70
70
'fails with the response error message when a GitLab delete request fails',
"35 pipelines found\nDeleting pipeline with id 36 for project 42\nDeleting pipeline with id 37 for project 42\nDeleting pipeline with id 38 for project 42\nDeleting pipeline with id 39 for project 42\nDeleting pipeline with id 40 for project 42\nDeleting pipeline with id 41 for project 42\n\u001b[31mThere was an error while deleting the pipelines: Response code 418 (I'm a Teapot)\u001b[39m";
@@ -74,10 +74,11 @@ test('shows the delete progress while it deletes the pipelines', async () => {
74
74
constactual=lastFrame();
75
75
constexpected=
76
76
'5 pipelines found\nDeleting pipeline with id 1 for project 42\nDeleting pipeline with id 2 for project 42\nDeleting pipeline with id 3 for project 42\nDeleting pipeline with id 4 for project 42\nDeleting pipeline with id 5 for project 42\n\u001b[32mPipelines deleted\u001b[39m';
77
-
assert.equal(actual,expected);
77
+
78
+
t.is(actual,expected);
78
79
});
79
80
80
-
test('deletes pipelines of multiple projects',async()=>{
81
+
test.serial('deletes pipelines of multiple projects',async(t)=>{
'3 pipelines found\nDeleting pipeline with id 6 for project 1\nDeleting pipeline with id 7 for project 3\nDeleting pipeline with id 8 for project 3\n\u001b[32mPipelines deleted\u001b[39m';
97
-
assert.equal(actual,expected);
98
+
99
+
t.is(actual,expected);
98
100
});
99
101
100
-
test('renders an error message when an error occurred',async()=>{
102
+
test.serial('renders an error message when an error occurred',async(t)=>{
@@ -119,21 +122,24 @@ test('renders an error message when a delete request fails', async () => {
119
122
constactual=lastFrame();
120
123
constexpected=
121
124
'1 pipelines found\nDeleting pipeline with id 9 for project 42\n\u001b[31mThere was an error while deleting the pipelines: Failed to delete\u001b[39m';
122
-
assert.equal(actual,expected);
123
-
});
124
-
125
-
test('renders an error message with stack trace when an error occurred and showStackTraces is true',async()=>{
126
-
consterror=newError('Test Error');
127
-
error.stack='the-stack-trace';
128
-
const{ lastFrame }=renderApp({
129
-
listPipelines: sinon.fake.rejects(error),
130
-
showStackTraces: true,
131
-
});
132
-
awaitdelay(1);
133
125
134
-
constactual=lastFrame();
135
-
constexpected='\u001b[31mThere was an error while deleting the pipelines: the-stack-trace\u001b[39m';
136
-
assert.equal(actual,expected);
126
+
t.is(actual,expected);
137
127
});
138
128
139
-
test.run();
129
+
test.serial(
130
+
'renders an error message with stack trace when an error occurred and showStackTraces is true',
131
+
async(t)=>{
132
+
consterror=newError('Test Error');
133
+
error.stack='the-stack-trace';
134
+
const{ lastFrame }=renderApp({
135
+
listPipelines: sinon.fake.rejects(error),
136
+
showStackTraces: true,
137
+
});
138
+
awaitdelay(1);
139
+
140
+
constactual=lastFrame();
141
+
constexpected='\u001b[31mThere was an error while deleting the pipelines: the-stack-trace\u001b[39m';
0 commit comments