1
00:00:00,150 --> 00:00:04,500
In this next hour, we're going to discuss how we can integrate playwrite with GitHub actions.

2
00:00:04,800 --> 00:00:10,110
So Goodlove Actions is one of the popular continuous integration and continuous deployment platform.

3
00:00:10,290 --> 00:00:14,520
It is kind of free if you're going to be using your repository as a public wrapper.

4
00:00:15,000 --> 00:00:20,790
But if you're going to have a private wrapper that you're going to use it for your organizations, you

5
00:00:20,790 --> 00:00:22,230
should have a license for that.

6
00:00:22,230 --> 00:00:27,300
But for our demonstration, because I'm just using the public wrapper and also it's not for the commercial

7
00:00:27,300 --> 00:00:28,430
purpose which I'm doing it.

8
00:00:28,710 --> 00:00:32,300
So it's going to be free for me while I'm going to show you the demo.

9
00:00:32,310 --> 00:00:35,350
I mean, you can do it yourself if you have a GitHub report as well.

10
00:00:35,380 --> 00:00:40,920
So all you're going to do for having this demonstration to work for you, you need to have a good rapport

11
00:00:41,100 --> 00:00:45,210
and you're going to be checking in the code like how I'm actually going to be doing and things.

12
00:00:45,540 --> 00:00:47,250
So it's going to be very, very straightforward.

13
00:00:47,380 --> 00:00:50,050
I can probably show you what GitHub is all about.

14
00:00:50,070 --> 00:00:59,250
So if I going to show you this GitHub repo, so if I just go to the GitHub and if you can see over here,

15
00:00:59,430 --> 00:01:05,780
GitHub, dot com slash extradimensional, this is our repository that we have been talking about and

16
00:01:05,800 --> 00:01:13,590
have shown you some of the examples from this GitHub repo, like selenium with cucumber for the Java

17
00:01:13,590 --> 00:01:14,100
project.

18
00:01:14,400 --> 00:01:20,220
And that's exactly what we'll be doing over here, that we are going to check in our core, the playwright

19
00:01:20,220 --> 00:01:24,780
code on this GitHub repo, and then we'll be using GitHub actions.

20
00:01:25,950 --> 00:01:31,800
So if I just search for GitHub actions, this guy this is the another continuous integration workflow

21
00:01:31,980 --> 00:01:35,010
that we are going to be using to run our test.

22
00:01:35,010 --> 00:01:39,450
And then we'll see how the test results are going to be running and how it's going to generate videos

23
00:01:39,450 --> 00:01:40,440
and things of that nature.

24
00:01:40,470 --> 00:01:47,280
So that's what we'll be doing in this particular couple of discussions that we'll be doing as a part

25
00:01:47,280 --> 00:01:48,770
of GitHub actions, integration.

26
00:01:49,080 --> 00:01:58,440
So if you search for GitHub actions, playwrite, something like that, actually playwrite GitHub action

27
00:01:58,440 --> 00:02:03,930
is already available for us, which is a pretty cool and great news.

28
00:02:03,930 --> 00:02:09,360
I mean, Microsoft team is already creating a way to run the play right.

29
00:02:09,360 --> 00:02:10,350
On GitHub action.

30
00:02:10,380 --> 00:02:16,020
So this is very, very cool because you can see that they already have a startup called as playwrite

31
00:02:16,020 --> 00:02:17,310
GitHub, actions like that.

32
00:02:17,530 --> 00:02:22,800
So this is going to download all the player dependencies and the browser dependencies and stuff for

33
00:02:22,800 --> 00:02:23,040
you.

34
00:02:23,220 --> 00:02:31,950
And then you can do the usual NPM install, NPM Test or NPCs Foleo for running the test via the testers

35
00:02:32,070 --> 00:02:35,560
and then you can execute the test for us, which is pretty cool.

36
00:02:35,610 --> 00:02:43,170
This is very straightforward and simple, and this way we can see how we can actually run the test using

37
00:02:43,170 --> 00:02:44,040
GitHub actions.

38
00:02:44,070 --> 00:02:45,420
This is very, very straightforward.

39
00:02:45,430 --> 00:02:50,010
We can also upload the artifacts if we want to, using this particular steps.

40
00:02:50,010 --> 00:02:53,280
I mean, we can talk about all these things while we are going to discuss right now.

41
00:02:53,610 --> 00:02:57,840
So what are we going to do is we are going to make use of this GitHub actions for doing things for us.

42
00:02:58,200 --> 00:03:03,660
And for that we need a repo to be available in our extra dimensions repository because I don't really

