Exemplo n.º 1
0
        public void CheckChannelCounters()
        {
            int channelsCounter = 0;

            var page = Go.To <TransformerPage>()
                       .Transformer.NavigationMenu.WaitTo.BeVisible()
                       .Transformer.NavigationMenu.ClickTabByName(Consts.Tabs.AllChannels)
                       .Transformer.AllChannelsTab.WaitTo.BeVisible();

            page.Transformer.AllChannelsTab.AddPackageByName(Consts.Packages.HD);
            channelsCounter +=
                int.Parse(page.Transformer.AllChannelsTab.ChannelsPackageList[p => p.Name.Value == Consts.Packages.HD].ChannelsCount.Value.Split(' ')[0]);
            page.Transformer.NavigationMenu.MyTransformerCounter.Should.BeEquivalent(channelsCounter.ToString());
            page.Rate.Body.TransformerCheck.ChannelsCount.Should.BeEquivalent($"{channelsCounter.ToString()} {Pluralizer.ChanelPlural(channelsCounter)}");

            var package = page.Transformer.AllChannelsTab.ChannelsPackageList[p => p.Name.Value == Consts.Packages.Rain];

            package.Click();
            var channel = package.Channels.ChannelsList[ch => ch.Name == Consts.Channels.Rain];

            channel.Click();
            page.ChannelCard.Footer.AddButton.Click();
            channelsCounter++;
            page.Transformer.NavigationMenu.MyTransformerCounter.Should.BeEquivalent(channelsCounter.ToString());
            page.Rate.Body.TransformerCheck.ChannelsCount.Should.BeEquivalent($"{channelsCounter.ToString()} {Pluralizer.ChanelPlural(channelsCounter)}");
        }