43
00:03:03,660 --> 00:03:04,110
have it.

44
00:03:04,410 --> 00:03:10,860
The reason being, I wanted to show you what I'm going to make field code change on our existing code

45
00:03:10,860 --> 00:03:14,010
that we discussed on our test run section.

46
00:03:14,310 --> 00:03:24,060
So I'm just going to go Udemy playwrite test runner and then I'm just going to open the code expiration

47
00:03:25,590 --> 00:03:35,100
date and I can probably run the NPM install because it is going to install the dependencies for me.

48
00:03:35,370 --> 00:03:43,650
And now if I go to the test run or this guy, you can see that we have the test and we have this test

49
00:03:43,650 --> 00:03:50,220
turnaround playwrite or here, and we already saw how we can actually write the code on the test using

50
00:03:50,220 --> 00:03:51,450
the FOLIA examples.

51
00:03:51,450 --> 00:03:53,910
And the tests are like this, right?

52
00:03:54,150 --> 00:03:55,980
So I'm going to make fuel code changes.

53
00:03:55,980 --> 00:04:00,090
And I'm first of all, I'm going to see how this code is going to run on my local machine.

54
00:04:00,090 --> 00:04:06,540
And then I'm going to check in this code on the GitHub rep of mine and then we'll try to use the GitHub

55
00:04:06,540 --> 00:04:10,470
actions to run the test for us on GitHub actions.

56
00:04:10,680 --> 00:04:11,010
Right.

57
00:04:11,250 --> 00:04:12,180
So far doing that.

58
00:04:12,180 --> 00:04:17,310
The first thing is I'm just going to go over here and then not run the test.

59
00:04:17,310 --> 00:04:19,860
We all know that we are just going to do this.

60
00:04:19,860 --> 00:04:21,690
NBCs Foleo.

61
00:04:24,570 --> 00:04:29,490
And if I had to enter, this is going to automatically scan all the test for us and then it's going

62
00:04:29,490 --> 00:04:31,020
to run those test for us.

63
00:04:31,020 --> 00:04:36,570
So you can see that whether it's running the test, there are a few test which is actually already failing.

64
00:04:36,570 --> 00:04:41,850
And the reason we already know because we intentionally made those test to fail for us.

65
00:04:42,060 --> 00:04:44,220
And that's the reason these tests are actually failing.

66
00:04:44,220 --> 00:04:46,650
And you can see that the new insight is just exploding.

67
00:04:47,490 --> 00:04:49,830
And there is a time out coming up over here.

68
00:04:50,130 --> 00:04:56,970
And you can see that for test got past and to for test got skipped, which is which is not quite right.

69
00:04:56,970 --> 00:04:59,610
I mean, these are failing because it.

70
00:04:59,730 --> 00:05:06,600
Actually is failing due to a reason that we intentionally made on our test to fail.

71
00:05:07,380 --> 00:05:10,540
So you can see that this guy is failing on the go, too.

72
00:05:11,200 --> 00:05:16,140
And similarly, there is another failure on the inline test fix to not spectate.

73
00:05:16,150 --> 00:05:16,540
Yes.

74
00:05:16,860 --> 00:05:20,760
So all these things we can actually fix within our code so far doing that.

75
00:05:22,640 --> 00:05:27,290
I'm just going to go all the way over here to the Canadian spectators file.

76
00:05:27,560 --> 00:05:31,550
So this is Google Earth, if you remember, and we just change this in our earlier section.

77
00:05:31,550 --> 00:05:32,990
So I'm just going to change this guy back.

78
00:05:33,260 --> 00:05:34,550
So this test will be passed.

79
00:05:35,270 --> 00:05:39,950
And similarly, uh, I think these are all right.

80
00:05:40,340 --> 00:05:48,260
And I'm going to go all the way to the test over here, fix alerts and interrupt the headless mode over

81
00:05:48,260 --> 00:05:48,580
here.

82
00:05:48,590 --> 00:05:53,750
I'm just going to make this as true because we are going to run these things in the command line and

83
00:05:53,750 --> 00:05:55,160
I will show you what I mean.

84
00:05:55,850 --> 00:06:00,230
And then I'm just going to go all the way to the test over here.

85
00:06:01,460 --> 00:06:06,110
And you can see that this particular test is actually being skipped for us to be executed.

86
00:06:06,110 --> 00:06:11,720
And this guy is going to be working, but it is going to throw us an error if they run the test on the

87
00:06:12,210 --> 00:06:19,340
Web more, because my Mac actually doesn't really run the the Web kit and it's always going to throw

88
00:06:19,340 --> 00:06:19,940
us an error.

89
00:06:19,940 --> 00:06:24,470
So probably I'm just going to skip this guy asked whether that's going to do that.

90
00:06:24,770 --> 00:06:30,500
But because we have too many test over here, what I'm going to do is I'm just going to change some

91
00:06:30,500 --> 00:06:37,820
of the code that we actually have over here to the test run record so that we can see how those tests

92
00:06:37,820 --> 00:06:38,870
are actually going to work.

93
00:06:38,880 --> 00:06:43,640
So this way we can actually compensate some of the tests that we have actually recommended.

94
00:06:43,910 --> 00:06:50,840
So what I'm going to do is I'm just going to come and these codes because this code is not required

95
00:06:51,170 --> 00:06:55,940
and because for the test, we know that we just need this import of the ID and the right test.

96
00:06:55,940 --> 00:07:02,870
So end end user login test, probably this guy is going to be the ID block.

97
00:07:03,170 --> 00:07:08,090
So you can see that we have the ID and we have the page over here and these things are going to be taken

98
00:07:08,090 --> 00:07:09,290
care for us automatically.

99
00:07:09,800 --> 00:07:12,830
Um, and I don't require the viewport.

100
00:07:12,830 --> 00:07:20,420
I was going to save this guy and for the login test over here, I can probably do the exact same thing.

101
00:07:20,420 --> 00:07:31,970
So I'm just going to remove these guys and this is going to be a demo site, Log-in, something like

102
00:07:31,970 --> 00:07:38,980
that, and just kind of say this guy and screenshot of all the browsers.

103
00:07:39,440 --> 00:07:46,120
Not sure how this is going to work, but I'm actually going to leave this guy as it is.

104
00:07:46,130 --> 00:07:46,670
Let it be.

105
00:07:47,030 --> 00:07:52,910
And if I just go here, just kind of clear and if I just do Olympic's Folio this time.

106
00:07:55,130 --> 00:08:01,520
So there are 12 deaths right now that executing on different browsers are probably I can just specify

107
00:08:02,630 --> 00:08:11,980
hyphen, hyphen, Pyramus browser name as chromium oops.

108
00:08:12,620 --> 00:08:13,700
I from.

109
00:08:18,650 --> 00:08:20,450
Now, it became six test, naturally.

110
00:08:24,940 --> 00:08:29,680
And you can see that this time, actually, all the discard parts, like for days got passed to discard,

111
00:08:29,680 --> 00:08:34,570
skipped and all those things, we can probably see this in action as well if you want to.

112
00:08:34,870 --> 00:08:36,970
So I can just make this as Hatful.

113
00:08:41,310 --> 00:08:46,440
So you can see that we are running all the tests right now on the perimeter and we are seeing that if

114
00:08:46,440 --> 00:08:52,650
they are actually working fine or not using the command line parameters, and this may also help us

115
00:08:52,650 --> 00:08:57,120
to run the test during the operation that we are going to be doing.

116
00:08:57,390 --> 00:09:01,650
So I could see that that is actually running, but it looks like it's very, very less number of test.

117
00:09:01,920 --> 00:09:07,890
So I probably am also going to add one more test that we have written before, like the test dart spectate

118
00:09:08,220 --> 00:09:13,710
J.S., which is going to be our user creation test, if you remember, like how we create the users

119
00:09:13,710 --> 00:09:14,280
and things.

120
00:09:14,580 --> 00:09:16,280
So I'm just going to add that as well.

121
00:09:16,590 --> 00:09:21,120
And if I run them all at full.

122
00:09:24,670 --> 00:09:25,770
Sorry about that, not.

123
00:09:25,900 --> 00:09:28,660
Yes, it's to yes.

124
00:09:40,540 --> 00:09:47,530
So you can see that behind the scene is also running the automation side, so there are two tests actually

125
00:09:47,530 --> 00:09:48,990
running same time.

126
00:09:50,500 --> 00:09:50,930
There you go.

127
00:09:50,950 --> 00:09:54,190
So we have like fighters got past to discard Skip.

128
00:09:54,210 --> 00:09:59,810
So this is the result that we are going to be expecting to have in our GitHub actions as well.

129
00:10:00,100 --> 00:10:02,530
So I'm actually going to create a rapport.

130
00:10:02,550 --> 00:10:06,880
I'm going to check in this code GitHub repo and then run the same tests and GitHub actions and we'll

131
00:10:06,880 --> 00:10:07,930
see how it actually works.
